summaryrefslogtreecommitdiff
path: root/fs/btrfs/sysfs.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/sysfs.h
parent05840710149c7d1a78ea85a2db5723f706e97d8f (diff)
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/sysfs.h')
0 files changed, 0 insertions, 0 deletions