From: Zhang Yi <yi.zhang@huaweicloud.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk,
brauner@kernel.org, jack@suse.cz, tytso@mit.edu,
djwong@kernel.org, adilger.kernel@dilger.ca, yi.zhang@huawei.com,
chengzhihao1@huawei.com, yukuai3@huawei.com,
yangerkun@huawei.com, Sai Chaitanya Mitta <mittachaitu@gmail.com>,
linux-xfs@vger.kernel.org
Subject: Re: [RFC PATCH 1/2] fs: introduce FALLOC_FL_FORCE_ZERO to fallocate
Date: Tue, 7 Jan 2025 20:38:49 +0800 [thread overview]
Message-ID: <3e443003-ff12-45c8-b41b-65a0af43de61@huaweicloud.com> (raw)
In-Reply-To: <Z3u-OCX86j-q7JXo@infradead.org>
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.
next prev parent reply other threads:[~2025-01-07 12:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-28 1:45 [RFC PATCH 0/2] fallocate: introduce FALLOC_FL_FORCE_ZERO flag Zhang Yi
2024-12-28 1:45 ` [RFC PATCH 1/2] fs: introduce FALLOC_FL_FORCE_ZERO to fallocate Zhang Yi
2025-01-06 11:27 ` Christoph Hellwig
2025-01-06 16:17 ` Theodore Ts'o
2025-01-06 16:27 ` Christoph Hellwig
2025-01-06 17:31 ` Darrick J. Wong
2025-01-06 18:06 ` Christoph Hellwig
2025-01-07 14:05 ` Zhang Yi
2025-01-07 16:42 ` Christoph Hellwig
2025-01-08 1:20 ` Zhang Yi
2025-01-07 11:22 ` Zhang Yi
2025-01-07 12:38 ` Zhang Yi [this message]
2024-12-28 1:45 ` [RFC PATCH 2/2] ext4: add FALLOC_FL_FORCE_ZERO support Zhang Yi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e443003-ff12-45c8-b41b-65a0af43de61@huaweicloud.com \
--to=yi.zhang@huaweicloud.com \
--cc=adilger.kernel@dilger.ca \
--cc=brauner@kernel.org \
--cc=chengzhihao1@huawei.com \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=mittachaitu@gmail.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai3@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox