Skip to content

Commit

Permalink
Merge pull request #11766 from trociny/wip-rbd-info-fix-upgrade-client
Browse files Browse the repository at this point in the history
librbd: snap_get_limit compatibility check

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
  • Loading branch information
Jason Dillaman committed Nov 5, 2016
2 parents 4f1070c + c1f374e commit 8adf384
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/librbd/internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1774,8 +1774,13 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,

int snap_get_limit(ImageCtx *ictx, uint64_t *limit)
{
return cls_client::snapshot_get_limit(&ictx->md_ctx, ictx->header_oid,
limit);
int r = cls_client::snapshot_get_limit(&ictx->md_ctx, ictx->header_oid,
limit);
if (r == -EOPNOTSUPP) {
*limit = UINT64_MAX;
r = 0;
}
return r;
}

int snap_set_limit(ImageCtx *ictx, uint64_t limit)
Expand Down

0 comments on commit 8adf384

Please sign in to comment.