Linux Kernel
3.7.1
|
#include <power.h>
Data Fields | |
unsigned int | cur |
void * | buffer |
int | sync_read |
Auxiliary structure used for reading the snapshot image data and metadata from and writing them to the list of page backup entries (PBEs) which is the main data structure of swsusp.
Using struct snapshot_handle we can transfer the image, including its metadata, as a continuous sequence of bytes with the help of snapshot_read_next() and snapshot_write_next().
The code that writes the image to a storage or transfers it to the user land is required to use snapshot_read_next() for this purpose and it should not make any assumptions regarding the internal structure of the image. Similarly, the code that reads the image from a storage or transfers it from the user land is required to use snapshot_write_next().
This may allow us to change the internal structure of the image in the future with considerably less effort.