On Fri, 26 Oct 2007, Paul Mackerras wrote:Yes, for allocation purposes you'd need the size ahead of time, agreed. Otherwise you have to walk the list twice. Hmm. Depending on where you do this, and if this is some block-layer specific driver/code (rather than necessarily a generic SG thing), you do have the req->nr_phys_segments thing which should be that for you (ie the SG list may have _fewer_ requests in it in case some of those entries got squashed together due to be contiguous). But yeah, I don't think it would be wrong at all to have a struct scatterlist_head { unsigned int entries; unsigned int flags; /* ? */ struct scatterlist *sg; }; which would be passed down at higher levels. Linus -
| Adrian Bunk | Re: Linux 2.6.21 |
| Linus Torvalds | Linux 2.6.21-rc2 |
| WANG Cong | [-mm Patch] UML: fix a building error |
| Roland McGrath | Re: [PATCH 0/5] ftrace: to kill a daemon |
git: | |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Patrick McHardy | Re: [PATCH] netfilter: use per-cpu spinlock rather than RCU (v3) |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Theodore Ts'o | Re: cc1 fails silently |
| Michael Nolan | Power routines on notebook cause kernel panic |
| Marc Peters | v 0.11 boot disk problem |
| Dave `geek' Gymer | WARNING (was Re: New afio release) |
