projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0265de
)
rbd: make discard trigger copy-on-write
author
Josh Durgin
<josh.durgin@inktank.com>
Sat, 5 Apr 2014 00:49:12 +0000
(17:49 -0700)
committer
Ilya Dryomov
<idryomov@redhat.com>
Tue, 14 Oct 2014 17:03:34 +0000
(21:03 +0400)
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 <josh.durgin@inktank.com>
drivers/block/rbd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/block/rbd.c
b/drivers/block/rbd.c
index 835a96a09a6b13475e18e8067a0b11edcceda87d..6fb93cd6957f5281f77a47861175a92453948aaf 100644
(file)
--- a/
drivers/block/rbd.c
+++ b/
drivers/block/rbd.c
@@
-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 */