1ae98043fSRyusuke Konishi /* SPDX-License-Identifier: GPL-2.0+ */ 2a17564f5SKoji Sato /* 3*94ee1d91SRyusuke Konishi * NILFS disk address translation. 4a17564f5SKoji Sato * 5a17564f5SKoji Sato * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation. 6a17564f5SKoji Sato * 74b420ab4SRyusuke Konishi * Written by Koji Sato. 8a17564f5SKoji Sato */ 9a17564f5SKoji Sato 10a17564f5SKoji Sato #ifndef _NILFS_DAT_H 11a17564f5SKoji Sato #define _NILFS_DAT_H 12a17564f5SKoji Sato 13a17564f5SKoji Sato #include <linux/types.h> 14a17564f5SKoji Sato #include <linux/buffer_head.h> 15a17564f5SKoji Sato #include <linux/fs.h> 16e63e88bcSRyusuke Konishi #include <linux/nilfs2_ondisk.h> /* nilfs_inode, nilfs_checkpoint */ 17a17564f5SKoji Sato 18a17564f5SKoji Sato 19a17564f5SKoji Sato struct nilfs_palloc_req; 20a17564f5SKoji Sato 21a17564f5SKoji Sato int nilfs_dat_translate(struct inode *, __u64, sector_t *); 22a17564f5SKoji Sato 23a17564f5SKoji Sato int nilfs_dat_prepare_alloc(struct inode *, struct nilfs_palloc_req *); 24a17564f5SKoji Sato void nilfs_dat_commit_alloc(struct inode *, struct nilfs_palloc_req *); 25a17564f5SKoji Sato void nilfs_dat_abort_alloc(struct inode *, struct nilfs_palloc_req *); 26a17564f5SKoji Sato int nilfs_dat_prepare_start(struct inode *, struct nilfs_palloc_req *); 27a17564f5SKoji Sato void nilfs_dat_commit_start(struct inode *, struct nilfs_palloc_req *, 28a17564f5SKoji Sato sector_t); 29a17564f5SKoji Sato int nilfs_dat_prepare_end(struct inode *, struct nilfs_palloc_req *); 30a17564f5SKoji Sato void nilfs_dat_commit_end(struct inode *, struct nilfs_palloc_req *, int); 31a17564f5SKoji Sato void nilfs_dat_abort_end(struct inode *, struct nilfs_palloc_req *); 32bd8169efSRyusuke Konishi int nilfs_dat_prepare_update(struct inode *, struct nilfs_palloc_req *, 33bd8169efSRyusuke Konishi struct nilfs_palloc_req *); 34bd8169efSRyusuke Konishi void nilfs_dat_commit_update(struct inode *, struct nilfs_palloc_req *, 35bd8169efSRyusuke Konishi struct nilfs_palloc_req *, int); 36bd8169efSRyusuke Konishi void nilfs_dat_abort_update(struct inode *, struct nilfs_palloc_req *, 37bd8169efSRyusuke Konishi struct nilfs_palloc_req *); 38a17564f5SKoji Sato 39a17564f5SKoji Sato int nilfs_dat_mark_dirty(struct inode *, __u64); 40a17564f5SKoji Sato int nilfs_dat_freev(struct inode *, __u64 *, size_t); 41a17564f5SKoji Sato int nilfs_dat_move(struct inode *, __u64, sector_t); 420c6c44cbSRyusuke Konishi ssize_t nilfs_dat_get_vinfo(struct inode *, void *, unsigned int, size_t); 43a17564f5SKoji Sato 44f1e89c86SRyusuke Konishi int nilfs_dat_read(struct super_block *sb, size_t entry_size, 45f1e89c86SRyusuke Konishi struct nilfs_inode *raw_inode, struct inode **inodep); 4679739565SRyusuke Konishi 47a17564f5SKoji Sato #endif /* _NILFS_DAT_H */ 48