scatterlist: new helper functions
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.cdriver.
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.