Re: [PATCH] Btrfs: don't allow degraded mount if too many devices are missing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Patch looks ok, juste one thing that caught my attention (and does not block
the patch)

a bit of context:

1224                 if (fs_info->fs_devices->rw_devices == 0) {
1225                         ret = -EACCES;
1226                         goto restore;
1227                 }

> +		if (fs_info->fs_devices->missing_devices >
> +		     fs_info->num_tolerated_disk_barrier_failures &&
> +		    !(*flags & MS_RDONLY)) {
> +			printk(KERN_WARNING
> +			       "Btrfs: too many missing devices, writeable remount is not allowed\n");
> +			ret = -EACCES;

the error code is strange, but it also appears above and has been there for
ages. We're not checking any sort of permissions so this looks confusing,
probably EINVAL or EPERM ?

> +			goto restore;
> +		}
> +
>  		if (btrfs_super_log_root(fs_info->super_copy) != 0) {
>  			ret = -EINVAL;
>  			goto restore;
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux