mirror of
https://github.com/ceph/ceph
synced 2025-01-28 22:14:02 +00:00
mds: handle missing mydir dirfrag
Previously, if the mydir dirfrag was missing, then creating stray dirs would assert out when trying to project_fnode(). Signed-off-by: John Spray <john.spray@redhat.com>
This commit is contained in:
parent
6cb1f6cca7
commit
96992466ee
@ -626,6 +626,14 @@ void MDCache::populate_mydir()
|
||||
|
||||
dout(10) << "populate_mydir " << *mydir << dendl;
|
||||
|
||||
if (mydir->get_version() == 0) {
|
||||
// A fresh dirfrag, we must dirty it before dirtying
|
||||
// any of the strays we create within it.
|
||||
LogSegment *ls = mds->mdlog->get_current_segment();
|
||||
mydir->mark_complete();
|
||||
mydir->mark_dirty(mydir->pre_dirty(), ls);
|
||||
}
|
||||
|
||||
if (!mydir->is_complete()) {
|
||||
mydir->fetch(new C_MDS_RetryOpenRoot(this));
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user