mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
librbd: snap_get_limit compatibility check
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
This commit is contained in:
parent
b0b8c5a9bf
commit
c1f374ef6c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user