User`s guide

Managing Lustre I/O with the Snapshot Library [6]
For large data transfers starting at the beginning of a file, the best functions to use
are dslr_snapshot and dslr_restore, because they are able to transfer
data in parallel to achieve high throughput. To store data, the application calls
dslr_snapshot, specifying the buffer to be copied, the length of the data, and the
name of the file receiving the data. To read back (restore) data from the file into
application memory, the application calls dslr_restore, specifying the buffer
receiving the data, the length of the data to read, and the name of the file providing
the data. Because this name will be used by all instances of fsworker to open and
read or write the file the file name should be an absolute path name to the location
of the file on the service partition. A relative path name could be ambiguous or
meaningless to a particular fsworker.
A typical application might use dslr_restore and dslr_snapshot in the
following manner:
1. Start up and allocate a large buffer to hold a data set.
2. Call dslr_restore specifying the name of the file providing the data, the
buffer allocated in step 1, and the length of that buffer.
3. Process and change the data set.
4. Call dslr_snapshot to store the data set back to the file (or to a new modified
data file).
5. If necessary repeat 3 and 4, using the snapshots as a way to preserve forward
progress.
The dslr_pwrite and dslr_pread functions are provided for transferring
smaller amounts of data between a buffer and arbitrary locations in a file. To write
data to a file, the application calls dslr_pwrite specifying the endpoint-ID of a
single fsworker, the name of the file, the offset of the data in the file, a pointer to a
buffer from which to take the data, and the length of the data to be written. To read
data from a file, the application calls dslr_pread specifying the endpoint-ID of
a single fsworker, the name of the file, the offset of the data in the file, a pointer
to a buffer into which to put the data, and the length of the data to be read. Again,
absolute path names for files are strongly recommended.
S247920 69