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;