mirror of
https://github.com/ceph/ceph
synced 2025-01-11 05:29:51 +00:00
osd: zero ondisklog pointers when starting pg deletion
This fixes a problem where the osd stops part way through pg cleanup. It seens the old ondisklog bounds, but then fails to load the log, and crashes on startup. We just need to zero the ondisklog bounds when we zero the log. Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
16c0fea256
commit
e986721b06
@ -3821,6 +3821,7 @@ void OSD::_remove_pg(PG *pg)
|
||||
// reset log, last_complete, in case deletion gets canceled
|
||||
pg->info.last_complete = eversion_t();
|
||||
pg->log.zero();
|
||||
pg->ondisklog.zero();
|
||||
|
||||
{
|
||||
ObjectStore::Transaction *t = new ObjectStore::Transaction;
|
||||
|
@ -480,6 +480,12 @@ public:
|
||||
uint64_t length() { return head - tail; }
|
||||
bool trim_to(eversion_t v, ObjectStore::Transaction& t);
|
||||
|
||||
void zero() {
|
||||
tail = 0;
|
||||
head = 0;
|
||||
block_map.clear();
|
||||
}
|
||||
|
||||
void encode(bufferlist& bl) const {
|
||||
__u8 struct_v = 1;
|
||||
::encode(struct_v, bl);
|
||||
|
Loading…
Reference in New Issue
Block a user