[pve-devel] rbd: don't assert on writes to snapshots

Kitt kitt at ambersky.org
Tue Jul 16 22:50:57 CEST 2019


Hello.

Would it be possible to add this patch to the bionic and dingo kernels and
fix the ceph snapshot hang issue?

Diff:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/drivers/block/rbd.c?id=b91a7bdca4439e286f26cdd6c15ed338e6a9fda2

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 99de7166bf89..e5009a34f9c2 100644
--- a/drivers/block/rbd.c
<https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/block/rbd.c?id=a32e414325c2f0d430436e4708a33c756b082fd8>
+++ b/drivers/block/rbd.c
<https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/block/rbd.c?id=b91a7bdca4439e286f26cdd6c15ed338e6a9fda2>
@@ -3842,8 +3842,12 @@ static void rbd_queue_workfn(struct work_struct
*work)
goto err_rq;
}
- rbd_assert(op_type == OBJ_OP_READ ||
- rbd_dev->spec->snap_id == CEPH_NOSNAP);
+ if (op_type != OBJ_OP_READ && rbd_dev->spec->snap_id != CEPH_NOSNAP) {
+ rbd_warn(rbd_dev, "%s on read-only snapshot",
+ obj_op_name(op_type));
+ result = -EIO;
+ goto err;
+ }
/*
* Quit early if the mapped snapshot no longer exists. It's

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

Ceph bug notes: https://tracker.ceph.com/issues/39010

Proxmox bugzilla: https://bugzilla.proxmox.com/show_bug.cgi?id=1911


Thank you.

-- 
-Kitt



More information about the pve-devel mailing list