Skip to content

lib/blobstore: fix real clones check#71

Merged
tiagolobocastro merged 2 commits intov25.05.x-mayastorfrom
fix-snap-clone
Apr 16, 2026
Merged

lib/blobstore: fix real clones check#71
tiagolobocastro merged 2 commits intov25.05.x-mayastorfrom
fix-snap-clone

Conversation

@tiagolobocastro
Copy link
Copy Markdown
Member

The presence of the clone source uuid is not sufficient to check if a blob is clone of a snapshot, as it may be a clone of another snapshot.

So now we check if the source uuid matches the snapshot itself.

The presence of the clone source uuid is not sufficient to check
if a blob is clone of a snapshot, as it may be a clone of another
snapshot.

So now we check if the source uuid matches the snapshot itself.

We also iterate the entire snapshot chain for clones, and not just
the immediate ones.

Change-Id: Ida00901debb60abad6801449688ddf6411fb1308
Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
Iterates the blob tree itself, and inspects the blob xattr to find out
if the blob is a clone of our source snapshot.

This avoids iterating the snapshot list multiple times, which is what
destroyes the performance of the previous commit.

If we could modify the snapshot tree to be rb as well, we could probably
revert back to the previous commit's approach.

Change-Id: Ie542091b92a02365a7022f621550e52adfb8cbea
Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
@tiagolobocastro tiagolobocastro merged commit 5452841 into v25.05.x-mayastor Apr 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants