aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exofs
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2014-01-14 09:05:52 -0500
committerBoaz Harrosh <bharrosh@panasas.com>2014-01-23 11:54:14 -0500
commitc8592fcc66b2fe9cbd505f1faff810f8844d4a97 (patch)
treeb562110704f5acd3630629f5058f0f8af945d1e7 /fs/exofs
parentd83c7eb65d9bf0a57e7d5ed87a5bd8e5ea6b1fb6 (diff)
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: Boaz Harrosh <bharrosh@panasas.com>
Diffstat (limited to 'fs/exofs')
-rw-r--r--fs/exofs/inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 7e7ba9ada405..390224a162d0 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -1102,8 +1102,7 @@ static int exofs_get_inode(struct super_block *sb, struct exofs_i_info *oi,
1102 /* If object is lost on target we might as well enable it's 1102 /* If object is lost on target we might as well enable it's
1103 * delete. 1103 * delete.
1104 */ 1104 */
1105 if ((ret == -ENOENT) || (ret == -EINVAL)) 1105 ret = 0;
1106 ret = 0;
1107 goto out; 1106 goto out;
1108 } 1107 }
1109 1108