Skip to contentSkip to conversation

scatterlist: new helper functions

PATCH Alex Dubov 1 participant 1 message Jan 11, 2011

lore
Share & tools
lore

Alex Dubov

author
#0 lore raw
Quoted 4 lines

The functions that were added:

* sg_nents/sg_total_len - interate over sg list to figure

You've got a typo here.

Quoted 6 lines

out its total len, number of entries.
Useful for not keeping that information in side channels.

Allows to transparetly compare contents of the sg list to given linear

And here.

Quoted 6 lines

buffer.
If needed later, a function that compares two sgs can be added.

All of this code is used by my ms_block.c driver.

I definitely find this useful.
But, of course, we need to ask somebody from the memory management department to look at it, as this patch is intended to be not memorystick specific.