diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-08-30 09:09:54 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-08-30 09:09:54 -0700 |
commit | fbcb0b4feb5c3f5431a2ed9f0211653864cf2104 (patch) | |
tree | b0558ea758408c579bd62b31940f3480d4f3da1c /drivers | |
parent | 0d70787b65941a8db36fd2c35d25c93178f8b545 (diff) | |
parent | d435c9a7b85be1e820668d2f3718c2d9f24d5548 (diff) |
Merge tag 'ceph-for-5.3-rc7' of git://github.com/ceph/ceph-client
Pull two ceph fixes from Ilya Dryomov:
"A fix for a -rc1 regression in rbd and a trivial static checker fix"
* tag 'ceph-for-5.3-rc7' of git://github.com/ceph/ceph-client:
rbd: restore zeroing past the overlap when reading from parent
libceph: don't call crypto_free_sync_skcipher() on a NULL tfm
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/rbd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 3327192bb71f..c8fb886aebd4 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -3038,6 +3038,17 @@ again: } return true; case RBD_OBJ_READ_PARENT: + /* + * The parent image is read only up to the overlap -- zero-fill + * from the overlap to the end of the request. + */ + if (!*result) { + u32 obj_overlap = rbd_obj_img_extents_bytes(obj_req); + + if (obj_overlap < obj_req->ex.oe_len) + rbd_obj_zero_range(obj_req, obj_overlap, + obj_req->ex.oe_len - obj_overlap); + } return true; default: BUG(); |