Skip to content

Commit 68319c1

Browse files
josefbacikkdave
authored andcommitted
btrfs: show rescue=usebackuproot in /proc/mounts
The standalone option usebackuproot was intended as one-time use and it was not necessary to keep it in the option list. Now that we're going to have more rescue options, it's desirable to keep them intact as it could be confusing why the option disappears. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> [ remove the btrfs_clear_opt part from open_ctree ] Signed-off-by: David Sterba <dsterba@suse.com>
1 parent ab0b4a3 commit 68319c1

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

fs/btrfs/disk-io.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3384,12 +3384,6 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
33843384
}
33853385
set_bit(BTRFS_FS_OPEN, &fs_info->flags);
33863386

3387-
/*
3388-
* backuproot only affect mount behavior, and if open_ctree succeeded,
3389-
* no need to keep the flag
3390-
*/
3391-
btrfs_clear_opt(fs_info->mount_opt, USEBACKUPROOT);
3392-
33933387
return 0;
33943388

33953389
fail_qgroup:

fs/btrfs/super.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,8 @@ static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry)
14371437
seq_puts(seq, ",notreelog");
14381438
if (btrfs_test_opt(info, NOLOGREPLAY))
14391439
print_rescue_option(seq, "nologreplay", &printed);
1440+
if (btrfs_test_opt(info, USEBACKUPROOT))
1441+
print_rescue_option(seq, "usebackuproot", &printed);
14401442
if (btrfs_test_opt(info, FLUSHONCOMMIT))
14411443
seq_puts(seq, ",flushoncommit");
14421444
if (btrfs_test_opt(info, DISCARD_SYNC))

0 commit comments

Comments
 (0)