@@ -177,6 +177,7 @@ enum {
177
177
Opt_rescue_ignorebadroots ,
178
178
Opt_rescue_ignoredatacsums ,
179
179
Opt_rescue_ignoremetacsums ,
180
+ Opt_rescue_ignoresuperflags ,
180
181
Opt_rescue_parameter_all ,
181
182
};
182
183
@@ -187,8 +188,10 @@ static const struct constant_table btrfs_parameter_rescue[] = {
187
188
{ "ibadroots" , Opt_rescue_ignorebadroots },
188
189
{ "ignoredatacsums" , Opt_rescue_ignoredatacsums },
189
190
{ "ignoremetacsums" , Opt_rescue_ignoremetacsums },
191
+ { "ignoresuperflags" , Opt_rescue_ignoresuperflags },
190
192
{ "idatacsums" , Opt_rescue_ignoredatacsums },
191
193
{ "imetacsums" , Opt_rescue_ignoremetacsums },
194
+ { "isuperflags" , Opt_rescue_ignoresuperflags },
192
195
{ "all" , Opt_rescue_parameter_all },
193
196
{}
194
197
};
@@ -577,9 +580,13 @@ static int btrfs_parse_param(struct fs_context *fc, struct fs_parameter *param)
577
580
case Opt_rescue_ignoremetacsums :
578
581
btrfs_set_opt (ctx -> mount_opt , IGNOREMETACSUMS );
579
582
break ;
583
+ case Opt_rescue_ignoresuperflags :
584
+ btrfs_set_opt (ctx -> mount_opt , IGNORESUPERFLAGS );
585
+ break ;
580
586
case Opt_rescue_parameter_all :
581
587
btrfs_set_opt (ctx -> mount_opt , IGNOREDATACSUMS );
582
588
btrfs_set_opt (ctx -> mount_opt , IGNOREMETACSUMS );
589
+ btrfs_set_opt (ctx -> mount_opt , IGNORESUPERFLAGS );
583
590
btrfs_set_opt (ctx -> mount_opt , IGNOREBADROOTS );
584
591
btrfs_set_opt (ctx -> mount_opt , NOLOGREPLAY );
585
592
break ;
@@ -655,7 +662,8 @@ bool btrfs_check_options(const struct btrfs_fs_info *info, unsigned long *mount_
655
662
(check_ro_option (info , * mount_opt , BTRFS_MOUNT_NOLOGREPLAY , "nologreplay" ) ||
656
663
check_ro_option (info , * mount_opt , BTRFS_MOUNT_IGNOREBADROOTS , "ignorebadroots" ) ||
657
664
check_ro_option (info , * mount_opt , BTRFS_MOUNT_IGNOREDATACSUMS , "ignoredatacsums" ) ||
658
- check_ro_option (info , * mount_opt , BTRFS_MOUNT_IGNOREMETACSUMS , "ignoremetacsums" )))
665
+ check_ro_option (info , * mount_opt , BTRFS_MOUNT_IGNOREMETACSUMS , "ignoremetacsums" ) ||
666
+ check_ro_option (info , * mount_opt , BTRFS_MOUNT_IGNORESUPERFLAGS , "ignoresuperflags" )))
659
667
ret = false;
660
668
661
669
if (btrfs_fs_compat_ro (info , FREE_SPACE_TREE ) &&
@@ -1073,6 +1081,8 @@ static int btrfs_show_options(struct seq_file *seq, struct dentry *dentry)
1073
1081
print_rescue_option (seq , "ignoredatacsums" , & printed );
1074
1082
if (btrfs_test_opt (info , IGNOREMETACSUMS ))
1075
1083
print_rescue_option (seq , "ignoremetacsums" , & printed );
1084
+ if (btrfs_test_opt (info , IGNORESUPERFLAGS ))
1085
+ print_rescue_option (seq , "ignoresuperflags" , & printed );
1076
1086
if (btrfs_test_opt (info , FLUSHONCOMMIT ))
1077
1087
seq_puts (seq , ",flushoncommit" );
1078
1088
if (btrfs_test_opt (info , DISCARD_SYNC ))
@@ -1431,6 +1441,7 @@ static void btrfs_emit_options(struct btrfs_fs_info *info,
1431
1441
btrfs_info_if_set (info , old , IGNOREBADROOTS , "ignoring bad roots" );
1432
1442
btrfs_info_if_set (info , old , IGNOREDATACSUMS , "ignoring data csums" );
1433
1443
btrfs_info_if_set (info , old , IGNOREMETACSUMS , "ignoring meta csums" );
1444
+ btrfs_info_if_set (info , old , IGNORESUPERFLAGS , "ignoring unknown super block flags" );
1434
1445
1435
1446
btrfs_info_if_unset (info , old , NODATACOW , "setting datacow" );
1436
1447
btrfs_info_if_unset (info , old , SSD , "not using ssd optimizations" );
0 commit comments