]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add wrapper for conditional start of exclusive operation
authorDavid Sterba <dsterba@suse.com>
Fri, 14 May 2021 19:32:44 +0000 (21:32 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jun 2021 13:19:07 +0000 (15:19 +0200)
commitb833041614441f7f6e5861c9ece33addb6728929
tree4bbb2a49d93e70f5fd0f8363ad8ab3d904bd27ce
parent738dee5b61f03a9dd55a1fa029cb3f31498fd6e7
btrfs: add wrapper for conditional start of exclusive operation

To support optional cancellation of some operations, add helper that will
wrap all the combinations. In normal mode it's same as
btrfs_exclop_start, in cancellation mode it checks if it's already
running and request cancellation and waits until completion.

The error codes can be returned to to user space and semantics is not
changed, adding ECANCELED. This should be evaluated as an error and that
the operation has not completed and the operation should be restarted
or the filesystem status reviewed.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c