diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2019-04-22 12:12:33 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-04-24 17:45:53 +0200 |
commit | b01133661e3bc1814f66df3de70aefd005965b27 (patch) | |
tree | b1dacdef3aa9a60f9837c96d1d83027b4e5884b4 /src/librbd/io/CopyupRequest.h | |
parent | Merge pull request #27695 from dillaman/wip-39072 (diff) | |
download | ceph-b01133661e3bc1814f66df3de70aefd005965b27.tar.xz ceph-b01133661e3bc1814f66df3de70aefd005965b27.zip |
librbd: avoid repeatedly invoking is_zero() in CopyupRequest
Invoke is_zero() just once, either in handle_read_from_parent() or
handle_deep_copy().
Initialize m_copyup_is_zero to true to preserve existing behavior:
on an empty bufferlist is_zero() returns true.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | src/librbd/io/CopyupRequest.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librbd/io/CopyupRequest.h b/src/librbd/io/CopyupRequest.h index c30d5d409cb..55eb5948bcb 100644 --- a/src/librbd/io/CopyupRequest.h +++ b/src/librbd/io/CopyupRequest.h @@ -87,6 +87,7 @@ private: bool m_deep_copy = false; bool m_flatten = false; bool m_copyup_required = true; + bool m_copyup_is_zero = true; ceph::bufferlist m_copyup_data; |