[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.62.0707191552420.8661@pademelon.sonytel.be>
Date: Thu, 19 Jul 2007 15:53:44 +0200 (CEST)
From: Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Olaf Hering <olaf@...fle.de>, Andy Whitcroft <apw@...dowen.org>,
"James E.J. Bottomley" <James.Bottomley@...elEye.com>,
linux-scsi@...r.kernel.org,
Linux Kernel Development <linux-kernel@...r.kernel.org>,
Linux/PPC Development <linuxppc-dev@...abs.org>,
Paul Mackerras <paulus@...ba.org>,
Jens Axboe <jens.axboe@...cle.com>
Subject: [patch 1/4] ps3disk: use correct bio vector size
ps3disk: use correct bio vector size
This fixes the O_DIRECT corruptions, as reported by Olaf Hering (triggered by
e.g. parted >= 1.8.0).
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@...ycom.com>
---
drivers/block/ps3disk.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -108,7 +108,7 @@ static void ps3disk_scatter_gather(struc
__func__, __LINE__, i, bio_segments(bio),
bio_sectors(bio), sector);
bio_for_each_segment(bvec, bio, j) {
- size = bio_cur_sectors(bio)*KERNEL_SECTOR_SIZE;
+ size = bvec->bv_len;
buf = __bio_kmap_atomic(bio, j, KM_IRQ0);
if (gather)
memcpy(dev->bounce_buf+offset, buf, size);
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@...ycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 · B-1840 Londerzeel · Belgium
VAT BE 0413.825.160 · RPR Brussels
Fortis Bank Zaventem · Swift GEBABEBB08A · IBAN BE39001382358619
Powered by blists - more mailing lists