• David Sterba's avatar
    btrfs: add wrapper for conditional start of exclusive operation · 17aaa434
    David Sterba authored
    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: default avatarDavid Sterba <dsterba@suse.com>
    17aaa434
ioctl.c 122 KB