diff options
author | Nikolay Borisov <nborisov@suse.com> | 2019-03-25 14:31:23 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 19:02:36 +0200 |
commit | 61d0d0d2cbb7e52d3defe8089d5f360cf6d836ef (patch) | |
tree | 962c4198e51d879d60578177abe92a2857f164e9 /fs/Kconfig.binfmt | |
parent | bbbf7243d62d8be73b7ef60721c127b36b2d523e (diff) | |
download | linux-61d0d0d2cbb7e52d3defe8089d5f360cf6d836ef.tar.bz2 |
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/Kconfig.binfmt')
0 files changed, 0 insertions, 0 deletions