diff options
author | Tejun Heo <htejun@gmail.com> | 2008-07-19 10:03:35 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2008-07-23 08:42:09 -0400 |
commit | 137d3edb48425f82a6a4226b664f90ed5e42eea5 (patch) | |
tree | 0fc5845a0082686f0c5ebc87c9e48ac34e6265b7 /ipc | |
parent | 60c9c7b1d91396f511e55a2a5be13d148dcf66ff (diff) |
sg: reimplement sg mapping iterator
This is alternative implementation of sg content iterator introduced
by commit 83e7d317... from Pierre Ossman in next-20080716. As there's
already an sg iterator which iterates over sg entries themselves, name
this sg_mapping_iterator.
Slightly edited description from the original implementation follows.
Iteration over a sg list is not that trivial when you take into
account that memory pages might have to be mapped before being used.
Unfortunately, that means that some parts of the kernel restrict
themselves to directly accesible memory just to not have to deal with
the mess.
This patch adds a simple iterator system that allows any code to
easily traverse an sg list and not have to deal with all the details.
The user can decide to consume part of the iteration. Also, iteration
can be stopped and resumed later if releasing the kmap between
iteration steps is necessary. These features are useful to implement
piecemeal sg copying for interrupt drive PIO for example.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions