diff options
author | Theodore Ts'o <tytso@mit.edu> | 2018-03-20 11:04:27 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-03-20 22:10:09 -0400 |
commit | 6a6393964f045d1d85503f9f4202811bde840875 (patch) | |
tree | 3b306c1244b036d3af72199f5f3c9e5aaae5b980 | |
parent | 2b118575f59880ada77a81ea1bb3c34fe77cff52 (diff) | |
download | e2fsprogs-6a6393964f045d1d85503f9f4202811bde840875.tar.gz |
debugfs: read allocation bitmaps more efficiently
It is more efficient to use ext2fs_read_bitmaps() than to read the
inode and block bitmaps separately, since extra seeks.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | debugfs/debugfs.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index 398bf7224..bd6949ed8 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c @@ -193,14 +193,10 @@ try_open_again: if (catastrophic) com_err(device, 0, "catastrophic mode - not reading inode or group bitmaps"); else { - retval = ext2fs_read_inode_bitmap(current_fs); + retval = ext2fs_read_bitmaps(current_fs); if (retval) { - com_err(device, retval, "while reading inode bitmap"); - goto errout; - } - retval = ext2fs_read_block_bitmap(current_fs); - if (retval) { - com_err(device, retval, "while reading block bitmap"); + com_err(device, retval, + "while reading allocation bitmaps"); goto errout; } } |