-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change adds a patch that reverts a change to the Linux kernel that was intended to clean-up some internal behavior. Unfortunately, ZFS currently relies on this behavior to perform correctly. Without this patch, zvol links might not be created correctly due to a race condition. See #183 for more information about this issue.
- Loading branch information
1 parent
9614ffe
commit 23230a1
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
debian/patches/pve/0006-Revert-block-remove-the-ERESTARTSYS-handling-in-blkd.patch
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From 92557ee787b409ab4e0cec33d13b483ef80e6d6e Mon Sep 17 00:00:00 2001 | ||
From: Fabian Mastenbroek <[email protected]> | ||
Date: Mon, 8 Nov 2021 17:16:32 +0100 | ||
Subject: [PATCH] Revert "block: remove the -ERESTARTSYS handling in | ||
blkdev_get_by_dev" | ||
|
||
This reverts commit a8ed1a0607cfa5478ff6009539f44790c4d0956d. | ||
--- | ||
block/bdev.c | 6 ++++++ | ||
1 file changed, 6 insertions(+) | ||
|
||
diff --git a/block/bdev.c b/block/bdev.c | ||
index 485a258b0ab3..f93165f05987 100644 | ||
--- a/block/bdev.c | ||
+++ b/block/bdev.c | ||
@@ -800,6 +800,10 @@ struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode, void *holder) | ||
if (ret) | ||
return ERR_PTR(ret); | ||
|
||
+ /* | ||
+ * If we lost a race with 'disk' being deleted, try again. See md.c. | ||
+ */ | ||
+retry: | ||
bdev = blkdev_get_no_open(dev); | ||
if (!bdev) | ||
return ERR_PTR(-ENXIO); | ||
@@ -852,6 +856,8 @@ struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode, void *holder) | ||
disk_unblock_events(disk); | ||
put_blkdev: | ||
blkdev_put_no_open(bdev); | ||
+ if (ret == -ERESTARTSYS) | ||
+ goto retry; | ||
return ERR_PTR(ret); | ||
} | ||
EXPORT_SYMBOL(blkdev_get_by_dev); | ||
-- | ||
2.33.1 | ||
|
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