From: Sami Liedes Date: Thu, 22 Mar 2012 23:46:56 +0000 (-0400) Subject: resize2fs: use EXT2_FLAG_64BITS X-Git-Tag: v1.42.2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04cb6f58ce48221d20d0f4c22b6977e7e3e7e614;p=thirdparty%2Fe2fsprogs.git resize2fs: use EXT2_FLAG_64BITS By passing EXT2_FLAG_64BITS to ext2fs_open2() we can avoid some unnecessary redirection in critical paths. While resize2fs does not currently otherwise support so big filesystems that this would matter, passing this flag is entirely harmless and only tells libext2fs that the caller has been recompiled against current headers. With this change the CPU time needed to shrink a 100G filesystem drops by 20%. Signed-off-by: Sami Liedes Signed-off-by: Theodore Ts'o --- diff --git a/resize/main.c b/resize/main.c index ffefe0193..e6604f287 100644 --- a/resize/main.c +++ b/resize/main.c @@ -294,6 +294,9 @@ int main (int argc, char ** argv) if (!(mount_flags & EXT2_MF_MOUNTED)) io_flags = EXT2_FLAG_RW | EXT2_FLAG_EXCLUSIVE; + + io_flags |= EXT2_FLAG_64BITS; + retval = ext2fs_open2(device_name, io_options, io_flags, 0, 0, io_ptr, &fs); if (retval) {