| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 4/5] xfs_repair: don't ASSERT on corrupt ftype |
| From: | Eric Sandeen <sandeen@xxxxxxxxxx> |
| Date: | Sun, 7 Sep 2014 11:41:04 -0500 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1410108065-18156-1-git-send-email-sandeen@xxxxxxxxxx> |
| References: | <1410108065-18156-1-git-send-email-sandeen@xxxxxxxxxx> |
xfs_dir3_dirent_get_ftype() gets the file type
off disk, but ASSERTs if it's invalid:
ASSERT(type < XFS_DIR3_FT_MAX);
This might be cut & paste from
xfs_dir3_dirent_put_ftype which should be checking
that it's not been passed bad values, but we
shouldn't ASSERT on bad values read from disk.
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
include/xfs_da_format.h | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/include/xfs_da_format.h b/include/xfs_da_format.h
index 89a1a21..11f1420 100644
--- a/include/xfs_da_format.h
+++ b/include/xfs_da_format.h
@@ -561,7 +561,6 @@ xfs_dir3_dirent_get_ftype(
if (xfs_sb_version_hasftype(&mp->m_sb)) {
__uint8_t type = dep->name[dep->namelen];
- ASSERT(type < XFS_DIR3_FT_MAX);
if (type < XFS_DIR3_FT_MAX)
return type;
--
1.7.1
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 2/5] xfs_repair: preserve error state in process_shortform_attr, Eric Sandeen |
|---|---|
| Next by Date: | [PATCH 5/5] xfs_repair: set proper ftype when moving to lost+found, Eric Sandeen |
| Previous by Thread: | Re: [PATCH 2/5] xfs_repair: preserve error state in process_shortform_attr, Christoph Hellwig |
| Next by Thread: | Re: [PATCH 4/5] xfs_repair: don't ASSERT on corrupt ftype, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |