From 6a6393964f045d1d85503f9f4202811bde840875 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 20 Mar 2018 11:04:27 -0400 Subject: [PATCH] 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 --- debugfs/debugfs.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) 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; } } -- 1.8.3.1