linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* WARN_ON(buflen > PAGE_SIZE) libata-core.c
@ 2004-09-01 20:08 Andy Warner
  2004-09-17  0:49 ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Warner @ 2004-09-01 20:08 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide

I'm working on a tree pulled directly from
bk://gkernel.bkbits.net/libata-2.6

In libata-core.c:ata_sg_init_one() there is:

	WARN_ON(buflen > PAGE_SIZE);

Which (unsurpsingly) triggers for all non-tiny
transfers (I'm using sg_utils to generate disk
traffic.)

It's obviously there for a reason, what would
I need to do to get past it. Give me some background
and maybe I can come up with a patch :)
-- 
andyw@pobox.com

Andy Warner		Voice: (612) 801-8549	Fax: (208) 575-5634

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

* Re: WARN_ON(buflen > PAGE_SIZE) libata-core.c
  2004-09-01 20:08 WARN_ON(buflen > PAGE_SIZE) libata-core.c Andy Warner
@ 2004-09-17  0:49 ` Jeff Garzik
  2004-09-17  2:34   ` Andy Warner
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2004-09-17  0:49 UTC (permalink / raw)
  To: Andy Warner; +Cc: linux-ide

Andy Warner wrote:
> I'm working on a tree pulled directly from
> bk://gkernel.bkbits.net/libata-2.6
> 
> In libata-core.c:ata_sg_init_one() there is:
> 
> 	WARN_ON(buflen > PAGE_SIZE);
> 
> Which (unsurpsingly) triggers for all non-tiny
> transfers (I'm using sg_utils to generate disk
> traffic.)
> 
> It's obviously there for a reason, what would
> I need to do to get past it. Give me some background
> and maybe I can come up with a patch :)


A non-scatter-gather transfer is assumed to be one page in length, using 
only a single 'struct scatterlist' element.  You could probably "cheat" 
and indicate the scatterlist element is longer than PAGE_SIZE, but make 
sure to review all code paths...

	Jeff



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

* Re: WARN_ON(buflen > PAGE_SIZE) libata-core.c
  2004-09-17  0:49 ` Jeff Garzik
@ 2004-09-17  2:34   ` Andy Warner
  2004-09-17  2:39     ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Warner @ 2004-09-17  2:34 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: linux-ide

Jeff Garzik wrote:
> [...]
> > In libata-core.c:ata_sg_init_one() there is:
> > 
> > 	WARN_ON(buflen > PAGE_SIZE);
> [...]
> A non-scatter-gather transfer is assumed to be one page in length, using 
> only a single 'struct scatterlist' element.  You could probably "cheat" 
> and indicate the scatterlist element is longer than PAGE_SIZE, but make 
> sure to review all code paths...

Bear with me, if I'm being dense, but why is that a valid
assumption ? Is it because in most instances, such requests
are made by filesystem code, as opposed to arbitrary user
initiated I/O ?
-- 
andyw@pobox.com

Andy Warner		Voice: (612) 801-8549	Fax: (208) 575-5634

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

* Re: WARN_ON(buflen > PAGE_SIZE) libata-core.c
  2004-09-17  2:34   ` Andy Warner
@ 2004-09-17  2:39     ` Jeff Garzik
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2004-09-17  2:39 UTC (permalink / raw)
  To: Andy Warner; +Cc: linux-ide

Andy Warner wrote:
> Jeff Garzik wrote:
> 
>>[...]
>>
>>>In libata-core.c:ata_sg_init_one() there is:
>>>
>>>	WARN_ON(buflen > PAGE_SIZE);
>>
>>[...]
>>A non-scatter-gather transfer is assumed to be one page in length, using 
>>only a single 'struct scatterlist' element.  You could probably "cheat" 
>>and indicate the scatterlist element is longer than PAGE_SIZE, but make 
>>sure to review all code paths...
> 
> 
> Bear with me, if I'm being dense, but why is that a valid
> assumption ? Is it because in most instances, such requests
> are made by filesystem code, as opposed to arbitrary user
> initiated I/O ?

A struct scatterlist is a list of page/offset/length triplets, so it 
breaks the model if a triplet extends past a page boundary.

	Jeff



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

end of thread, other threads:[~2004-09-17  2:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-01 20:08 WARN_ON(buflen > PAGE_SIZE) libata-core.c Andy Warner
2004-09-17  0:49 ` Jeff Garzik
2004-09-17  2:34   ` Andy Warner
2004-09-17  2:39     ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).