mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
rbd: skip the copyup when an entire object writing
It need to copyup the parent's content when layered writing, but an entire object write would overwrite it, so skip it. Signed-off-by: Guangliang Zhao <[email protected]> Reviewed-by: Josh Durgin <[email protected]> Reviewed-by: Alex Elder <[email protected]>
This commit is contained in:
parent
70d045f660
commit
c622d22615
1 changed files with 8 additions and 0 deletions
|
|
@ -2769,6 +2769,14 @@ static bool img_obj_request_simple(struct rbd_obj_request *obj_request)
|
|||
if (!obj_request_overlaps_parent(obj_request))
|
||||
return true;
|
||||
|
||||
/*
|
||||
* Entire-object layered writes - we will overwrite whatever
|
||||
* parent data there is anyway.
|
||||
*/
|
||||
if (!obj_request->offset &&
|
||||
obj_request->length == rbd_obj_bytes(&rbd_dev->header))
|
||||
return true;
|
||||
|
||||
/*
|
||||
* If the object is known to already exist, its parent data has
|
||||
* already been copied.
|
||||
|
|
|
|||
Loading…
Reference in a new issue