From 43323be95742298b8229be728c3812e95c90629c Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 7 Feb 2008 14:37:17 -0500 Subject: Use BLOCK_FLAG_READ_ONLY flag in debugfs, e2image, and tune2fs Pass BLOCK_FLAG_READ_ONLY to ext2fs_block_iterate2() so that debugfs, e2image, and tune2fs will work well with filesystems containing extents. Signed-off-by: "Theodore Ts'o" --- debugfs/debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'debugfs/debugfs.c') diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index bcd9a9be..79998a20 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -509,7 +509,7 @@ static void dump_blocks(FILE *f, const char *prefix, ext2_ino_t inode) lb.first_block = 0; lb.f = f; lb.first = 1; - ext2fs_block_iterate2(current_fs, inode, 0, NULL, + ext2fs_block_iterate2(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL, list_blocks_proc, (void *)&lb); finish_range(&lb); if (lb.total) @@ -1108,7 +1108,7 @@ void do_undel(int argc, char *argv[]) if (debugfs_write_inode(ino, &inode, argv[0])) return; - ext2fs_block_iterate(current_fs, ino, 0, NULL, + ext2fs_block_iterate(current_fs, ino, BLOCK_FLAG_READ_ONLY, NULL, mark_blocks_proc, NULL); ext2fs_inode_alloc_stats2(current_fs, ino, +1, 0); @@ -1501,7 +1501,7 @@ static void kill_file_by_inode(ext2_ino_t inode) if (!ext2fs_inode_has_valid_blocks(&inode_buf)) return; - ext2fs_block_iterate(current_fs, inode, 0, NULL, + ext2fs_block_iterate(current_fs, inode, BLOCK_FLAG_READ_ONLY, NULL, release_blocks_proc, NULL); printf("\n"); ext2fs_inode_alloc_stats2(current_fs, inode, -1, -- cgit v1.2.3