mirror of
https://github.com/ceph/ceph
synced 2024-12-29 15:03:33 +00:00
osd/PrimaryLogPG: get_snapset_context: don't look on snapdir
Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
5e0d5c1213
commit
4d611cfaa6
@ -10023,15 +10023,11 @@ SnapSetContext *PrimaryLogPG::get_snapset_context(
|
||||
bufferlist bv;
|
||||
if (!attrs) {
|
||||
int r = -ENOENT;
|
||||
if (!(oid.is_head() && !oid_existed))
|
||||
if (!(oid.is_head() && !oid_existed)) {
|
||||
r = pgbackend->objects_get_attr(oid.get_head(), SS_ATTR, &bv);
|
||||
if (r < 0) {
|
||||
// try _snapset
|
||||
if (!(oid.is_snapdir() && !oid_existed))
|
||||
r = pgbackend->objects_get_attr(oid.get_snapdir(), SS_ATTR, &bv);
|
||||
if (r < 0 && !can_create)
|
||||
return NULL;
|
||||
}
|
||||
if (r < 0 && !can_create)
|
||||
return NULL;
|
||||
} else {
|
||||
assert(attrs->count(SS_ATTR));
|
||||
bv = attrs->find(SS_ATTR)->second;
|
||||
|
Loading…
Reference in New Issue
Block a user