mirror of
https://github.com/ceph/ceph
synced 2024-12-19 01:46:00 +00:00
Merge pull request #21165 from Songweibin/wip-drop-redefine-func
librbd: minor code cleanup Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
commit
5585e52c47
@ -547,11 +547,8 @@ CEPH_RBD_API int rbd_snap_set(rbd_image_t image, const char *snapname);
|
||||
CEPH_RBD_API int rbd_snap_set_by_id(rbd_image_t image, uint64_t snap_id);
|
||||
|
||||
CEPH_RBD_API int rbd_snap_get_namespace_type(rbd_image_t image,
|
||||
uint64_t snap_id,
|
||||
rbd_snap_namespace_type_t *namespace_type);
|
||||
CEPH_RBD_API int rbd_snap_get_namespace_type(rbd_image_t image,
|
||||
uint64_t snap_id,
|
||||
rbd_snap_namespace_type_t *namespace_type);
|
||||
uint64_t snap_id,
|
||||
rbd_snap_namespace_type_t *namespace_type);
|
||||
CEPH_RBD_API int rbd_snap_get_group_namespace(rbd_image_t image,
|
||||
uint64_t snap_id,
|
||||
rbd_snap_group_namespace_t *group_snap,
|
||||
|
@ -398,6 +398,10 @@ int Group<I>::remove(librados::IoCtx& io_ctx, const char *group_name)
|
||||
|
||||
std::vector<cls::rbd::GroupSnapshot> snaps;
|
||||
r = group_snap_list(io_ctx, group_name, &snaps);
|
||||
if (r < 0 && r != -ENOENT) {
|
||||
lderr(cct) << "error listing group snapshots" << dendl;
|
||||
return r;
|
||||
}
|
||||
|
||||
for (auto &snap : snaps) {
|
||||
r = group_snap_remove_by_record(io_ctx, snap, group_id, group_header_oid);
|
||||
|
@ -545,13 +545,13 @@ class PermissionError(OSError):
|
||||
class ImageNotFound(OSError):
|
||||
pass
|
||||
|
||||
class ObjectNotFound(Error):
|
||||
class ObjectNotFound(OSError):
|
||||
pass
|
||||
|
||||
class ImageExists(OSError):
|
||||
pass
|
||||
|
||||
class ObjectExists(Error):
|
||||
class ObjectExists(OSError):
|
||||
pass
|
||||
|
||||
|
||||
@ -651,8 +651,8 @@ cdef make_ex(ret, msg, exception_map=errno_to_exception):
|
||||
:returns: a subclass of :class:`Error`
|
||||
"""
|
||||
ret = abs(ret)
|
||||
if ret in errno_to_exception:
|
||||
return errno_to_exception[ret](msg, errno=ret)
|
||||
if ret in exception_map:
|
||||
return exception_map[ret](msg, errno=ret)
|
||||
else:
|
||||
return OSError(msg, errno=ret)
|
||||
|
||||
@ -1643,7 +1643,6 @@ cdef class Group(object):
|
||||
:type name: str
|
||||
|
||||
:raises: :class:`ObjectNotFound`
|
||||
:raises: :class:`ObjectExists`
|
||||
:raises: :class:`InvalidArgument`
|
||||
:raises: :class:`FunctionNotSupported`
|
||||
"""
|
||||
@ -1693,7 +1692,6 @@ cdef class Group(object):
|
||||
:type name: str
|
||||
|
||||
:raises: :class:`ObjectNotFound`
|
||||
:raises: :class:`ObjectExists`
|
||||
:raises: :class:`InvalidArgument`
|
||||
:raises: :class:`FunctionNotSupported`
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user