|
Linux Kernel
3.7.1
|
#include <linux/kernel.h>#include <linux/fs.h>#include <linux/string.h>#include <linux/buffer_head.h>#include <linux/errno.h>#include <linux/nilfs2_fs.h>#include "mdt.h"#include "cpfile.h"Go to the source code of this file.
Functions | |
| int | nilfs_cpfile_get_checkpoint (struct inode *cpfile, __u64 cno, int create, struct nilfs_checkpoint **cpp, struct buffer_head **bhp) |
| void | nilfs_cpfile_put_checkpoint (struct inode *cpfile, __u64 cno, struct buffer_head *bh) |
| int | nilfs_cpfile_delete_checkpoints (struct inode *cpfile, __u64 start, __u64 end) |
| ssize_t | nilfs_cpfile_get_cpinfo (struct inode *cpfile, __u64 *cnop, int mode, void *buf, unsigned cisz, size_t nci) |
| int | nilfs_cpfile_delete_checkpoint (struct inode *cpfile, __u64 cno) |
| int | nilfs_cpfile_is_snapshot (struct inode *cpfile, __u64 cno) |
| int | nilfs_cpfile_change_cpmode (struct inode *cpfile, __u64 cno, int mode) |
| int | nilfs_cpfile_get_stat (struct inode *cpfile, struct nilfs_cpstat *cpstat) |
| 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 | ||
| ) |
1.8.2