[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3e443003-ff12-45c8-b41b-65a0af43de61@huaweicloud.com>
Date: Tue, 7 Jan 2025 20:38:49 +0800
From: Zhang Yi <yi.zhang@...weicloud.com>
To: Christoph Hellwig <hch@...radead.org>
Cc: linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org, viro@...iv.linux.org.uk, brauner@...nel.org,
jack@...e.cz, tytso@....edu, djwong@...nel.org, adilger.kernel@...ger.ca,
yi.zhang@...wei.com, chengzhihao1@...wei.com, yukuai3@...wei.com,
yangerkun@...wei.com, Sai Chaitanya Mitta <mittachaitu@...il.com>,
linux-xfs@...r.kernel.org
Subject: Re: [RFC PATCH 1/2] fs: introduce FALLOC_FL_FORCE_ZERO to fallocate
On 2025/1/6 19:27, Christoph Hellwig wrote:
> There's a feature request for something similar on the xfs list, so
> I guess people are asking for it.
>
> That being said this really should not be a modifier but a separate
> operation, as the logic is very different from FALLOC_FL_ZERO_RANGE,
> similar to how plain prealloc, hole punch and zero range are different
> operations despite all of them resulting in reads of zeroes from the
> range.
OK, it seems reasonable to me, and adding a new operation would be
better. There is actually no need to mix it with the current
FALLOC_FL_ZERO_RANGE.
>
> That will also make it more clear that for files or file systems that
> require out place writes this operation should fail instead of doing
> pointless multiple writes.
>
> Also please write a man page update clearly specifying the semantics,
> especially if this should work or not if there is no write zeroes
> offload in the hardware, or if that offload actually writes physical
> zeroes to the media or not.
>
Sure. thanks for your advice.
Thanks,
Yi.
> Btw, someone really should clean up the ext4 fallocate code to use
> helper adnd do the
>
> switch (mode & FALLOC_FL_MODE_MASK) {
> }
>
> and then use helpers for each mode whih will make these things a lot
> more obvious.
Powered by blists - more mailing lists