]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
debugfs: read allocation bitmaps more efficiently
authorTheodore Ts'o <tytso@mit.edu>
Tue, 20 Mar 2018 15:04:27 +0000 (11:04 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 21 Mar 2018 02:10:09 +0000 (22:10 -0400)
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>
debugfs/debugfs.c

index 398bf722485173722566ee251b9e310a6dded6eb..bd6949ed8c47684166130047f2f25f99f045029f 100644 (file)
@@ -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;
                }
        }