On Tue, Oct 23 2007, David Miller wrote:That should work - once you verify that, would you mind testing this one as well? Thanks! diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c index 61c2e39..290836f 100644 --- a/block/ll_rw_blk.c +++ b/block/ll_rw_blk.c @@ -1352,7 +1352,7 @@ new_segment: if (!sg) sg = sglist; else - sg = sg_next(sg); + sg = sg_next_force(sg); sg_dma_len(sg) = 0; sg_dma_address(sg) = 0; diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 42daf5e..a98a2ee 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h @@ -99,6 +99,22 @@ static inline struct scatterlist *sg_next(struct scatterlist *sg) return sg; } +/** + * sg_next_force - return the next scatterlist entry in a list + * @sg: The current sg entry + * + * Description: + * Must only be used when more entries beyond this one is known to exist, + * as it clears the termination bit. Useful to avoid adding a full sg + * table init on every mapping. + * + **/ +static inline struct scatterlist *sg_next_force(struct scatterlist *sg) +{ + sg->page_link &= ~0x02; + return sg_next(sg); +} + /* * Loop over each sg element, following the pointer to a new list if necessary */ -- Jens Axboe -
| debian developer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| H. Peter Anvin | Re: [PATCH] x86: Construct 32 bit boot time page tables in native format. |
| Christoph Lameter | Re: [RFC 00/15] x86_64: Optimize percpu accesses |
git: | |
| Christoph Hellwig | Re: [PATCH 06/32] IGET: Mark iget() and read_inode() as being obsolete [try #2] |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
