diff options
author | Theodore Ts'o <tytso@mit.edu> | 2008-02-07 14:37:17 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-02-18 20:05:55 -0500 |
commit | 43323be95742298b8229be728c3812e95c90629c (patch) | |
tree | 95bd03e448e14df76bf45c3f23c004c87c59b731 /debugfs/debugfs.c | |
parent | 206fea69f8624843c2ffd32bab171059ec137780 (diff) | |
download | e2fsprogs-43323be95742298b8229be728c3812e95c90629c.tar.gz |
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" <tytso@mit.edu>
Diffstat (limited to 'debugfs/debugfs.c')
-rw-r--r-- | debugfs/debugfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
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, |