diff options
author | Yuri Weinstein <yweinste@redhat.com> | 2024-01-18 16:39:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-18 16:39:25 +0100 |
commit | e7ccff59306a527c9b1bc6dfb965da0c2a42b501 (patch) | |
tree | 6f9027b72628c9e4a0064e2b316bbd4fcc1a3c51 | |
parent | Merge pull request #54780 from jianwei1216/log_to_syslog_main (diff) | |
parent | osd/osd/PrimaryLogPG: use should_whiteout helper in _delete_oid() (diff) | |
download | ceph-e7ccff59306a527c9b1bc6dfb965da0c2a42b501.tar.xz ceph-e7ccff59306a527c9b1bc6dfb965da0c2a42b501.zip |
Merge pull request #54973 from Matan-B/wip-matanb-should-whiteout-helper
osd/osd/PrimaryLogPG: use should_whiteout helper in _delete_oid()
Reviewed-by: Samuel Just <sjust@redhat.com>
-rw-r--r-- | src/osd/PrimaryLogPG.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 4ecbe58a1f3..ca83a563e4f 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -8186,8 +8186,7 @@ inline int PrimaryLogPG::_delete_oid( // in luminous or later, we can't delete the head if there are // clones. we trust the caller passing no_whiteout has already // verified they don't exist. - if (!snapset.clones.empty() || - (!ctx->snapc.snaps.empty() && ctx->snapc.snaps[0] > snapset.seq)) { + if (should_whiteout(snapset, ctx->snapc)) { if (no_whiteout) { dout(20) << __func__ << " has or will have clones but no_whiteout=1" << dendl; |