Thread (2 messages) 2 messages, 2 authors, 2021-10-20

Re: [PATCH stable-4.14.y] btrfs: always wait on ordered extents at fsync time

From: Greg KH <gregkh@linuxfoundation.org>
Date: 2021-10-20 12:32:53
Also in: linux-btrfs, lkml

On Tue, Oct 19, 2021 at 06:38:20PM +0800, Anand Jain wrote:
From: Josef Bacik <redacted>

Commit b5e6c3e170b77025b5f6174258c7ad71eed2d4de upstream.

There's a priority inversion that exists currently with btrfs fsync.  In
some cases we will collect outstanding ordered extents onto a list and
only wait on them at the very last second.  However this "very last
second" falls inside of a transaction handle, so if we are in a lower
priority cgroup we can end up holding the transaction open for longer
than needed, so if a high priority cgroup is also trying to fsync()
it'll see latency.

Signed-off-by: Josef Bacik <redacted>
Reviewed-by: Filipe Manana <redacted>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Anand Jain <redacted>
---
 fs/btrfs/file.c | 56 ++++---------------------------------------------
 1 file changed, 4 insertions(+), 52 deletions(-)
Now applied, thanks.

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help