rbd: reacquire lock should update lock owner client id
diff mbox

Message ID 87tvwumy4g.fsf@platform.sh
State New
Headers show

Commit Message

Florian Margaine Dec. 13, 2017, 3:43 p.m. UTC
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.

Signed-off-by: Florian Margaine <florian@platform.sh>
---
 drivers/block/rbd.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ilya Dryomov Jan. 12, 2018, 7:37 a.m. UTC | #1
On Wed, Dec 13, 2017 at 4:43 PM, Florian Margaine <florian@platform.sh> wrote:
> 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.
>
> Signed-off-by: Florian Margaine <florian@platform.sh>
> ---
>  drivers/block/rbd.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index adc877dfef5c..4e2acf9c81af 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -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
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index adc877dfef5c..4e2acf9c81af 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -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);
 	}
 }