From: Andreas Dilger <adilger@sun.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>,
Alex Tomas <alex@clusterfs.com>
Subject: Re: [PATCH] UPDATED3: types fixup for mballoc
Date: Tue, 8 Jan 2008 20:47:58 -0700 [thread overview]
Message-ID: <20080109034757.GJ3351@webber.adilger.int> (raw)
In-Reply-To: <4783D4E2.5080801@redhat.com>
On Jan 08, 2008 13:54 -0600, Eric Sandeen wrote:
> Note, the calculations Andreas & I were discussing only work properly
> for stripe <= blocks per group... I don't know if we'd need to enforce
> that at mount time?
I think that would be prudent, but can be done in a separate patch.
If the RAID stripe width is so large that one has to do read-modify-write
for a whole group write (8MB @ 1kB blocksize, 128MB @ 4kB blocksize)
then I don't think we can use that to align allocations.
I think Aneesh might be working on getting s_raid_stripe_width from the
superblock, and we may as well do the sanity checking in the same patch.
If sb->s_raid_stripe_width > EXT4_BLOCKS_PER_GROUP, then as a fallback
I'd suggest using sb->s_raid_stride if < EXT4_BLOCKS_PER_GROUP, or just
ignoring both if unsuitable.
> I ran into a potential overflow in ext4_mb_scan_aligned,
> and went looking for others in mballoc. This patch hits a
> few spots, compile-tested only at this point, comments welcome.
>
> This patch:
>
> changes fe_len to an int, I don't think we need it to be a long,
> looking at how it's used (should it be a grpblk_t?) Also change
> anything assigned to return value of mb_find_extent, since it returns
> fe_len.
>
> changes anything that does groupno * EXT4_BLOCKS_PER_GROUP
> or pa->pa_pstart + <whatever> to an ext4_fsblk_t
>
> avoids 64-bit divides & modulos, and...
>
> fixes up any related formats
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
You can add a "Signed-off-by: Andreas Dilger <adilger@sun.com>" too.
The revised calcs look good to me.
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
prev parent reply other threads:[~2008-01-09 3:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-15 22:56 [PATCH] types fixup for mballoc Eric Sandeen
2007-11-16 4:49 ` Eric Sandeen
2008-01-02 20:01 ` [PATCH] UPDATED: " Eric Sandeen
2008-01-03 19:17 ` Andreas Dilger
2008-01-03 19:24 ` Eric Sandeen
2008-01-03 20:10 ` [PATCH] UPDATED2: " Eric Sandeen
2008-01-03 20:35 ` Andreas Dilger
2008-01-03 21:07 ` Eric Sandeen
2008-01-08 19:54 ` [PATCH] UPDATED3: " Eric Sandeen
2008-01-09 3:47 ` Andreas Dilger [this message]
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=20080109034757.GJ3351@webber.adilger.int \
--to=adilger@sun.com \
--cc=alex@clusterfs.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.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