Skip to content

Commit

Permalink
rbd: snap_get_limit compatibility check
Browse files Browse the repository at this point in the history
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
  • Loading branch information
Mykola Golub committed Nov 3, 2016
1 parent b0b8c5a commit 0504201
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 0504201

Please sign in to comment.