Repository navigation
osd: kill snapdirs - #17579
osd: kill snapdirs#17579
Conversation
There was a problem hiding this comment.
i don't think that we can assume the existence of oi here. as we could have nonexistent or corrupted OI_ATTR.
There was a problem hiding this comment.
if snapset does not exist, we should always let last_backfill_started point to check. see db798d9
There was a problem hiding this comment.
nit, might want to keep the question mark.
There was a problem hiding this comment.
is_snap() considers snap = 0 as a clone, but we don't do so before. the snap id starts from 2. so i guess it's fine. but could you double check this?
There was a problem hiding this comment.
yeah, snap == 0 can never happen.
There was a problem hiding this comment.
nit, could take this chance to use ranged-for loop.
There was a problem hiding this comment.
nit, could just put:
set<snapid_t> old_snaps(citer->second.begin(), citer->second.end());There was a problem hiding this comment.
use emplace() to save a ctor for temporary vector instance returned by snapset.clone_snaps[coid.snap], like:
snapset.clone_snaps.emplace(
coid.snap,
vector<snapid_t>(new_snaps.rbegin(),new_snaps.rend()));There was a problem hiding this comment.
actually no, we are replacing an existing member, so emplace won't work.
|
note to myself, should start from "osd/PrimaryLogPG: trim_object: simplify a bit more for post-snapdir" (inclusive) next time. |
c14aac5 to
6e1d184
Compare
|
Addressed your comments so far, retesting! |
6e1d184 to
05b3695
Compare
There was a problem hiding this comment.
we might want to backport this if this is a bug fix.
There was a problem hiding this comment.
I think it's pretty harmless... I'd rather not backport it for risk of some unforeseen side-effect.
There was a problem hiding this comment.
might want to revise the commit message, s/can/can't/
There was a problem hiding this comment.
need to check oi before dereferencing it.
Signed-off-by: Sage Weil <[email protected]>
Signed-off-by: Sage Weil <[email protected]>
Signed-off-by: Sage Weil <[email protected]>
Signed-off-by: Sage Weil <[email protected]>
Signed-off-by: Sage Weil <[email protected]>
Signed-off-by: Sage Weil <[email protected]>
Signed-off-by: Sage Weil <[email protected]>
The SnapSet will now never be 'legacy'. Signed-off-by: Sage Weil <[email protected]>
- we neither need to delete or create snapdir objects - snapset is only ever written to head; move bufferlist bss and encode call there - drop legacy_snapset encoding path Signed-off-by: Sage Weil <[email protected]>
The object never exists; no need to look for it. Signed-off-by: Sage Weil <[email protected]>
Signed-off-by: Sage Weil <[email protected]>
We don't care about these any more. Signed-off-by: Sage Weil <[email protected]>
Signed-off-by: Sage Weil <[email protected]>
Phew! Signed-off-by: Sage Weil <[email protected]>
Signed-off-by: Sage Weil <[email protected]>
Signed-off-by: Sage Weil <[email protected]>
…ool names There was a baked-in assumption that the first pool was <20 chars. No more! Signed-off-by: Sage Weil <[email protected]>
Signed-off-by: Sage Weil <[email protected]>
…pper Signed-off-by: Sage Weil <[email protected]>
This was added two years ago by b61f3e4, but I can see why it is needed here. The test case for that original bug (from a3442cf) passes fine. Signed-off-by: Sage Weil <[email protected]>
Some cache ops do writes, but none of them *create* objects, so we should not set can_create. Signed-off-by: Sage Weil <[email protected]>
703d08a to
c065ef4
Compare
snapdir concept was removed in: ceph#17579 Co-authored-by: Zac Dover <[email protected]> Signed-off-by: Matan Breizman <[email protected]>
snapdir concept was removed in: ceph#17579 Co-authored-by: Zac Dover <[email protected]> Signed-off-by: Matan Breizman <[email protected]>
snapdir concept was removed in: ceph#17579 Co-authored-by: Zac Dover <[email protected]> Signed-off-by: Matan Breizman <[email protected]> (cherry picked from commit 6a7f2b0)
snapdir concept was removed in: ceph#17579 Co-authored-by: Zac Dover <[email protected]> Signed-off-by: Matan Breizman <[email protected]> (cherry picked from commit 6a7f2b0)
snapdir concept was removed in: ceph#17579 Co-authored-by: Zac Dover <[email protected]> Signed-off-by: Matan Breizman <[email protected]> (cherry picked from commit 6a7f2b0)
snapdir concept was removed in: ceph#17579 Co-authored-by: Zac Dover <[email protected]> Signed-off-by: Matan Breizman <[email protected]> (cherry picked from commit 2ebf181)
These are gone after luminous. This rips out all of the compat code from the
conversion and also simplifies most of hte original code now that head is
always present.
I think SnapSetContext could probably also be removed (use head obc instead),
but haven't tackled that one yet.
Broken into small patches to make each change easier to review. This will need
a careful look!