Whamcloud - gitweb
debugfs: make lsdel command support inline data
authorZheng Liu <wenqing.lz@taobao.com>
Mon, 3 Mar 2014 05:31:27 +0000 (00:31 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 4 Mar 2014 13:46:14 +0000 (08:46 -0500)
After checking inline data in ext2fs_inode_have_valid_blocks2() we won't
traverse the block in do_lsdel() function.  But if an inode has inline
data we also need to report it.

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debugfs/lsdel.c

index 0e774a3..5276014 100644 (file)
@@ -152,7 +152,8 @@ void do_lsdel(int argc, char **argv)
                                goto next;
                        }
                }
-               if (lsd.free_blocks && !lsd.bad_blocks) {
+               if (lsd.free_blocks && !lsd.bad_blocks ||
+                   inode.i_flags & EXT4_INLINE_DATA_FL) {
                        if (num_delarray >= max_delarray) {
                                max_delarray += 50;
                                delarray = realloc(delarray,