Menu

#10 FreeBSD: Add workaround for 4096-aligned drives

Unstable (example)
open
nobody
None
5
4 hours ago
9 hours ago
No

On 4096-aligned drives DIOCGSTRIPEOFFSET ioctl used for determining of partition offset always returns 0. Probably due to a bug. Fallback to value provided by GEOM in that case. It looks correct.

1 Attachments

Discussion

  • Henrik Carlqvist

    Henrik Carlqvist - 7 hours ago

    Thanks for the patch!

    The declaration of the new function diocgstripeoffset and the call to that function is only made if DIOCGFWSECTORS is defined. However, the function seem to need sysctl and sysctl.h and some more .h files are only included if DIOCGFWSECTORS and (APPLE or FreeBSD) is defined.

    Do you think that the call and declaration also only should be made if APPLE or FreeBSD is defined? Or would you prefer if the includes were done also without APPLE or FreeBSD?

     
  • Vladimir Kondratyev

    The declaration and the call is FreeBSD-specific. Like any DIOC... macro. APPLE's ioctl name PREFIX is DKIO rather than DIOC. They share only header file (sys/disk.h) with completely different content.
    So only FreeBSD is supported by new code that is achieved with DIOCGFWSECTORS #define check.

     

Log in to post a comment.

MongoDB Logo MongoDB