Re: [RFC 07/15] PM / Hibernate: add sws_modules_ops

Pavel Machek
2010-03-24T20:36:34Z

On Tue 2010-03-23 17:17:35, Jiri Slaby wrote:
> For now they will only hold swap operations. In next patches, user
> support will be converted to ops as well to have a single layer and
> can push pages instead of pulling them.

> +struct sws_module_ops {
> + unsigned long (*storage_available)(void);
> +
> + int (*get_reader)(unsigned int *flags_p);
> + int (*put_reader)(void);
> + int (*get_writer)(void);
> + int (*put_writer)(unsigned int flags, int error);
> + int (*read_page)(void *addr, struct bio **bio_chain);
> + int (*write_page)(void *addr, struct bio **bio_chain);
> +};

sws_ prefix is strange.

Plus, could we get some docs what it does? Stuff like "get_writer" is
not entirely self-documenting.

Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html