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

os/bluestore: refactor ExtentMap::update to avoid preceeding db updat… #12394

Merged
merged 2 commits into from Dec 22, 2016

Conversation

Projects
None yet
2 participants
@ifed01
Contributor

ifed01 commented Dec 8, 2016

…e if reshard takes place.

update method might add some 'set' ops to the transaction prior to detection that resharding is needed.
No need to apply these ops after reshard takes place - correspoding records to be removed anyway.

Signed-off-by: Igor Fedotov ifed@mirantis.com

@ifed01 ifed01 added the bluestore label Dec 8, 2016

@liewegas

I think we can simplify this: the only reason we ever call update() twice is when update() itself returns true. That means that update() itself can stage the changes and only put them in t if it is sure it won't return true. Which means this change coudl be local to update() only.. right?

Also, if we can avoid the memory allocations of map<>, that would be nice. Like, put the bufferlist in Shard, and string the dirty ones together in an intrusive_list or something. Or just put single local vector<Shard*> on the local stack or something.

@ifed01

This comment has been minimized.

Show comment
Hide comment
@ifed01

ifed01 Dec 14, 2016

Contributor

@liewegas fixed and rebased

Contributor

ifed01 commented Dec 14, 2016

@liewegas fixed and rebased

unsigned nn;
bufferlist& bl = encoded_shards[pos].bl;

This comment has been minimized.

@liewegas

liewegas Dec 14, 2016

Member

bufferlist& bl = p->dirty_bl;

@liewegas

liewegas Dec 14, 2016

Member

bufferlist& bl = p->dirty_bl;

@liewegas

This comment has been minimized.

Show comment
Hide comment
@liewegas

liewegas Dec 14, 2016

Member
Member

liewegas commented Dec 14, 2016

Igor Fedotov added some commits Dec 8, 2016

Igor Fedotov
os/bluestore: refactor ExtentMap::update to avoid preceeding db updat…
…e if reshard takes place

Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
Igor Fedotov
os/bluestore: remove redundant onode parameter in ExtentMap methods
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
@ifed01

This comment has been minimized.

Show comment
Hide comment
@ifed01

ifed01 Dec 14, 2016

Contributor

@liewegas - cleaned-up

Contributor

ifed01 commented Dec 14, 2016

@liewegas - cleaned-up

@liewegas liewegas merged commit fcbabdd into ceph:master Dec 22, 2016

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details

@ifed01 ifed01 deleted the ifed01:wip-bluestore-fix-reshard branch Dec 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment