• 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: Kevin Elliott <email@hidden>
  • Date: Wed, 24 Sep 2008 11:27:17 -0700


On Sep 23, 2008, at 5:29 PM, Sam Vaughan wrote:
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.

It's a lot less fragile than you think. Functionally speaking, that key name is equivalent to a fcntl selector- changing it would break lots of code, and lots of code relies on it being there. It isn't going anywhere.


Understand, the BSD layer sits on top of IOKit, not the other way around. Any of the fcntl that provide data on hardware get that data using IOKit. Indeed, if you look at the source for IOMediaBSDClient you'll find a big switch statement that maps fcntl selectors to IOKit keys, then uses those keys to get the requested data.

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.

Yes, It's quite possible you'll see greater than 4k. 8k is fairly common on the mid to high end, and I think I've heard of 16k on the very high end. Basically as the number of drives in a RAID increases, it's common to increase the block size to encourage the OS to use read sizes that give good performance.
_______________________________________________
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: Sam Vaughan <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>)
 >Re: How can I access mnt_devblocksize from user space? (From: Sam Vaughan <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