Skip to content

Commit

Permalink
objclass: fix cls_get_snapset_seq for cache tier case
Browse files Browse the repository at this point in the history
Signed-off-by: Mykola Golub <[email protected]>
  • Loading branch information
trociny committed Feb 19, 2019
1 parent 5e951cd commit 8ac8cac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/objclass/class_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,8 @@ void cls_cxx_subop_version(cls_method_context_t hctx, string *s)

int cls_get_snapset_seq(cls_method_context_t hctx, uint64_t *snap_seq) {
PrimaryLogPG::OpContext *ctx = *(PrimaryLogPG::OpContext **)hctx;
if (!ctx->new_obs.exists) {
if (!ctx->new_obs.exists || (ctx->new_obs.oi.is_whiteout() &&
ctx->obc->ssc->snapset.clones.empty())) {
return -ENOENT;
}
*snap_seq = ctx->obc->ssc->snapset.seq;
Expand Down

0 comments on commit 8ac8cac

Please sign in to comment.