public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PATCH] scsi bug fixes for 2.6.17-rc5
@ 2006-05-27 20:07 James Bottomley
  0 siblings, 0 replies; 6+ messages in thread
From: James Bottomley @ 2006-05-27 20:07 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, linux-scsi

This is my current slew of small bug fixes which either fix serious
bugs, or are completely safe for this -rc5 stage of the kernel.

The patch is available from:

master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git

The short changelog is:

Eric Moore:
  o scsi_transport_sas: make write attrs writeable

James Bottomley:
  o scsi_transport_sas; fix user_scan
  o mptspi: reset handler shouldn't be called for other bus protocols

Randy.Dunlap:
  o ppa: fix for machines with highmem

Thomas Bogendoerfer:
  o Blacklist entry for HP dat changer

And the diffstat:

 message/fusion/mptbase.c  |   27 +++++++++++++++++++++------
 scsi/ppa.c                |    7 +++++++
 scsi/scsi_devinfo.c       |    1 +
 scsi/scsi_transport_sas.c |    4 ++--
 4 files changed, 31 insertions(+), 8 deletions(-)

James



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [GIT PATCH] scsi bug fixes for 2.6.17-rc5
@ 2006-05-31 16:26 James Bottomley
  2006-06-01  5:05 ` Kai Makisara
  0 siblings, 1 reply; 6+ messages in thread
From: James Bottomley @ 2006-05-31 16:26 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: linux-scsi, linux-kernel

This is my current slew of small bug fixes which either fix serious
bugs, or are completely safe for this -rc5 stage of the kernel.  I've
added one more since I last sent you this pull request (the fix memory
building non-aligned sg lists)

The patch is available from:

master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git

The short changelog is:

Bryan Holty:
  o fix memory building non-aligned sg lists

Eric Moore:
  o scsi_transport_sas: make write attrs writeable

James Bottomley:
  o scsi_transport_sas; fix user_scan
  o mptspi: reset handler shouldn't be called for other bus protocols

Randy.Dunlap:
  o ppa: fix for machines with highmem

Thomas Bogendoerfer:
  o Blacklist entry for HP dat changer

And the diffstat:

 message/fusion/mptbase.c  |   27 +++++++++++++++++++++------
 scsi/ppa.c                |    7 +++++++
 scsi/scsi_devinfo.c       |    1 +
 scsi/scsi_lib.c           |    2 +-
 scsi/scsi_transport_sas.c |    4 ++--
 5 files changed, 32 insertions(+), 9 deletions(-)

James



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GIT PATCH] scsi bug fixes for 2.6.17-rc5
  2006-05-31 16:26 [GIT PATCH] scsi bug fixes for 2.6.17-rc5 James Bottomley
@ 2006-06-01  5:05 ` Kai Makisara
  2006-06-01  5:24   ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Kai Makisara @ 2006-06-01  5:05 UTC (permalink / raw)
  To: James Bottomley, Andrew Morton, Linus Torvalds; +Cc: linux-scsi, linux-kernel

On Wed, 31 May 2006, James Bottomley wrote:

> This is my current slew of small bug fixes which either fix serious
> bugs, or are completely safe for this -rc5 stage of the kernel.  I've
> added one more since I last sent you this pull request (the fix memory
> building non-aligned sg lists)
> 
> The patch is available from:
> 
> master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git
> 
> The short changelog is:
> 
> Bryan Holty:
>   o fix memory building non-aligned sg lists
> 
I looked at 
www.kernel.org/git/?p=linux/kernel/git/jejb/scsi-rc-fixes-2.6.git;.

This patch does the following change:

- int nr_pages = (bufflen + PAGE_SIZE - 1) >> PAGE_SHIFT;
+ int nr_pages = PAGE_ALIGN(bufflen + sgl[0].offset);

This seems to wrong: the new version is missing the right shift. For 
instance, offset=0 and bufflen=4096 results in 4096 and not 1!

(Using asm-x86_64, the new version translates to
((bufflen + sgl[0].offset+PAGE_SIZE-1)&(~(PAGE_SIZE-1)))
)

According to the original patch by Brian, the change should probably have 
been to (or something equivalent):

+       int nr_pages = (bufflen + sgl[0].offset + PAGE_SIZE - 1) >> 
PAGE_SHIFT;

This was tested by several people. Did anyone test the version put into 
scsi-rc-fixes-2.6.git?

