Skip to contentSkip to conversation

rbd: reacquire lock should update lock owner client id

PATCH In review Florian Margaine 2 participants 2 messages Dec 13, 2017 – Jan 12, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rbd: reacquire lock should update lock owner client id

Otherwise, future operations on this RBD using exclusive-lock are going to require the lock from a non-existent client id.

This ports commit 475dda114a7e25b43dc9066b9808a64fc0c6dc89 from librbd to krbd.

---
 drivers/block/rbd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/block/rbd.c +1 -0
index adc877dfef5c..4e2acf9c81af 100644
@@ -3884,6 +3884,7 @@ static void rbd_reacquire_lock(struct rbd_device *rbd_dev)
 					   &rbd_dev->lock_dwork, 0);
 	} else {
 		strcpy(rbd_dev->lock_cookie, cookie);
+		queue_work(rbd_dev->task_wq, &rbd_dev->acquired_lock_work);
 	}
 }
 
Signature · 1 line
2.14.3
maintainer
#1 lore raw
Quoted 16 lines · Florian Margaine

Otherwise, future operations on this RBD using exclusive-lock are going to require the lock from a non-existent client id.

This ports commit 475dda114a7e25b43dc9066b9808a64fc0c6dc89 from librbd to krbd.

---
 drivers/block/rbd.c | 1 +
 1 file changed, 1 insertion(+)
drivers/block/rbd.c +0 -0
index adc877dfef5c..4e2acf9c81af 100644

drivers/block/rbd.c static void rbd_reacquire_lock(struct rbd_device *rbd_dev) · line 3889

Quoted 6 lines
drivers/block/rbd.c +1 -0
@@ -3884,6 +3884,7 @@ static void rbd_reacquire_lock(struct rbd_device *rbd_dev)
                                           &rbd_dev->lock_dwork, 0);
        } else {
                strcpy(rbd_dev->lock_cookie, cookie);
+               queue_work(rbd_dev->task_wq, &rbd_dev->acquired_lock_work);
        }
 }

Hi Florian,

Just wanted to let you know that this patch has been merged into 4.15, with a minor modification:

    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=edd8ca8015800b354453b891d38960f3a474b7e4

Thanks,

Ilya