From: Adrian Bunk <bunk@stusta.de>
To: Doug Ledford <dledford@redhat.com>
Cc: Neil Brown <neilb@suse.de>,
mingo@redhat.com, linux-raid@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [RFC: 2.6 patch] simplify drivers/md/md.c:update_size()
Date: Fri, 15 Dec 2006 01:45:12 +0100 [thread overview]
Message-ID: <20061215004512.GU3388@stusta.de> (raw)
In-Reply-To: <1166142995.2745.319.camel@fc6.xsintricity.com>
On Thu, Dec 14, 2006 at 07:36:35PM -0500, Doug Ledford wrote:
> On Fri, 2006-12-15 at 01:19 +0100, Adrian Bunk wrote:
> > While looking at commit 8ddeeae51f2f197b4fafcba117ee8191b49d843e,
> > I got the impression that this commit couldn't fix anything, since the
> > "size" variable can't be changed before "fit" gets used.
> >
> > Is there any big thinko, or is the patch below that slightly simplifies
> > update_size() semantically equivalent to the current code?
>
> No, this patch is broken. Where it fails is specifically the case where
> you want to autofit the largest possible size, you have different size
> devices, and the first device is not the smallest. When you hit the
> first device, you will set size, then as you repeat the ITERATE_RDEV
> loop, when you hit the smaller device, size will be non-0 and you'll
> then trigger the later if and return -ENOSPC. In the case of autofit,
> you have to preserve the fit variable instead of looking at size so you
> know whether or not to modify the size when you hit a smaller device
> later in the list.
>...
OK, sorry, I've got my thinko:
ITERATE_RDEV() is a loop.
That's what I missed.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
prev parent reply other threads:[~2006-12-15 0:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-15 0:19 [RFC: 2.6 patch] simplify drivers/md/md.c:update_size() Adrian Bunk
2006-12-15 0:36 ` Doug Ledford
2006-12-15 0:45 ` Adrian Bunk [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=20061215004512.GU3388@stusta.de \
--to=bunk@stusta.de \
--cc=dledford@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=neilb@suse.de \
/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).