Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
cpfile.h File Reference
#include <linux/fs.h>
#include <linux/buffer_head.h>
#include <linux/nilfs2_fs.h>

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)
 

Function Documentation

int nilfs_cpfile_change_cpmode ( struct inode cpfile,
__u64  cno,
int  mode 
)

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.

Definition at line 868 of file cpfile.c.

int nilfs_cpfile_delete_checkpoint ( struct inode cpfile,
__u64  cno 
)

nilfs_cpfile_delete_checkpoint - : :

Definition at line 544 of file cpfile.c.

int nilfs_cpfile_delete_checkpoints ( struct inode cpfile,
__u64  start,
__u64  end 
)

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.

Definition at line 278 of file cpfile.c.

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.

Definition at line 181 of file cpfile.c.

ssize_t nilfs_cpfile_get_cpinfo ( struct inode cpfile,
__u64 cnop,
int  mode,
void buf,
unsigned  cisz,
size_t  nci 
)

nilfs_cpfile_get_cpinfo - : : : :

Definition at line 526 of file cpfile.c.

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.

Definition at line 907 of file cpfile.c.

int nilfs_cpfile_is_snapshot ( struct inode cpfile,
__u64  cno 
)

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.

Definition at line 820 of file cpfile.c.

void nilfs_cpfile_put_checkpoint ( struct inode cpfile,
__u64  cno,
struct buffer_head *  bh 
)

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 .

Definition at line 252 of file cpfile.c.

int nilfs_cpfile_read ( struct super_block sb,
size_t  cpsize,
struct nilfs_inode raw_inode,
struct inode **  inodep 
)

nilfs_cpfile_read - read or get cpfile inode : super block instance : size of a checkpoint entry : on-disk cpfile inode : buffer to store the inode

Definition at line 939 of file cpfile.c.