[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZCDXnuV7oZwcYvRP@infradead.org>
Date: Sun, 26 Mar 2023 16:39:10 -0700
From: "hch@...radead.org" <hch@...radead.org>
To: Jaegeuk Kim <jaegeuk@...nel.org>
Cc: Damien Le Moal <Damien.LeMoal@....com>,
"chao@...nel.org" <chao@...nel.org>,
"linux-f2fs-devel@...ts.sourceforge.net"
<linux-f2fs-devel@...ts.sourceforge.net>,
"hans@...tronix.com" <hans@...tronix.com>,
"hch@...radead.org" <hch@...radead.org>,
Aravind Ramesh <Aravind.Ramesh@....com>,
Hans Holmberg <Hans.Holmberg@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH] f2fs: preserve direct write semantics when buffering
is forced
On Thu, Mar 23, 2023 at 05:46:37PM -0700, Jaegeuk Kim wrote:
> > Yes, and that was exactly my point: with LFS mode, O_DIRECT write
> > should never overwrite anything. So I do not see why direct writes
> > should be handled as buffered writes with zoned devices. Am I missing
> > something here ?
>
> That's an easiest way to serialize block allocation and submit_bio when users
> are calling buffered writes and direct writes in parallel. :)
> I just felt that if we can manage both of them in direct write path along with
> buffered write path, we may be able to avoid memcpy.
Yes. Note that right now f2fs doesn't really support proper O_DIRECT
for buffered I/O either, as non-overwrites require a feature similar
to unwritten extents, or a split of the allocation phase and the record
metdata phase. If we'd go for the second choice for f2fs, which is the
more elegant thing to do, you'll get the zoned direct I/O write support
almost for free.
Powered by blists - more mailing lists