Re: misreported st_blocks (AllocationSize)

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

 



On Wed, May 11, 2022 at 02:33:01PM -0500, Steve French wrote:
> Was investigating trying to fix emulation of some fallocate flags, and
> was wondering how common is it for a fs to very loosely report
> allocation size (st_blocks) for a file - ie the allocation sizes does
> not match the allocate ranges returned by fiemap (or
> SEEK_HOLE/SEEK_DATA).   Presumably there are Linux fs that coalesce
> ranges on the fly so allocation sizes may be a 'guess' for some fs.
> 
> How common is this for it to be off?

Very common -- XFS reports /all/ file block usage in st_blocks,
including the extent mapping trees and staging areas for copy on write.

--D

> -- 
> Thanks,
> 
> Steve



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux