Re: [PATCH 1/6] xstat: Add a pair of system calls to make extended file stats available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Thu, Apr 26, 2012 at 02:32:36PM +0100, David Howells wrote:
> Andreas Dilger <adilger@xxxxxxxxx> wrote:
> > st_blksize may be variable for a distributed filesystem,

It can be variable for local filesystems, too. XFS will vary the
block size based on the configuration of the inode. e.g. if there is
an extent allocation size hint on the inode, or it's on the realtime
device, and so on. There is no guarantee that from file to file that
it is constant.

> I wonder if there's a way to make this explicit - or is it something that if
> the bit isn't set, you can't use the value in st_blksize.
> I wonder if this
> value always has to be non-zero to make sure existing stat() doesn't explode.

More likely it probably needs to be non-zero to prevent applications
doing division by block size from exploding... ;)


Dave Chinner
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Linux Ext4 Filesystem]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [CEPH Filesystem]

  Powered by Linux