[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120310213535.GM6961@sli.dy.fi>
Date: Sat, 10 Mar 2012 23:35:35 +0200
From: Sami Liedes <sami.liedes@....fi>
To: linux-ext4@...r.kernel.org
Subject: Re: [PATCH 2/5] resize2fs: Use EXT2_FLAG_64BITS.
From 975ea6001ab14b02b1197588bbe40ea133e17568 Mon Sep 17 00:00:00 2001
From: Sami Liedes <sami.liedes@....fi>
Date: Sun, 26 Feb 2012 21:54:23 +0200
Subject: [PATCH] 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 <sami.liedes@....fi>
diff --git a/resize/main.c b/resize/main.c
index ffefe01..e6604f2 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) {
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists