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: Jim Luther <email@hidden>
- Date: Mon, 24 Sep 2012 11:38:26 -0700
On Sep 24, 2012, at 10:32 AM, James Bucanek <email@hidden> wrote:
> Greetings,
>
> 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 was trying to migrate all of my stat() and statfs() calls to the more flexible and verbose getattrlist(), but there's no corresponding volume attribute flag for f_bsize.
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.
>
> getattrlist() has ATTR_VOL_IOBLOCKSIZE, which will return statfs.f_iosize. And there's the odd ATTR_FILE_IOBLOCKSIZE, which appears to be ATTR_VOL_IOBLOCKSIZE (just reported as a file attribute, for convenience). But I can't find any analog of statfs.f_bsize in sys/attr.h
>
> --
> 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
_______________________________________________
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