public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] btrfs: refactor btrfs_buffered_write() for the incoming large data folios
@ 2025-03-20  5:34 Qu Wenruo
  2025-03-20  5:34 ` [PATCH 1/4] btrfs: remove force_page_uptodate variable from btrfs_buffered_write() Qu Wenruo
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Qu Wenruo @ 2025-03-20  5:34 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2025-03-28 22:04 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-20  5:34 [PATCH 0/4] btrfs: refactor btrfs_buffered_write() for the incoming large data folios Qu Wenruo
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox