]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: voluntarily relinquish cpu when doing a full fsync
authorFilipe Manana <fdmanana@suse.com>
Thu, 17 Feb 2022 12:12:05 +0000 (12:12 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Mar 2022 12:13:52 +0000 (13:13 +0100)
commit862390faaf6feaf46d115c9a914df07ad25e36a9
tree3fb5e6b96c7ad3f8cb699ed43804f9dc01fe6902
parentc79647fe1c6113165dd212835538283c03a87c4a
btrfs: voluntarily relinquish cpu when doing a full fsync

Doing a full fsync may require processing many leaves of metadata, which
can take some time and result in a task monopolizing a cpu for too long.
So add a cond_resched() after processing a leaf when doing a full fsync,
while not holding any locks on any tree (a subvolume or a log tree).

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-log.c