mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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: Josh Durgin <[email protected]>
This commit is contained in:
parent
d0265de7c3
commit
1c220881e3
1 changed files with 2 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue