From: Mingming Cao <cmm@us.ibm.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: tytso@mit.edu, adilger@sun.com, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: Use superblock s_raid_stripe_width as stripe size during block allocation.
Date: Wed, 09 Jan 2008 14:02:11 -0800 [thread overview]
Message-ID: <1199916131.4011.5.camel@localhost.localdomain> (raw)
In-Reply-To: <1199898469-10369-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
On Wed, 2008-01-09 at 22:37 +0530, Aneesh Kumar K.V wrote:
> The stipe size used during block allocation is calculated as below.
> a) if we specify a stripe=<value> option using mount time. Use that value.
> b) if not use the value specified in super block.
> b) If the value specfied at mount time is greater than blocks per group use
> the value specified ini the super block.
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
> fs/ext4/super.c | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index db1edc8..10330eb 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -2136,6 +2136,16 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
> sbi->s_rsv_window_head.rsv_alloc_hit = 0;
> sbi->s_rsv_window_head.rsv_goal_size = 0;
> ext4_rsv_window_add(sb, &sbi->s_rsv_window_head);
> + /*
> + * set the stripe size. If we have specified it via mount option, then
> + * use the mount option value. If the value specified at mount time is
> + * greater than the blocks per group use the super block value.
> + * Allocator needs it be less than blocks per group.
Is that still true with flex bg?
> + */
> + if (!sbi->s_stripe ||
> + sbi->s_stripe >= sbi->s_blocks_per_group) {
> + sbi->s_stripe = le32_to_cpu(es->s_raid_stripe_width);
> + }
>
> /*
> * set up enough so that it can read an inode
next prev parent reply other threads:[~2008-01-09 22:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-09 17:07 [PATCH] ext4: Use superblock s_raid_stripe_width as stripe size during block allocation Aneesh Kumar K.V
2008-01-09 17:07 ` [PATCH] ext4: Check for return value from sb_set_blocksize Aneesh Kumar K.V
2008-01-09 18:21 ` Aneesh Kumar K.V
2008-01-09 17:21 ` [PATCH] ext4: Use superblock s_raid_stripe_width as stripe size during block allocation Eric Sandeen
2008-01-09 22:02 ` Mingming Cao [this message]
2008-01-09 23:36 ` Andreas Dilger
2008-01-10 4:28 ` Aneesh Kumar K.V
2008-01-10 8:22 ` Andreas Dilger
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=1199916131.4011.5.camel@localhost.localdomain \
--to=cmm@us.ibm.com \
--cc=adilger@sun.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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