osd: use an hex-only format for snap_id when creating snapmapper entries#59012
osd: use an hex-only format for snap_id when creating snapmapper entries#59012
Conversation
| // note: the snap_id is to be formatted as a 64-bit hex number, | ||
| // and not according to the text representation of snapid_t |
There was a problem hiding this comment.
If we create snapmapper entries only for clone objects (which I think is true), the faulty formatting shouldn't have any real impact and the fix should be ok.
It looks like OSDMonitor also uses the same casting, so that might help to rule out other objects rather than clone ones:
string OSDMonitor::make_purged_snap_key(int64_t pool, snapid_t snap)
{
char k[80];
snprintf(k, sizeof(k), "purged_snap_%llu_%016llx",
(unsigned long long)pool, (unsigned long long)snap);
return k;
}
Perhaps we should assert that snap != NOSNAP && snap != SNAPDIR before/while formatting.
There was a problem hiding this comment.
The assert() suggestion makes a lot of sense.
I'll try to verify the other points.
Thanks
i.e. - without the optional text representation of NOSNAP & SNAPDIR Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
58d208c to
547b67f
Compare
|
Looking at Teu test failure that may be related: |
From first glance that failure look unrelated to me, it's a s3 test |
|
We can close this one, cherry-picked here #58990 |
|
closed for #58990 |
i.e. - without the optional text representation of NOSNAP & SNAPDIR