mirror of
https://github.com/ceph/ceph
synced 2025-02-22 18:47:18 +00:00
mds: tolerate a missing directory object
Including error in log, mark dir complete. Some metadata may be missing!
This commit is contained in:
parent
96598f43d8
commit
df39e7b8cb
@ -1060,6 +1060,25 @@ void CDir::_fetched(bufferlist &bl)
|
||||
assert(is_auth());
|
||||
assert(!is_frozen());
|
||||
|
||||
// empty?!?
|
||||
if (bl.length() == 0) {
|
||||
dout(0) << "_fetched missing object for " << *this << dendl;
|
||||
stringstream ss;
|
||||
ss << "dir " << ino() << "." << dirfrag() << " object missing on disk; some files may be lost";
|
||||
cache->mds->logclient.log(LOG_ERROR, ss);
|
||||
|
||||
log_mark_dirty();
|
||||
|
||||
// mark complete, !fetching
|
||||
state_set(STATE_COMPLETE);
|
||||
state_clear(STATE_FETCHING);
|
||||
auth_unpin(this);
|
||||
|
||||
// kick waiters
|
||||
finish_waiting(WAIT_COMPLETE, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
// decode trivialmap.
|
||||
int len = bl.length();
|
||||
bufferlist::iterator p = bl.begin();
|
||||
|
Loading…
Reference in New Issue
Block a user