public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/4] btrfs: refactor btrfs_buffered_write() for the incoming large data folios
Date: Thu, 20 Mar 2025 16:04:07 +1030	[thread overview]
Message-ID: <cover.1742443383.git.wqu@suse.com> (raw)

The function btrfs_buffered_write() is implementing all the complex
heavy-lifting work inside a huge while () loop, which makes later large
data folios work much harder.

The first patch is a patch that already submitted to the mailing list
recently, but all later reworks depends on that patch, thus it is
included in the series.

The core of the whole series is to introduce a helper function,
copy_one_range() to do the buffer copy into one single folio.

Patch 2 is a preparation that moves the error cleanup into the main loop,
so we do not have dedicated out-of-loop cleanup.

Patch 3 is another preparation that extract the space reservation code
into a helper, make the final refactor patch a little more smaller.

And patch 4 is the main dish, with all the refactoring happening inside
it.

Qu Wenruo (4):
  btrfs: remove force_page_uptodate variable from btrfs_buffered_write()
  btrfs: cleanup the reserved space inside the loop of
    btrfs_buffered_write()
  btrfs: extract the space reservation code from btrfs_buffered_write()
  btrfs: extract the main loop of btrfs_buffered_write() into a helper

 fs/btrfs/file.c | 434 ++++++++++++++++++++++++++----------------------
 1 file changed, 231 insertions(+), 203 deletions(-)

-- 
2.49.0


             reply	other threads:[~2025-03-20  5:34 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20  5:34 Qu Wenruo [this message]
2025-03-20  5:34 ` [PATCH 1/4] btrfs: remove force_page_uptodate variable from btrfs_buffered_write() Qu Wenruo
2025-03-21  9:41   ` Johannes Thumshirn
2025-03-21 12:00   ` Filipe Manana
2025-03-22  8:50     ` Qu Wenruo
2025-03-20  5:34 ` [PATCH 2/4] btrfs: cleanup the reserved space inside the loop of btrfs_buffered_write() Qu Wenruo
2025-03-21  9:49   ` Johannes Thumshirn
2025-03-21 12:10   ` Filipe Manana
2025-03-20  5:34 ` [PATCH 3/4] btrfs: extract the space reservation code from btrfs_buffered_write() Qu Wenruo
2025-03-21  9:49   ` Johannes Thumshirn
2025-03-21 12:20   ` Filipe Manana
2025-03-20  5:34 ` [PATCH 4/4] btrfs: extract the main loop of btrfs_buffered_write() into a helper Qu Wenruo
2025-03-21  9:54   ` Johannes Thumshirn
2025-03-21 12:37   ` Filipe Manana
2025-03-27 16:50   ` David Sterba
2025-03-27 16:47 ` [PATCH 0/4] btrfs: refactor btrfs_buffered_write() for the incoming large data folios David Sterba
2025-03-27 20:47   ` Qu Wenruo
2025-03-28 19:12     ` David Sterba
2025-03-28 22:04       ` 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=cover.1742443383.git.wqu@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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