mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-25 22:40:38 +00:00
btrfs-progs: add new flag to read superblock with mismatched fsids
New flag that mimics OPEN_CTREE_IGNORE_FSID_MISMATCH but only for reading the superblock. It should be passed around to various helpers like scan or mount checks as they'd fail before we'd get to the final caller that can do something useful with the filesystem. This will be used for an interrupted 'btrfstune -u'. Note to __open_ctree_fd: the RECOVERY mode is not compatible with that flag Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
e7e89d93c2
commit
47cbb3c9b2
@ -1125,6 +1125,9 @@ static struct btrfs_fs_info *__open_ctree_fd(int fp, const char *path,
|
||||
if (flags & OPEN_CTREE_TEMPORARY_SUPER)
|
||||
sbflags = SBREAD_TEMPORARY;
|
||||
|
||||
if (flags & OPEN_CTREE_IGNORE_FSID_MISMATCH)
|
||||
sbflags |= SBREAD_IGNORE_FSID_MISMATCH;
|
||||
|
||||
ret = btrfs_scan_fs_devices(fp, path, &fs_devices, sb_bytenr, sbflags,
|
||||
(flags & OPEN_CTREE_NO_DEVICES));
|
||||
if (ret)
|
||||
|
Loading…
Reference in New Issue
Block a user