summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/sb.c
diff options
context:
space:
mode:
authorRobbie Ko <robbieko@synology.com>2020-05-14 17:19:18 +0800
committerDavid Sterba <dsterba@suse.com>2020-05-25 11:25:36 +0200
commitc11fbb6ed0ddc11b992f9c668b79505d31956368 (patch)
treece99a3789e94b681fda1dba17e96c584c1919d3d /fs/ubifs/sb.c
parentaeb935a455812e0ec15e15801f7a42d887e6c22f (diff)
downloadlinux-stable-c11fbb6ed0ddc11b992f9c668b79505d31956368.tar.gz
linux-stable-c11fbb6ed0ddc11b992f9c668b79505d31956368.tar.bz2
linux-stable-c11fbb6ed0ddc11b992f9c668b79505d31956368.zip
btrfs: reduce lock contention when creating snapshot
When creating a snapshot, ordered extents need to be flushed and this can take a long time. In create_snapshot there are two locks held when this happens: 1. Destination directory inode lock 2. Global subvolume semaphore This will unnecessarily block other operations like subvolume destroy, create, or setflag until the snapshot is created. We can fix that by moving the flush outside the locked section as this does not depend on the aforementioned locks. The code factors out the snapshot related work from create_snapshot to btrfs_mksnapshot. __btrfs_ioctl_snap_create btrfs_mksubvol create_subvol btrfs_mksnapshot <flush> btrfs_mksubvol create_snapshot Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Robbie Ko <robbieko@synology.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/ubifs/sb.c')
0 files changed, 0 insertions, 0 deletions