[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20061215004512.GU3388@stusta.de>
Date: Fri, 15 Dec 2006 01:45:12 +0100
From: Adrian Bunk <bunk@...sta.de>
To: Doug Ledford <dledford@...hat.com>
Cc: Neil Brown <neilb@...e.de>, mingo@...hat.com,
linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC: 2.6 patch] simplify drivers/md/md.c:update_size()
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists