Skip to content

Commit

Permalink
exofs: Allow corrupted directory entry to be empty file
Browse files Browse the repository at this point in the history
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: Boaz Harrosh <bharrosh@panasas.com>
  • Loading branch information
Boaz Harrosh committed Jan 23, 2014
1 parent d83c7eb commit c8592fc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/exofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c8592fc

Please sign in to comment.