[RFC] xfs: fake fallocate success for always CoW inodes

Florian Weimer fweimer@redhat.com
Mon Nov 10 09:49:04 GMT 2025


* Christoph Hellwig:

>> Maybe add two flags, one for the ftruncate replacement, and one that
>> instructs the file system that the range will be used with mmap soon?
>> I expect this could be useful information to the file system.  We
>> wouldn't use it in posix_fallocate, but applications calling fallocate
>> directly might.
>
> What do you think "to be used with mmap" flag could be useful for
> in the file system?  For file systems mmap I/O isn't very different
> from other use cases.

I'm not a file system developer. 8-)

The original concern was about a large file download tool that didn't
download in sequence.  It wrote to a memory mapping directly, in
somewhat random order.  And was observed to cause truly bad
fragmentation in practice.  Maybe this something for posix_fadvise.

Thanks,
Florian



More information about the Libc-alpha mailing list