On Mon, Mar 04, 2013 at 04:37:06PM -0600, Carey Underwood wrote: > Device scanning waits on the uuid_mutex, which can result in a very long > wait if dev delete is shrinking the device. > > + mutex_unlock(&uuid_mutex); > ret = btrfs_shrink_device(device, 0); > + mutex_lock(&uuid_mutex); > if (ret) > goto error_undo; I didn't find any problem with this change, but it's not quite clear to me what exactly does the uuid_mutex protect, so I've tried a best-guess approach and looked at all uses and git history. If there are multiple device rm operations called at the same time, they'll get serialized with the uuid mutex and the device count will be properly protected. Consider it Reviewed-by: David Sterba <dsterba@xxxxxxx> david -- 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
