diff mbox

[23/32] debugfs: make undel cmd support inline data

Message ID 1334576407-4007-24-git-send-email-wenqing.lz@taobao.com
State Superseded, archived
Headers show

Commit Message

Zheng Liu April 16, 2012, 11:39 a.m. UTC
From: Zheng Liu <wenqing.lz@taobao.com>

Inode with inline data doesn't need to mark blocks.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
---
 debugfs/debugfs.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index 517751f..b591b9b 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -1435,8 +1435,9 @@  void do_undel(int argc, char *argv[])
 	if (debugfs_write_inode(ino, &inode, argv[0]))
 		return;
 
-	ext2fs_block_iterate3(current_fs, ino, BLOCK_FLAG_READ_ONLY, NULL,
-			      mark_blocks_proc, NULL);
+	if (!ext2fs_has_inline_data(current_fs, ino))
+		ext2fs_block_iterate3(current_fs, ino, BLOCK_FLAG_READ_ONLY, NULL,
+				      mark_blocks_proc, NULL);
 
 	ext2fs_inode_alloc_stats2(current_fs, ino, +1, 0);