]> git.apps.os.sepia.ceph.com Git - ceph-ci.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)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 24 Apr 2019 15:45:53 +0000 (17:45 +0200)
commitb01133661e3bc1814f66df3de70aefd005965b27
treeb1dacdef3aa9a60f9837c96d1d83027b4e5884b4
parentb098cc9fd84abef9fab774aa5b7666967db05011
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>
src/librbd/io/CopyupRequest.cc
src/librbd/io/CopyupRequest.h