From: Christoph Hellwig <hch@infradead.org>
To: Qu Wenruo <wqu@suse.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Qu Wenruo <quwenruo.btrfs@gmx.com>,
linux-fsdevel@vger.kernel.org,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: About using on-stack fsdata pointer for write_begin() and write_end() callbacks
Date: Mon, 11 Nov 2024 21:05:08 -0800 [thread overview]
Message-ID: <ZzLiBEA6Sp-P7xoB@infradead.org> (raw)
In-Reply-To: <d5dca4eb-2294-4d24-9e36-dac8be852622@suse.com>
On Mon, Nov 11, 2024 at 06:06:57PM +1030, Qu Wenruo wrote:
> > Why? They aren't exactly efficient, and it's just going to create
> > more Churn for Goldwyn's iomap work.
>
> So it is not recommended to go the write_begin() and write_end() callbacks
> at all?
> Or just not recommended for btrfs?
They aren't a very efficient model, so I would not recommend to add
new users.
> I know there are limits like those call backs do not support IOCB_NOWAIT,
> and the memory allocation inefficient problem (it should only affect ocfs2),
> but shouldn't we encourage to use the more common paths where all other fses
> go?
I'd recommend to use iomap.
> > And that scheme was one of my suggestions back then, together with
> > removing write_begin/end from address_space_operations because they
> > aren't operations called by MM/pagecache code, but just callbacks
> > provided by the file system to perform_generic_write.
> >
>
> Mind to point me to the old discussion thread? I'd like to know why we
> didn't go that path.
Probably because no one did the work yet. I don't have a pointer at
hand, but it was a discussion willy kicked up about converting
write_begin/end to folios.
next prev parent reply other threads:[~2024-11-12 5:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-11 4:27 About using on-stack fsdata pointer for write_begin() and write_end() callbacks Qu Wenruo
2024-11-11 5:52 ` Christoph Hellwig
2024-11-11 7:36 ` Qu Wenruo
2024-11-12 5:05 ` Christoph Hellwig [this message]
2024-11-12 5:31 ` Qu Wenruo
2024-11-12 5:41 ` Christoph Hellwig
2024-11-12 6:03 ` Qu Wenruo
2024-11-12 6:06 ` Christoph Hellwig
2024-11-12 6:13 ` Qu Wenruo
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=ZzLiBEA6Sp-P7xoB@infradead.org \
--to=hch@infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=wqu@suse.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