summaryrefslogtreecommitdiff
path: root/drivers/block/rbd.c
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2016-09-29 14:23:12 +0200
committerIlya Dryomov <idryomov@gmail.com>2016-10-15 23:22:09 +0200
commit4d73644bc3d76dd161a84e3849c6f2c9c01c4ba7 (patch)
tree79f203946794f37fe21e7eb6ba4c9971b6f8c16c /drivers/block/rbd.c
parent87c0fded852ae20bddb7833da6ead082404de86a (diff)
rbd: don't retry watch reregistration if header object is gone
If the header object gets deleted (perhaps along with the entire pool), there is no point in attempting to reregister the watch. Treat this the same as blacklisting: fail all pending and new I/Os requiring the lock. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r--drivers/block/rbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 633e8c2ea120..7b274ff4632c 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -3944,7 +3944,7 @@ static void rbd_reregister_watch(struct work_struct *work)
ret = __rbd_register_watch(rbd_dev);
if (ret) {
rbd_warn(rbd_dev, "failed to reregister watch: %d", ret);
- if (ret == -EBLACKLISTED) {
+ if (ret == -EBLACKLISTED || ret == -ENOENT) {
set_bit(RBD_DEV_FLAG_BLACKLISTED, &rbd_dev->flags);
need_to_wake = true;
} else {