]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/vol: keep clone source info even after cloning is finished
authorRishabh Dave <ridave@redhat.com>
Thu, 8 May 2025 15:05:39 +0000 (20:35 +0530)
committerRishabh Dave <ridave@redhat.com>
Thu, 12 Jun 2025 13:22:31 +0000 (18:52 +0530)
Instead of removing the information regarding source of a cloned
subvolume from the .meta file after the cloning has finished, keep it as
it is as the user may find it useful.

Fixes: https://tracker.ceph.com/issues/71266
Signed-off-by: Rishabh Dave <ridave@redhat.com>
src/pybind/mgr/volumes/fs/async_cloner.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py

index 222bb577d673b5f32edfb2bc8b17c3838b73ce84..6fe2523ad2d86c23e87fc57d11491463391fc8a2 100644 (file)
@@ -273,7 +273,6 @@ def handle_clone_complete(fs_client, volspec, volname, index, groupname, subvoln
         with open_clone_subvol_pair_in_vol(fs_client, volspec, volname,
                 groupname, subvolname) as (subvol0, subvol1, subvol2):
             subvol1.detach_snapshot(subvol2, index)
-            subvol0.remove_clone_source(flush=True)
     except (MetadataMgrException, VolumeException) as e:
         log.error("failed to detach clone from snapshot: {0}".format(e))
     return (None, True)
index a4aceb3a76754c5eb64e0a8cce271a50a9670a17..ac7952726a362803e8f065ff127603788fea56d3 100644 (file)
@@ -138,11 +138,6 @@ class SubvolumeV1(SubvolumeBase, SubvolumeTemplate):
         if flush:
             self.metadata_mgr.flush()
 
-    def remove_clone_source(self, flush=False):
-        self.metadata_mgr.remove_section("source")
-        if flush:
-            self.metadata_mgr.flush()
-
     def add_clone_failure(self, errno, error_msg):
         try:
             self.metadata_mgr.add_section(MetadataManager.CLONE_FAILURE_SECTION)