From 94b25662c51696ec081494e69efb5896566dede2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arkadiusz=20Buba=C5=82a?= Date: Thu, 6 Jul 2017 17:38:24 +0200 Subject: [PATCH] Reschedule processes on -ERESTARTSYS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On the single core machine the system may hang when the spa_namespare_lock acquisition fails in the zvol_first_open function. It returns -ERESTARTSYS error what causes the endless loop in __blkdev_get function. Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Signed-off-by: Arkadiusz BubaƂa Closes #6283 Closes #6312 --- module/zfs/zvol.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index 3e9f004ef3..4f1601ec63 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -1358,6 +1358,8 @@ out_mutex: mutex_exit(&zv->zv_state_lock); if (drop_suspend) rw_exit(&zv->zv_suspend_lock); + if (error == -ERESTARTSYS) + schedule(); return (SET_ERROR(error)); }