aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.h
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2020-01-10 14:11:35 +0200
committerDavid Sterba <dsterba@suse.com>2020-01-23 17:24:39 +0100
commit1362089d2ad7e20d16371b39d3c11990d4ec23e4 (patch)
treea58b77628f3c9449130401d024dc9272438f261e /fs/btrfs/volumes.h
parentbtrfs: Handle another split brain scenario with metadata uuid feature (diff)
downloadlinux-dev-1362089d2ad7e20d16371b39d3c11990d4ec23e4.tar.xz
linux-dev-1362089d2ad7e20d16371b39d3c11990d4ec23e4.zip
btrfs: Fix split-brain handling when changing FSID to metadata uuid
Current code doesn't correctly handle the situation which arises when a file system that has METADATA_UUID_INCOMPAT flag set and has its FSID changed to the one in metadata uuid. This causes the incompat flag to disappear. In case of a power failure we could end up in a situation where part of the disks in a multi-disk filesystem are correctly reverted to METADATA_UUID_INCOMPAT flag unset state, while others have METADATA_UUID_INCOMPAT set and CHANGING_FSID_V2_IN_PROGRESS. This patch corrects the behavior required to handle the case where a disk of the second type is scanned first, creating the necessary btrfs_fs_devices. Subsequently, when a disk which has already completed the transition is scanned it should overwrite the data in btrfs_fs_devices. Reported-by: Su Yue <Damenly_Su@gmx.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> 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/volumes.h')
0 files changed, 0 insertions, 0 deletions