Re: Is statfs.f_bsize available through getattrlist()?
Re: Is statfs.f_bsize available through getattrlist()?
- Subject: Re: Is statfs.f_bsize available through getattrlist()?
- From: James Bucanek <email@hidden>
- Date: Mon, 24 Sep 2012 18:00:17 -0700
Jim Luther <mailto:email@hidden> wrote (Monday, September
24, 2012 11:38 AM -0700):
On Sep 24, 2012, at 10:32 AM, James Bucanek <email@hidden> wrote:
I have a couple of situations where my code needs to know the fundamental
block size of a volume. This value can be found in the
statfs.f_bsize field.
I believe you are looking for the ATTR_VOL_MINALLOCATION attribute.
You shouldn't depend on it completely because things can and do change, but
<http://www.opensource.apple.com/source/xnu/xnu-2050.9.2/bsd/vfs/vfs_attrlist.c>
can be helpful when figuring out what an attribute is based on.
Thanks again, Jim. The source you linked to shows that
getattrlist() returns f_bsize for both ATTR_VOL_MINALLOCATION
and ATTR_VOL_ALLOCATIONCLUMP.
Thinking about it, ATTR_VOL_MINALLOCATION and
ATTR_VOL_ALLOCATIONCLUMP would have to be equal to or larger
than f_bsize and be an even multiple of it. So for my purposes,
I can safely use ATTR_VOL_MINALLOCATION even if one day it's
larger than f_bsize.
--
James Bucanek
_______________________________________________
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