@@ -3563,6 +3565,12 @@ int write_all_supers(struct btrfs_fs_info *fs_info, int max_mirrors) sb = fs_info->super_for_commit; dev_item = &sb->dev_item;+ if (btrfs_check_super_valid(fs_info, sb, -1)) {+ btrfs_err(fs_info, + "superblock corruption detected before transaction commitment"); + return -EUCLEAN; + } + mutex_lock(&fs_info->fs_devices->device_list_mutex); head = &fs_info->fs_devices->devices; max_errors = btrfs_super_num_devices(fs_info->super_copy) - 1;
With patch 1/3 (incompat feature checks) now this set as a whole address my concern that I explained earlier. I am ok with this approach. Thanks, Anand -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
