Re: [patch 0/7] Add TRIM support for raid linear/0/1/10
From: NeilBrown
Date: Tue Mar 13 2012 - 22:25:30 EST
On Tue, 13 Mar 2012 09:54:49 +0800 Shaohua Li <shli@xxxxxxxxxxxx> wrote:
> On 3/13/12 2:22 AM, Holger Kiehl wrote:
> > Hello,
> >
> > On Mon, 12 Mar 2012, Shaohua Li wrote:
> >
> > > The patches add TRIM support for raid linear/0/1/10. I'll add TRIM
> support for
> > > raid 4/5/6 later. The implementation is pretty straightforward and
> > > self-explained.
> > >
> > First, thanks for this patch!
> >
> > I have applied those patches against 3.3.0-rc7 and during boot the kernel
> > reports a lot of the following:
> >
> > Mar 12 18:56:00 c3po kernel: [ 7.611045] md/raid0:md3: make_request
> bug: can't convert block across chunks or bigger than 512k 18861064 512
> > Mar 12 18:56:00 c3po kernel: [ 7.611047] md/raid0:md3: make_request
> bug: can't convert block across chunks or bigger than 512k 18862088 512
> > Mar 12 18:56:00 c3po kernel: [ 7.611049] md/raid0:md3: make_request
> bug: can't convert block across chunks or bigger than 512k 18863112 512
> > Mar 12 18:56:00 c3po kernel: [ 7.611052] md/raid0:md3: make_request
> bug: can't convert block across chunks or bigger than 512k 18864136 512
> > Mar 12 18:56:00 c3po kernel: [ 7.611054] md/raid0:md3: make_request
> bug: can't convert block across chunks or bigger than 512k 18865160 512
> > Mar 12 18:56:00 c3po kernel: [ 7.611056] md/raid0:md3: make_request
> bug: can't convert block across chunks or bigger than 512k 18866184 512
> Thanks for testing. Looks I fixed a sanity check in bio.c but there are
> similar check in raid0/10 which I forgot to fix. Below patch should fix it.
> please try.
>
>
> Subject: md: fix sanity check
>
> discard bio hasn't data attached and such bio can be split, don't consider
> this is illegial.
>
> Signed-off-by: Shaohua Li <shli@xxxxxxxxxxxx>
> ---
> drivers/md/raid0.c | 2 +-
> drivers/md/raid10.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> Index: linux/drivers/md/raid0.c
> ===================================================================
> --- linux.orig/drivers/md/raid0.c 2012-03-13 09:37:58.759976786 +0800
> +++ linux/drivers/md/raid0.c 2012-03-13 09:42:35.389975584 +0800
> @@ -496,7 +496,7 @@ static void raid0_make_request(struct md
> sector_t sector = bio->bi_sector;
> struct bio_pair *bp;
> /* Sanity check -- queue functions should prevent this
> happening */
> - if (bio->bi_vcnt != 1 ||
> + if ((bio->bi_vcnt != 1 && bio->bi_vcnt !=0) ||
oh .. and there is the fix I mentioned that you would need :-)
Thanks,
NeilBrown
Attachment:
signature.asc
Description: PGP signature