Linux Kernel
3.7.1
|
Go to the source code of this file.
Functions | |
int | nilfs_cpfile_get_checkpoint (struct inode *, __u64, int, struct nilfs_checkpoint **, struct buffer_head **) |
void | nilfs_cpfile_put_checkpoint (struct inode *, __u64, struct buffer_head *) |
int | nilfs_cpfile_delete_checkpoints (struct inode *, __u64, __u64) |
int | nilfs_cpfile_delete_checkpoint (struct inode *, __u64) |
int | nilfs_cpfile_change_cpmode (struct inode *, __u64, int) |
int | nilfs_cpfile_is_snapshot (struct inode *, __u64) |
int | nilfs_cpfile_get_stat (struct inode *, struct nilfs_cpstat *) |
ssize_t | nilfs_cpfile_get_cpinfo (struct inode *, __u64 *, int, void *, unsigned, size_t) |
int | nilfs_cpfile_read (struct super_block *sb, size_t cpsize, struct nilfs_inode *raw_inode, struct inode **inodep) |
nilfs_cpfile_change_cpmode - change checkpoint mode : inode of checkpoint file : checkpoint number : mode of checkpoint
Description: nilfs_change_cpmode() changes the mode of the checkpoint specified by . The mode is NILFS_CHECKPOINT or NILFS_SNAPSHOT.
Return Value: On success, 0 is returned. On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
%-ENOENT - No such checkpoint.
nilfs_cpfile_delete_checkpoints - delete checkpoints : inode of checkpoint file : start checkpoint number : end checkpoint numer
Description: nilfs_cpfile_delete_checkpoints() deletes the checkpoints in the period from to , excluding itself. The checkpoints which have been already deleted are ignored.
Return Value: On success, 0 is returned. On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
%-EINVAL - invalid checkpoints.
int nilfs_cpfile_get_checkpoint | ( | struct inode * | cpfile, |
__u64 | cno, | ||
int | create, | ||
struct nilfs_checkpoint ** | cpp, | ||
struct buffer_head ** | bhp | ||
) |
nilfs_cpfile_get_checkpoint - get a checkpoint : inode of checkpoint file : checkpoint number : create flag : pointer to a checkpoint : pointer to a buffer head
Description: nilfs_cpfile_get_checkpoint() acquires the checkpoint specified by . A new checkpoint will be created if is the current checkpoint number and is nonzero.
Return Value: On success, 0 is returned, and the checkpoint and the buffer head of the buffer on which the checkpoint is located are stored in the place pointed by and , respectively. On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
%-ENOENT - No such checkpoint.
%-EINVAL - invalid checkpoint.
int nilfs_cpfile_get_stat | ( | struct inode * | cpfile, |
struct nilfs_cpstat * | cpstat | ||
) |
nilfs_cpfile_get_stat - get checkpoint statistics : inode of checkpoint file : pointer to a structure of checkpoint statistics
Description: nilfs_cpfile_get_stat() returns information about checkpoints.
Return Value: On success, 0 is returned, and checkpoints information is stored in the place pointed by . On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
nilfs_cpfile_is_snapshot - : inode of checkpoint file : checkpoint number
Description:
Return Value: On success, 1 is returned if the checkpoint specified by is a snapshot, or 0 if not. On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
%-ENOENT - No such checkpoint.
nilfs_cpfile_put_checkpoint - put a checkpoint : inode of checkpoint file : checkpoint number : buffer head
Description: nilfs_cpfile_put_checkpoint() releases the checkpoint specified by . must be the buffer head which has been returned by a previous call to nilfs_cpfile_get_checkpoint() with .
int nilfs_cpfile_read | ( | struct super_block * | sb, |
size_t | cpsize, | ||
struct nilfs_inode * | raw_inode, | ||
struct inode ** | inodep | ||
) |