]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: don't use public API flags in Group::snap_create() 62464/head
authorIlya Dryomov <idryomov@gmail.com>
Fri, 21 Mar 2025 13:49:44 +0000 (14:49 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 24 Mar 2025 15:53:10 +0000 (16:53 +0100)
Use internal flags obtained from snap_create_flags_api_to_internal()
instead -- internal_flags variable was assigned but not used.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/librbd/api/Group.cc

index 94d5cdfa847574af4b6a66d8bd2efd96a32a8f6f..22e3ba86757da5caeff6e47920aa244f0f4696db 100644 (file)
@@ -922,8 +922,6 @@ int Group<I>::snap_create(librados::IoCtx& group_ioctx,
   if (r < 0) {
     return r;
   }
-  internal_flags &= ~(SNAP_CREATE_FLAG_SKIP_NOTIFY_QUIESCE |
-                      SNAP_CREATE_FLAG_IGNORE_NOTIFY_QUIESCE_ERROR);
 
   r = cls_client::dir_get_id(&group_ioctx, RBD_GROUP_DIRECTORY, group_name,
                              &group_id);
@@ -1012,10 +1010,11 @@ int Group<I>::snap_create(librados::IoCtx& group_ioctx,
     goto remove_record;
   }
 
-  if ((flags & RBD_SNAP_CREATE_SKIP_QUIESCE) == 0) {
+  if ((internal_flags & SNAP_CREATE_FLAG_SKIP_NOTIFY_QUIESCE) == 0) {
     ldout(cct, 20) << "Sending quiesce notification" << dendl;
     ret_code = notify_quiesce(ictxs, prog_ctx, &quiesce_requests);
-    if (ret_code != 0 && (flags & RBD_SNAP_CREATE_IGNORE_QUIESCE_ERROR) == 0) {
+    if (ret_code != 0 &&
+        (internal_flags & SNAP_CREATE_FLAG_IGNORE_NOTIFY_QUIESCE_ERROR) == 0) {
       goto remove_record;
     }
   }