Menu

#10 FreeBSD: Add workaround for 4096-aligned drives

Unstable (example)
open
nobody
None
5
4 days ago
5 days 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

    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.

     
  • Henrik Carlqvist

    Ok, thanks again! I hope to be able to create a new development release some weekend in the future, probably not in April, but hopefully some weekend in May.

     

Log in to post a comment.

MongoDB Logo MongoDB