From: Theodore Ts'o Date: Tue, 20 Mar 2018 15:04:27 +0000 (-0400) Subject: debugfs: read allocation bitmaps more efficiently X-Git-Tag: v1.44.1~8 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=6a6393964f045d1d85503f9f4202811bde840875;p=tools%2Fe2fsprogs.git 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 --- diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index 398bf72..bd6949e 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; } }