Skip to content

Commit bbacfda

Browse files
mgr/vol: keep clone source info even after cloning is finished
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 <[email protected]>
1 parent 452585e commit bbacfda

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/pybind/mgr/volumes/fs/async_cloner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ def handle_clone_complete(fs_client, volspec, volname, index, groupname, subvoln
273273
with open_clone_subvol_pair_in_vol(fs_client, volspec, volname,
274274
groupname, subvolname) as (subvol0, subvol1, subvol2):
275275
subvol1.detach_snapshot(subvol2, index)
276-
subvol0.remove_clone_source(flush=True)
277276
except (MetadataMgrException, VolumeException) as e:
278277
log.error("failed to detach clone from snapshot: {0}".format(e))
279278
return (None, True)

src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,6 @@ def add_clone_source(self, volname, subvolume, snapname, flush=False):
138138
if flush:
139139
self.metadata_mgr.flush()
140140

141-
def remove_clone_source(self, flush=False):
142-
self.metadata_mgr.remove_section("source")
143-
if flush:
144-
self.metadata_mgr.flush()
145-
146141
def add_clone_failure(self, errno, error_msg):
147142
try:
148143
self.metadata_mgr.add_section(MetadataManager.CLONE_FAILURE_SECTION)

0 commit comments

Comments
 (0)