From: Eric Sandeen <sandeen@redhat.com>
To: ext4 development <linux-ext4@vger.kernel.org>
Cc: Zeev Tarantov <zeev.tarantov@gmail.com>
Subject: [PATCH] e2fsprogs: don't set stripe/stride to 1 block in mkfs
Date: Mon, 04 Apr 2011 15:11:52 -0400 [thread overview]
Message-ID: <4D9A17F8.4000406@redhat.com> (raw)
Block devices may set minimum or optimal IO hints equal to
blocksize; in this case there is really nothing for ext4
to do with this information (i.e. search for a block-aligned
allocation?) so don't set fs geometry with single-block
values.
Zeev also reported that with a block-sized stripe, the
ext4 allocator spends time spinning in ext4_mb_scan_aligned(),
oddly enough.
Reported-by: Zeev Tarantov <zeev.tarantov@gmail.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 9798b88..74b838c 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1135,8 +1135,11 @@ static int get_device_geometry(const char *file,
if ((opt_io == 0) && (psector_size > blocksize))
opt_io = psector_size;
- fs_param->s_raid_stride = min_io / blocksize;
- fs_param->s_raid_stripe_width = opt_io / blocksize;
+ /* setting stripe/stride to blocksize is pointless */
+ if (min_io > blocksize)
+ fs_param->s_raid_stride = min_io / blocksize;
+ if (opt_io > blocksize)
+ fs_param->s_raid_stripe_width = opt_io / blocksize;
rc = blkid_topology_get_alignment_offset(tp);
out:
next reply other threads:[~2011-04-04 19:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 19:11 Eric Sandeen [this message]
2011-04-05 8:10 ` [PATCH] e2fsprogs: don't set stripe/stride to 1 block in mkfs Andreas Dilger
2011-04-05 8:43 ` Zeev Tarantov
2011-04-05 16:39 ` Eric Sandeen
2011-04-05 16:56 ` Eric Sandeen
2011-04-05 22:21 ` Eric Sandeen
2011-04-06 6:51 ` Zeev Tarantov
2011-04-06 17:00 ` Eric Sandeen
2011-04-08 0:13 ` Andreas Dilger
2011-04-08 0:24 ` Eric Sandeen
2011-05-18 17:20 ` Ted Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D9A17F8.4000406@redhat.com \
--to=sandeen@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=zeev.tarantov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).