Hi,
I addressed the comments I got on the previous RFC. I left the handles
in place, the functions in hibernate_io_ops now works on them. Further
I got rid of the memory barriers and minimized global variables as much
as possible. Comments welcome.
--
Some code, which will be moved out of swap.c, will know nothing about
swap. There will be also other than swap writers later, so that it
won't make sense at all.
So introduce a new structure called hibernate_io_handle which
currently contains only a pointer to private data, but is independent
on I/O reader/writer actually used. Private data are swap_map_handle
for now.
This structure is allocated in _start and freed in _finish. This will
correspond to the later introduction of hibernate_io_ops where users
will do handle=start->repeat{read/write(handle)}->finish(handle).
I.e. they will operate on handle instead of global variables.