]> git.hungrycats.org Git - linux/commit
btrfs: stripe_alloc: kick parked rbios before the fast fsync's writeback wait
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Thu, 30 Jul 2026 18:16:55 +0000 (14:16 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Wed, 16 Sep 2026 21:40:01 +0000 (17:40 -0400)
commitbe39d65c09dc61d91d510f262c6d096ddb88df2e
tree11cb2ba41117cc8bb5f94a195d5b30ac2665fd30
parent0a9aec94a6c0ae2a20ddae61b10c78c228bc3278
btrfs: stripe_alloc: kick parked rbios before the fast fsync's writeback wait

The fast fsync path waits for page writeback, which completes only when
the raid56 layer writes the data -- but a partial-stripe rbio parks to
collect merges until its sync deadline, and on this path nothing unparks
it before the wait: the stripes are settled only later, in the logging
itself.  The full-sync path does not have this problem because the
ordered extent wait already flushes parked rbios before sleeping.

All of the fsync's writes are submitted before the wait, so nothing more
can merge into its stripes; flush the parked rbios covering the attached
ordered extents instead of sleeping out their deadline.  Removes the
sync park timeout from the fast fsync critical path.

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