]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add btrfs_try_lock_ordered_range
authorJosef Bacik <josef@toxicpanda.com>
Mon, 12 Sep 2022 19:27:45 +0000 (12:27 -0700)
committerDavid Sterba <dsterba@suse.com>
Thu, 29 Sep 2022 15:08:28 +0000 (17:08 +0200)
commit5ee9f32eff3b1748b3f6e10c89573e6806c1d83d
treee4a7dc29b9411fd268f32badd285a8f1360a23fc
parent4dad05d4c37d048506a894d805c1ba91f679a22f
btrfs: add btrfs_try_lock_ordered_range

For IOCB_NOWAIT we're going to want to use try lock on the extent lock,
and simply bail if there's an ordered extent in the range because the
only choice there is to wait for the ordered extent to complete.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Stefan Roesch <shr@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ordered-data.c
fs/btrfs/ordered-data.h