From: Boris Burkov <boris@bur.io>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: cleanup submit_extent_folio()
Date: Mon, 14 Sep 2026 15:24:20 -0700 [thread overview]
Message-ID: <20260914222420.GA151269@zen.localdomain> (raw)
In-Reply-To: <ce764b1e763090b6d8983a06bb57ef08f74b1206.1789298944.git.wqu@suse.com>
On Sun, Sep 13, 2026 at 08:59:15PM +0930, Qu Wenruo wrote:
> Cleanup submit_extent_folio() by:
>
> - Remove @size parameter
> Since commit b2e743927fdd ("btrfs: make btrfs_do_readpage() to do
> block-by-block read"), all callers are passing sectorsize as @size,
> so there is no need for such parameter.
>
> Furthermore since we only write one block at a time, there is no need
> for a while() loop, nor the advance of various local variables.
>
> - Update the comments on the parameter list
> * @disk_bytenr is shared for both read and write
> * rename @page to @folio
>
> - Update the return value to return 0 or error
> Since we won't queue multiple blocks anyway, there is no point in
> returning the queued bytes.
> It makes more sense to return an error code, although the only error
> code will be -EUCLEAN for writes.
>
> - Rename submit_extent_folio() to submit_one_block()
>
> - Rename submit_one_sector() to submit_write_sector()
>
> - Update the error message to utilize the new returned error code inside
> submit_write_sector()
>
Reviewed-by: Boris Burkov <boris@bur.io>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
next prev parent reply other threads:[~2026-09-14 22:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 11:29 [PATCH] btrfs: cleanup submit_extent_folio() Qu Wenruo
2026-09-14 22:24 ` Boris Burkov [this message]
2026-09-16 13:05 ` David Sterba
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=20260914222420.GA151269@zen.localdomain \
--to=boris@bur.io \
--cc=linux-btrfs@vger.kernel.org \
--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