]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
crimson/osd: clear data_included if read fails
authorKefu Chai <kchai@redhat.com>
Sat, 15 Aug 2020 02:51:04 +0000 (10:51 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 15 Aug 2020 09:27:02 +0000 (17:27 +0800)
commit4ac4f69b4b2dfd5eb5ec837f967356804c98c84d
treee6f6fcb520bdc01d43fa05136392cc2f13b5a4ab
parent03ab02c8eee07c70879ceb2a6a8f3899bbc8c030
crimson/osd: clear data_included if read fails

* extract read_object_for_push_op() out of build_push_op().
  build_push_op() is composed of multiple steps. would be better
  if we can split and extract them into separated method for better
  readability
* clear push_op->data_included() if fiemap fails. before this change,
  a local copy of `copy_subset` is cleared if fiemap fails, but
  push_op->data_included is not updated in this case. we should
  clear the latter if no data is returned in push_op->data. so,
  in this change, push_op->data_included is cleared if fiemap
  fails. the same applies to other cases where no data is returned in
  push_op
* add comments to outline the steps in read_object_for_push_op().

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/replicated_recovery_backend.cc
src/crimson/osd/replicated_recovery_backend.h