]> git.hungrycats.org Git - linux/commit
btrfs: raid56: skip parking for sync rbios finished by their unplug batch
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 31 Jul 2026 08:41:19 +0000 (04:41 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Wed, 16 Sep 2026 21:40:02 +0000 (17:40 -0400)
commitb0c302a27e74f492df2ff8eb4294729014402dbe
tree2b4ebf2e52b10c18b6e20ed02d89d4c19335d905
parentb55ddb9da6d52219febd09cfa3173054a0db3f32
btrfs: raid56: skip parking for sync rbios finished by their unplug batch

Parking exists to widen the merge window, and for plugged submissions
the unplug callback is the natural end of that window from the
submitter's side: once raid_unplug() has sorted and merged the batch,
nothing more is coming from it.  A sync rbio parked after that point --
a sync(2) or WB_SYNC_ALL sweep, whose whole flush shares one plug --
has a waiter behind it and can only sit out the sync deadline.  Mark
rbios leaving an unplug batch and let sync ones skip parking.

Unplugged sync submissions (the fsync flush) still park: their sibling
bios arrive one by one and merge into the parked rbio, and the fsync
path kicks it as soon as they have all been submitted, so parking there
is the merge mechanism and the deadline already never fires.

Assisted-by: Claude:claude-fable-5
fs/btrfs/raid56.c