mds: fix hang issue when accessing a file under a lost parent directory
Once a while we had encountered some serious problem that resulted in some metadata lost. After we brought the MDS up, if we looked up a file whose parent directory was not existed any more, this request would hang and other next requests which accessed this lost directory would hang too.
For example, here is a path /dir1/file1. The object of "dir1" in metadata pool was lost after some serious problem.
When doing "ls /dir1", MDS will return EIO as expected.
But before doing "ls /dir", we try doing "ls /dir1/file1" directly, this request will hang forever.