]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: avoid repeatedly invoking is_zero() in CopyupRequest
authorIlya Dryomov <idryomov@gmail.com>
Mon, 22 Apr 2019 10:12:33 +0000 (12:12 +0200)
committerJason Dillaman <dillaman@redhat.com>
Sun, 18 Aug 2019 18:52:17 +0000 (14:52 -0400)
commit144e2f9c8bf0c6000dd5e045deb2fae2fb65e252
treea4d0b70f1a0230ee01ebc5c7e8c4c05ffed4e8b4
parent0c5ddc5fe34dccb002e7ab06bd0d755cb860bd37
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>
(cherry picked from commit b01133661e3bc1814f66df3de70aefd005965b27)
src/librbd/io/CopyupRequest.cc
src/librbd/io/CopyupRequest.h