• 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: Is statfs.f_bsize available through getattrlist()?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Is statfs.f_bsize available through getattrlist()?
      • From: James Bucanek <email@hidden>
References: 
 >Is statfs.f_bsize available through getattrlist()? (From: James Bucanek <email@hidden>)

  • Prev by Date: Is statfs.f_bsize available through getattrlist()?
  • Next by Date: Re: Is statfs.f_bsize available through getattrlist()?
  • Previous by thread: Is statfs.f_bsize available through getattrlist()?
  • Next by thread: Re: Is statfs.f_bsize available through getattrlist()?
  • Index(es):
    • Date
    • Thread