提交 c8592fcc 编写于 作者: B Boaz Harrosh

exofs: Allow corrupted directory entry to be empty file

If there was an error in fetching an object or extracting
inode info from attributes. Which means corrupted storage.
Let it be an empty ZERO dated directory entry so it can be
deleted. Otherwise the all directory will be inaccessible.

This does not loose data, because if there is an orphan object
somewhere it will be recovered by fschk. But usually this only
means corrupted dir entry. The object was never generated and
only its link exist. This way we can delete the bad entry.
Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
上级 d83c7eb6
......@@ -1102,8 +1102,7 @@ static int exofs_get_inode(struct super_block *sb, struct exofs_i_info *oi,
/* If object is lost on target we might as well enable it's
* delete.
*/
if ((ret == -ENOENT) || (ret == -EINVAL))
ret = 0;
ret = 0;
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册