summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <samuel.just@dreamhost.com>2011-09-02 14:30:48 -0700
committerSamuel Just <samuel.just@dreamhost.com>2011-09-02 15:06:36 -0700
commit8be7f04362bf66a3d02fc42c2cfb6add805c60eb (patch)
tree97a5ef779e3b38645a5b495ba54bc4da1732b04d
parent88d73eee235d6c7ad8c46140e55953d04f5d7345 (diff)
downloadceph-8be7f04362bf66a3d02fc42c2cfb6add805c60eb.tar.gz
PG: Also fix the key when fixing an incomplete log event
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
-rw-r--r--src/osd/PG.cc1
-rw-r--r--src/osd/PG.h4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc
index c0f383b6e0f..d77639c2a3b 100644
--- a/src/osd/PG.cc
+++ b/src/osd/PG.cc
@@ -2250,6 +2250,7 @@ void PG::read_log(ObjectStore *store)
++i) {
if (i->oid == e.soid.oid && i->snap == e.soid.snap) {
e.soid.hash = i->hash;
+ e.soid.key = i->key;
found = true;
break;
}
diff --git a/src/osd/PG.h b/src/osd/PG.h
index 61e8778fd14..d5f810d5130 100644
--- a/src/osd/PG.h
+++ b/src/osd/PG.h
@@ -393,7 +393,7 @@ public:
}
void encode(bufferlist &bl) const {
- __u8 struct_v = 2;
+ __u8 struct_v = 3;
::encode(struct_v, bl);
::encode(op, bl);
::encode(soid, bl);
@@ -417,6 +417,8 @@ public:
} else {
::decode(soid, bl);
}
+ if (struct_v < 3)
+ invalid_hash = true;
::decode(version, bl);
::decode(prior_version, bl);
::decode(reqid, bl);