summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.h
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2019-03-25 14:31:23 +0200
committerDavid Sterba <dsterba@suse.com>2019-04-29 19:02:36 +0200
commit61d0d0d2cbb7e52d3defe8089d5f360cf6d836ef (patch)
tree962c4198e51d879d60578177abe92a2857f164e9 /fs/btrfs/extent_io.h
parentbbbf7243d62d8be73b7ef60721c127b36b2d523e (diff)
downloadlinux-61d0d0d2cbb7e52d3defe8089d5f360cf6d836ef.tar.gz
linux-61d0d0d2cbb7e52d3defe8089d5f360cf6d836ef.tar.bz2
linux-61d0d0d2cbb7e52d3defe8089d5f360cf6d836ef.zip
btrfs: Handle pending/pinned chunks before blockgroup relocation during device shrink
During device shrink pinned/pending chunks (i.e. those which have been deleted/created respectively, in the current transaction and haven't touched disk) need to be accounted when doing device shrink. Presently this happens after the main relocation loop in btrfs_shrink_device, which could lead to making another go in the body of the function. Since there is no hard requirement to perform pinned/pending chunks handling after the relocation loop, move the code before it. This leads to simplifying the code flow around - i.e. no need to use 'goto again'. A notable side effect of this change is that modification of the device's size requires a transaction to be started and committed before the relocation loop starts. This is necessary to ensure that relocation process sees the shrunk device size. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.h')
0 files changed, 0 insertions, 0 deletions