Skip to content

os/bluestore: fix writes that span existing shard boundaries - #11451

Merged
liewegas merged 2 commits into
ceph:masterfrom
liewegas:wip-bluestore-reshard-fixes
Oct 13, 2016
Merged

liewegas merged 2 commits into
ceph:masterfrom
liewegas:wip-bluestore-reshard-fixes

Conversation

@liewegas

@liewegas liewegas commented Oct 12, 2016 •

Copy link
Copy Markdown
Member

For now I take the simple strategy and force a reshard if we happen to write across a boundary. I susepct the optimal solution is a bit more nuanced. For example, big writes could be split, but small writes probably shouldn't be. Or, better yet, this sort of write could just move the shard boundary over, or otherwise trigger a partial reshard. I'm happy leaving that for future work, though!

Comment thread src/os/bluestore/BlueStore.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Put that at function entrance to cover returns from the mid of the func?

Comment thread src/os/bluestore/BlueStore.h Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

seek_shard returns int

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

handling for not found shard? Or assert(s>=0) if this is unexpected.

Comment thread src/os/bluestore/BlueStore.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

replace with if( !needs_reshard && spans_shard....)?

@ifed01

ifed01 commented Oct 13, 2016

Copy link
Copy Markdown
Contributor

LGTM except mentioned nits

A new write may create a new lextent that spans an
existing shard boundary.  If that happens, set a flag
so that we force a reshard when the onode is written.

Signed-off-by: Sage Weil <[email protected]>
@liewegas
liewegas force-pushed the wip-bluestore-reshard-fixes branch from 3e42dfa to c908cae Compare October 13, 2016 13:42
@liewegas
liewegas merged commit 37c27f0 into ceph:master Oct 13, 2016
@liewegas
liewegas deleted the wip-bluestore-reshard-fixes branch October 13, 2016 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants