提交 1c220881 编写于 作者: J Josh Durgin 提交者: Ilya Dryomov

rbd: make discard trigger copy-on-write

Discard requests are a form of write, so they should go through the
same process as plain write requests and trigger copy-on-write for
layered images.
Signed-off-by: NJosh Durgin <josh.durgin@inktank.com>
上级 d0265de7
......@@ -2851,7 +2851,8 @@ static bool img_obj_request_simple(struct rbd_obj_request *obj_request)
rbd_dev = img_request->rbd_dev;
/* Reads */
if (!img_request_write_test(img_request))
if (!img_request_write_test(img_request) &&
!img_request_discard_test(img_request))
return true;
/* Non-layered writes */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册