WARN_ON(buflen > PAGE_SIZE) libata-core.c
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 :)
Signature · 3 lines
[email protected] Andy Warner Voice: (612) 801-8549 Fax: (208) 575-5634
Quoted 7 lines · Andy Warner
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);
Quoted 7 lines
Which (unsurpsingly) triggers for all non-tiny transfers (I'm using
sg_utilsto 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
Quoted 9 lines · Jeff Garzik
[...]
Quoted 3 lines
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 thanPAGE_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 ?
Signature · 3 lines
[email protected] Andy Warner Voice: (612) 801-8549 Fax: (208) 575-5634
Quoted 8 lines · Andy Warner
Quoted 6 lines · Jeff Garzik
[...]
Quoted 3 lines
In libata-core.c:ata_sg_init_one() there is:
WARN_ON(buflen > PAGE_SIZE);
Quoted 8 lines
Quoted 2 lines
[...]
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 thanPAGE_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