linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* misreported st_blocks (AllocationSize)
@ 2022-05-11 19:33 Steve French
  2022-05-11 20:20 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Steve French @ 2022-05-11 19:33 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: samba-technical, CIFS

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?

-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: misreported st_blocks (AllocationSize)
  2022-05-11 19:33 misreported st_blocks (AllocationSize) Steve French
@ 2022-05-11 20:20 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2022-05-11 20:20 UTC (permalink / raw)
  To: Steve French; +Cc: linux-fsdevel, samba-technical, CIFS

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-11 20:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-11 19:33 misreported st_blocks (AllocationSize) Steve French
2022-05-11 20:20 ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).