1a17564f5SKoji Sato /* 2a17564f5SKoji Sato * dat.h - NILFS disk address translation. 3a17564f5SKoji Sato * 4a17564f5SKoji Sato * Copyright (C) 2006-2008 Nippon Telegraph and Telephone Corporation. 5a17564f5SKoji Sato * 6a17564f5SKoji Sato * This program is free software; you can redistribute it and/or modify 7a17564f5SKoji Sato * it under the terms of the GNU General Public License as published by 8a17564f5SKoji Sato * the Free Software Foundation; either version 2 of the License, or 9a17564f5SKoji Sato * (at your option) any later version. 10a17564f5SKoji Sato * 11a17564f5SKoji Sato * This program is distributed in the hope that it will be useful, 12a17564f5SKoji Sato * but WITHOUT ANY WARRANTY; without even the implied warranty of 13a17564f5SKoji Sato * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14a17564f5SKoji Sato * GNU General Public License for more details. 15a17564f5SKoji Sato * 16a17564f5SKoji Sato * You should have received a copy of the GNU General Public License 17a17564f5SKoji Sato * along with this program; if not, write to the Free Software 18a17564f5SKoji Sato * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19a17564f5SKoji Sato * 20a17564f5SKoji Sato * Written by Koji Sato <koji@osrg.net>. 21a17564f5SKoji Sato */ 22a17564f5SKoji Sato 23a17564f5SKoji Sato #ifndef _NILFS_DAT_H 24a17564f5SKoji Sato #define _NILFS_DAT_H 25a17564f5SKoji Sato 26a17564f5SKoji Sato #include <linux/types.h> 27a17564f5SKoji Sato #include <linux/buffer_head.h> 28a17564f5SKoji Sato #include <linux/fs.h> 29a17564f5SKoji Sato 30a17564f5SKoji Sato 31a17564f5SKoji Sato struct nilfs_palloc_req; 32a17564f5SKoji Sato 33a17564f5SKoji Sato int nilfs_dat_translate(struct inode *, __u64, sector_t *); 34a17564f5SKoji Sato 35a17564f5SKoji Sato int nilfs_dat_prepare_alloc(struct inode *, struct nilfs_palloc_req *); 36a17564f5SKoji Sato void nilfs_dat_commit_alloc(struct inode *, struct nilfs_palloc_req *); 37a17564f5SKoji Sato void nilfs_dat_abort_alloc(struct inode *, struct nilfs_palloc_req *); 38a17564f5SKoji Sato int nilfs_dat_prepare_start(struct inode *, struct nilfs_palloc_req *); 39a17564f5SKoji Sato void nilfs_dat_commit_start(struct inode *, struct nilfs_palloc_req *, 40a17564f5SKoji Sato sector_t); 41a17564f5SKoji Sato int nilfs_dat_prepare_end(struct inode *, struct nilfs_palloc_req *); 42a17564f5SKoji Sato void nilfs_dat_commit_end(struct inode *, struct nilfs_palloc_req *, int); 43a17564f5SKoji Sato void nilfs_dat_abort_end(struct inode *, struct nilfs_palloc_req *); 44*bd8169efSRyusuke Konishi int nilfs_dat_prepare_update(struct inode *, struct nilfs_palloc_req *, 45*bd8169efSRyusuke Konishi struct nilfs_palloc_req *); 46*bd8169efSRyusuke Konishi void nilfs_dat_commit_update(struct inode *, struct nilfs_palloc_req *, 47*bd8169efSRyusuke Konishi struct nilfs_palloc_req *, int); 48*bd8169efSRyusuke Konishi void nilfs_dat_abort_update(struct inode *, struct nilfs_palloc_req *, 49*bd8169efSRyusuke Konishi struct nilfs_palloc_req *); 50a17564f5SKoji Sato 51a17564f5SKoji Sato int nilfs_dat_mark_dirty(struct inode *, __u64); 52a17564f5SKoji Sato int nilfs_dat_freev(struct inode *, __u64 *, size_t); 53a17564f5SKoji Sato int nilfs_dat_move(struct inode *, __u64, sector_t); 54003ff182SRyusuke Konishi ssize_t nilfs_dat_get_vinfo(struct inode *, void *, unsigned, size_t); 55a17564f5SKoji Sato 56a17564f5SKoji Sato #endif /* _NILFS_DAT_H */ 57