-- 
Kai

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GIT PATCH] scsi bug fixes for 2.6.17-rc5
  2006-06-01  5:05 ` Kai Makisara
@ 2006-06-01  5:24   ` Andrew Morton
  2006-06-01 14:09     ` James Bottomley
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2006-06-01  5:24 UTC (permalink / raw)
  To: Kai Makisara; +Cc: James.Bottomley, torvalds, linux-scsi, linux-kernel

On Thu, 1 Jun 2006 08:05:49 +0300 (EEST)
Kai Makisara <Kai.Makisara@kolumbus.fi> wrote:

> On Wed, 31 May 2006, James Bottomley wrote:
> 
> > This is my current slew of small bug fixes which either fix serious
> > bugs, or are completely safe for this -rc5 stage of the kernel.  I've
> > added one more since I last sent you this pull request (the fix memory
> > building non-aligned sg lists)
> > 
> > The patch is available from:
> > 
> > master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git
> > 
> > The short changelog is:
> > 
> > Bryan Holty:
> >   o fix memory building non-aligned sg lists
> > 
> I looked at 
> www.kernel.org/git/?p=linux/kernel/git/jejb/scsi-rc-fixes-2.6.git;.
> 
> This patch does the following change:
> 
> - int nr_pages = (bufflen + PAGE_SIZE - 1) >> PAGE_SHIFT;
> + int nr_pages = PAGE_ALIGN(bufflen + sgl[0].offset);
> 
> This seems to wrong: the new version is missing the right shift. For 
> instance, offset=0 and bufflen=4096 results in 4096 and not 1!
> 
> (Using asm-x86_64, the new version translates to
> ((bufflen + sgl[0].offset+PAGE_SIZE-1)&(~(PAGE_SIZE-1)))
> )
> 
> According to the original patch by Brian, the change should probably have 
> been to (or something equivalent):
> 
> +       int nr_pages = (bufflen + sgl[0].offset + PAGE_SIZE - 1) >> 
> PAGE_SHIFT;
> 
> This was tested by several people. Did anyone test the version put into 
> scsi-rc-fixes-2.6.git?
> 

argh, that was me "improving" things.

--- devel/drivers/scsi/scsi_lib.c~scsi-properly-count-the-number-of-pages-in-scsi_req_map_sg-fix	2006-05-31 22:22:12.000000000 -0700
+++ devel-akpm/drivers/scsi/scsi_lib.c	2006-05-31 22:22:34.000000000 -0700
@@ -367,7 +367,7 @@ static int scsi_req_map_sg(struct reques
 			   int nsegs, unsigned bufflen, gfp_t gfp)
 {
 	struct request_queue *q = rq->q;
-	int nr_pages = PAGE_ALIGN(bufflen + sgl[0].offset);
+	int nr_pages = (bufflen + sgl[0].offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
 	unsigned int data_len = 0, len, bytes, off;
 	struct page *page;
 	struct bio *bio = NULL;
_


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GIT PATCH] scsi bug fixes for 2.6.17-rc5
  2006-06-01  5:24   ` Andrew Morton
@ 2006-06-01 14:09     ` James Bottomley
  2006-06-01 15:06       ` James Bottomley
  0 siblings, 1 reply; 6+ messages in thread
From: James Bottomley @ 2006-06-01 14:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Kai Makisara, torvalds, linux-scsi, linux-kernel

On Wed, 2006-05-31 at 22:24 -0700, Andrew Morton wrote:
> argh, that was me "improving" things.

That'll teach me to take your patches without checking them ...

I reversed this from the scsi-rc-fixes tree ... I'll reapply the correct
version.

James



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [GIT PATCH] scsi bug fixes for 2.6.17-rc5
  2006-06-01 14:09     ` James Bottomley
@ 2006-06-01 15:06       ` James Bottomley
  0 siblings, 0 replies; 6+ messages in thread
From: James Bottomley @ 2006-06-01 15:06 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Kai Makisara, torvalds, linux-scsi, linux-kernel

On Thu, 2006-06-01 at 09:09 -0500, James Bottomley wrote:
> I reversed this from the scsi-rc-fixes tree ... I'll reapply the correct
> version.

OK, it should be redone with the original correct version ... we're
lucky Linus is being slow today ...

James



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-06-01 15:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-31 16:26 [GIT PATCH] scsi bug fixes for 2.6.17-rc5 James Bottomley
2006-06-01  5:05 ` Kai Makisara
2006-06-01  5:24   ` Andrew Morton
2006-06-01 14:09     ` James Bottomley
2006-06-01 15:06       ` James Bottomley
  -- strict thread matches above, loose matches on Subject: below --
2006-05-27 20:07 James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox