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

From: Christoph Hellwig
Date: Mon Nov 10 2025 - 04:38:45 EST


On Mon, Nov 10, 2025 at 06:27:41AM +0100, Florian Weimer wrote:
> Sorry, I made the example confusing.
>
> How would the application deal with failure due to lack of fallocate
> support? It would have to do a pwrite, like posix_fallocate does to
> today, or maybe ftruncate. This is way I think removing the fallback
> from posix_fallocate completely is mostly pointless.

In general it would ftruncate. If it thinks it can't work without
preallocation at all the application will fail, as again the lack
of posix_fallocate means that space can't be preallocated.