Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
os/bluestore: refactor ExtentMap::update to avoid preceeding db updat… #12394
…e if reshard takes place.
update method might add some 'set' ops to the transaction prior to detection that resharding is needed.
Signed-off-by: Igor Fedotov email@example.com
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.