Thread (16 messages) 16 messages, 4 authors, 2007-10-31

Re: [PATCH]: Fix networking scatterlist regressions.

From: Jens Axboe <hidden>
Date: 2007-10-31 09:32:09

On Wed, Oct 31 2007, David Miller wrote:
From: Jens Axboe <redacted>
Date: Wed, 31 Oct 2007 09:14:28 +0100
quoted
Subject: [PATCH] [SG] Get rid of __sg_mark_end()

sg_mark_end() overwrites the page_link information, but all users want
__sg_mark_end() behaviour where we just set the end bit. That is the most
natural way to use the sg list, since you'll fill it in and then mark the
end point.

So change sg_mark_end() to only set the termination bit. Add a sg_magic
debug check as well, and clear a chain pointer if it is set.

Signed-off-by: Jens Axboe <redacted>
It doesn't build.  I suspect there is something else in your tree
that is necessary for this patch to work on it's own.
Builds here. But yes, it's on top of other patches, it was merely for
demonstration purposes that I posted it. Locally sg_init_one() uses
sg_init_table() here, it doesn't open code the init:

static inline void sg_init_one(struct scatterlist *sg, const void *buf,
                               unsigned int buflen)
{
        sg_init_table(sg, 1);
        sg_set_buf(sg, buf, buflen);
}


-- 
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help