0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef _NILFS_DAT_H
0011 #define _NILFS_DAT_H
0012
0013 #include <linux/types.h>
0014 #include <linux/buffer_head.h>
0015 #include <linux/fs.h>
0016 #include <linux/nilfs2_ondisk.h> /* nilfs_inode, nilfs_checkpoint */
0017
0018
0019 struct nilfs_palloc_req;
0020
0021 int nilfs_dat_translate(struct inode *, __u64, sector_t *);
0022
0023 int nilfs_dat_prepare_alloc(struct inode *, struct nilfs_palloc_req *);
0024 void nilfs_dat_commit_alloc(struct inode *, struct nilfs_palloc_req *);
0025 void nilfs_dat_abort_alloc(struct inode *, struct nilfs_palloc_req *);
0026 int nilfs_dat_prepare_start(struct inode *, struct nilfs_palloc_req *);
0027 void nilfs_dat_commit_start(struct inode *, struct nilfs_palloc_req *,
0028 sector_t);
0029 int nilfs_dat_prepare_end(struct inode *, struct nilfs_palloc_req *);
0030 void nilfs_dat_commit_end(struct inode *, struct nilfs_palloc_req *, int);
0031 void nilfs_dat_abort_end(struct inode *, struct nilfs_palloc_req *);
0032 int nilfs_dat_prepare_update(struct inode *, struct nilfs_palloc_req *,
0033 struct nilfs_palloc_req *);
0034 void nilfs_dat_commit_update(struct inode *, struct nilfs_palloc_req *,
0035 struct nilfs_palloc_req *, int);
0036 void nilfs_dat_abort_update(struct inode *, struct nilfs_palloc_req *,
0037 struct nilfs_palloc_req *);
0038
0039 int nilfs_dat_mark_dirty(struct inode *, __u64);
0040 int nilfs_dat_freev(struct inode *, __u64 *, size_t);
0041 int nilfs_dat_move(struct inode *, __u64, sector_t);
0042 ssize_t nilfs_dat_get_vinfo(struct inode *, void *, unsigned int, size_t);
0043
0044 int nilfs_dat_read(struct super_block *sb, size_t entry_size,
0045 struct nilfs_inode *raw_inode, struct inode **inodep);
0046
0047 #endif