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

From: Florian Weimer
Date: Mon Nov 10 2025 - 04:49:27 EST


* 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