[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z3u-OCX86j-q7JXo@infradead.org>
Date: Mon, 6 Jan 2025 03:27:52 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Zhang Yi <yi.zhang@...weicloud.com>
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
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.
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.
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