Thread (2 messages) 2 messages, 2 authors, 2012-10-31

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

From: David Sterba <hidden>
Date: 2012-10-31 00:07:22

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;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help