[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070718175756.GC11657@kernel.dk>
Date: Wed, 18 Jul 2007 19:57:56 +0200
From: Jens Axboe <jens.axboe@...cle.com>
To: Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
Cc: Olaf Hering <olaf@...fle.de>, Paul Mackerras <paulus@...ba.org>,
"James E.J. Bottomley" <James.Bottomley@...elEye.com>,
Alessandro Rubini <rubini@...vis.unipv.it>,
Geoff Levand <geoffrey.levand@...sony.com>,
Linux/PPC Development <linuxppc-dev@...abs.org>,
Linux Kernel Development <linux-kernel@...r.kernel.org>,
linux-scsi@...r.kernel.org
Subject: Re: PS3 Storage Driver O_DIRECT issue
On Wed, Jul 18 2007, Geert Uytterhoeven wrote:
> On Fri, 13 Jul 2007, Olaf Hering wrote:
> > This driver (or the generic PS3 code) has appearently problems with
> > O_DIRECT.
> > glibc aborts parted because the malloc metadata get corrupted. While it
> > is reproducible, the place where it crashes changes with every version
> > of the debug attempt.
> > I dont have a handle right now, all I know is that the metadata after a
> > malloc area get overwritten with zeros.
> >
> >
> > Can you have a look at this?
> > parted /dev/ps3da
> > print (a few times)
>
> I could reproduce it with parted 1.8.0 and later.
>
> The patch below fixes it (tested with 1.8.0, 1.8.2 (FC6), 1.9.0 (git)).
>
> Apparently sometimes bio_cur_sectors(bio)*KERNEL_SECTOR_SIZE != bvec->bv_len
> when using O_DIRECT. Is that true (or a bug?)?
>
> If it's OK, I'll fold this patch into the main ps3disk patch.
The bug is in your code - you iterate the bio segments, but always
reference the current one. Which of course makes no sense, you may as
well just kill the loop in that case, the code would be the same.
--
Jens Axboe
-
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