From: Zheng Liu <wenqing.lz@xxxxxxxxxx> We needn't traverse blocks for an inode which has inline data because no block belongs to it. After appling this patch, the following commands in debugfs can handle inline_data feature: - icheck - blocks - filefrag In some places, block iterator functions are used to traverse blocks of directory. In this case, we need to check whether inode has inline_data flag or not, and handle it manually. Signed-off-by: Zheng Liu <wenqing.lz@xxxxxxxxxx> --- lib/ext2fs/block.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/lib/ext2fs/block.c b/lib/ext2fs/block.c index 68dcb03..4abcedf 100644 --- a/lib/ext2fs/block.c +++ b/lib/ext2fs/block.c @@ -345,6 +345,13 @@ errcode_t ext2fs_block_iterate3(ext2_filsys fs, return ctx.errcode; /* + * If an inode has inline data, we needn't traverse its blocks + * because no block belong to this inode. + */ + if (inode.i_flags & EXT4_INLINE_DATA_FL) + return ctx.errcode; + + /* * Check to see if we need to limit large files */ if (flags & BLOCK_FLAG_NO_LARGE) { -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html