Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNM: os/bluestore: improve move_ranges implementation #11561

Closed
wants to merge 6 commits into from

Conversation

liewegas
Copy link
Member

No description provided.

} else {
skip_back = 0;
}
Extent *ne = new Extent(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's consider following disposition:
e(1090) -> blob(00x1000)
mv (10~90 - > 0x2000)
it results in
skip_front = 0, skip_back = 0
ne.logical_offset = 10 + 0 + 0x2000 - 10 = 0x2000
ne.blob_offset = 10 + 0 = 10
ne.length = 90 - 0 - 0 = 90
i.e.
new extent, located at alloc unit(AU) boundary(4K) has non zero blob offset. This violates our invariant that blobs are AU aligned and IMHO might have some negative impact on subsequent operations. Makes sense?

Extent *ne = new Extent(
e.logical_offset + skip_front + dstoff - srcoff,
e.blob_offset + skip_front,
e.length - skip_front - skip_back, e.blob_depth, ep->blob);
Copy link
Contributor

@ifed01 ifed01 Oct 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt blob_depth is inherited from the old object - that's rather a matter of disposition in the new object - hence needs recalculation( max over old_extents returned by punch_hole?)

@liewegas
Copy link
Member Author

liewegas commented Oct 20, 2016 via email

@liewegas
Copy link
Member Author

liewegas commented Oct 20, 2016 via email

@athanatos
Copy link
Contributor

@liewegas Hmm, ideally not. It would mean relying on the rollforward object being sparse. I supposed that could be ok.

@liewegas
Copy link
Member Author

#11595 .. i'll rebase onto that

@liewegas liewegas force-pushed the wip-bluestore-move-ranges branch 2 times, most recently from ee3353a to 7cc150b Compare November 1, 2016 22:27
@liewegas
Copy link
Member Author

liewegas commented Nov 1, 2016

Rebased and retested; ready for review

t.move_ranges_destroy_src(cid, hoid2, hoid, move_info);
cerr << "move temp object" << std::endl;
r = apply_transaction(store, &osr, std::move(t));
ASSERT_EQ(r, 0);
Copy link
Contributor

@ifed01 ifed01 Nov 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest to add content reading and verification for moved and unaffected extents.

if (true) {
r = store->umount();
ASSERT_EQ(0, r);
r = store->fsck();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

umount/mount perform fsck with the current settings. hence we have triple fsck here

skip_back = 0;
}
Extent *ne = new Extent(
e.logical_offset + skip_front + offset - offset,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove +offset-offset

Extent *ne = new Extent(
e.logical_offset + skip_front + offset - offset,
e.blob_offset + skip_front,
e.length - skip_front - skip_back, e.blob_depth, ep->blob);
Copy link
Contributor

@ifed01 ifed01 Nov 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blob_depth can't be inherited from a source object

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
This avoids needlessly making all the blobs shared.

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas liewegas changed the title os/bluestore: improve move_ranges implementation DNM: os/bluestore: improve move_ranges implementation Nov 2, 2016
@liewegas
Copy link
Member Author

liewegas commented Nov 4, 2016

Gonna do something different.

@liewegas liewegas closed this Nov 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants