• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How can I access mnt_devblocksize from user space?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I access mnt_devblocksize from user space?


  • Subject: Re: How can I access mnt_devblocksize from user space?
  • From: Sam Vaughan <email@hidden>
  • Date: Wed, 24 Sep 2008 10:29:01 +1000

Thanks Kevin and Jim for the quick responses.

The most common file system I'll be running on is HFS, and looking at hfs_vfs_getattr I see that it returns vcb->blockSize in f_bsize, so getvolattrlist won't resort to supplying mnt_devblocksize instead. I haven't dug through HFS yet to see if vcb->blockSize ends up being the same thing, but the fact that this method relies on the file system to return an appropriate value for the underlying device puts me off.

The IOKit alternative looks a little fragile in that it relies on the existence of a named property that you're already not very happy with. ;o) It's workable but quite unwieldy. It's a shame that there's no nice simple BSD way to get at this important information. Should I file an enhancement request for e.g. an fcntl selector? The implementation of the F_LOG2PHYS fcntl command comes very close to providing mnt_devblocksize already.

Do you think I'm ever likely to encounter RAID setups with mnt_devblocksize values greater than 4k? I'm much more concerned about taking the cluster_copy_upl_data hit than I am about being a little bit inefficient on volumes with 512 alignment. My code runs underneath video NLEs and is rarely used with formats that can be read off a standalone disk.

If >4k is a possibility, I'll implement the IOKit code you suggest. Otherwise I think I'll just leave it hard coded to read from 4k offsets.

Thanks again,

Sam
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How can I access mnt_devblocksize from user space?
      • From: Kevin Elliott <email@hidden>
References: 
 >How can I access mnt_devblocksize from user space? (From: Sam Vaughan <email@hidden>)
 >Re: How can I access mnt_devblocksize from user space? (From: Jim Luther <email@hidden>)
 >Re: How can I access mnt_devblocksize from user space? (From: Kevin Elliott <email@hidden>)

  • Prev by Date: Re: How can I access mnt_devblocksize from user space?
  • Next by Date: Re: How can I access mnt_devblocksize from user space?
  • Previous by thread: Re: How can I access mnt_devblocksize from user space?
  • Next by thread: Re: How can I access mnt_devblocksize from user space?
  • Index(es):
    • Date
    • Thread