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

From: Pavel Machek
Date: Wed Mar 24 2010 - 16:36:48 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/