-
-
Save seletskiy/b5ac103852367f1afcf4 to your computer and use it in GitHub Desktop.
Deadlock reproducer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c | |
index fa5c7eb..0b318d4 100644 | |
--- a/module/zfs/zvol.c | |
+++ b/module/zfs/zvol.c | |
@@ -46,6 +46,7 @@ | |
#include <sys/zfs_znode.h> | |
#include <sys/zvol.h> | |
#include <linux/blkdev_compat.h> | |
+#include <linux/delay_compat.h> | |
unsigned int zvol_inhibit_dev = 0; | |
unsigned int zvol_major = ZVOL_MAJOR; | |
@@ -1331,6 +1332,9 @@ __zvol_snapdev_hidden(const char *name) | |
(void) strlcpy(parent, name, MAXPATHLEN); | |
if ((atp = strrchr(parent, '@')) != NULL) { | |
+ printk(KERN_INFO "ZFS: sleeping for some time here\n"); | |
+ msleep(30 * 1000); | |
+ printk(KERN_INFO "ZFS: ok, waking up\n"); | |
*atp = '\0'; | |
error = dsl_prop_get_integer(parent, "snapdev", &snapdev, NULL); | |
if ((error == 0) && (snapdev == ZFS_SNAPDEV_HIDDEN)) | |
@@ -1354,6 +1358,8 @@ __zvol_create_minor(const char *name, boolean_t ignore_snapdev) | |
ASSERT(MUTEX_HELD(&zvol_state_lock)); | |
+ printk(KERN_INFO "ZFS: hello from __zvol_create_minor! minor name: %s\n", name); | |
+ | |
zv = zvol_find_by_name(name); | |
if (zv) { | |
error = SET_ERROR(EEXIST); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment