1/* 2 * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. 3 * All Rights Reserved. 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License as 7 * published by the Free Software Foundation. 8 * 9 * This program is distributed in the hope that it would be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write the Free Software Foundation, 16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18#ifndef __XFS_INODE_BUF_H__ 19#define __XFS_INODE_BUF_H__ 20 21struct xfs_inode; 22struct xfs_dinode; 23struct xfs_icdinode; 24 25/* 26 * Inode location information. Stored in the inode and passed to 27 * xfs_imap_to_bp() to get a buffer and dinode for a given inode. 28 */ 29struct xfs_imap { 30 xfs_daddr_t im_blkno; /* starting BB of inode chunk */ 31 ushort im_len; /* length in BBs of inode chunk */ 32 ushort im_boffset; /* inode offset in block in bytes */ 33}; 34 35int xfs_imap_to_bp(struct xfs_mount *, struct xfs_trans *, 36 struct xfs_imap *, struct xfs_dinode **, 37 struct xfs_buf **, uint, uint); 38int xfs_iread(struct xfs_mount *, struct xfs_trans *, 39 struct xfs_inode *, uint); 40void xfs_dinode_calc_crc(struct xfs_mount *, struct xfs_dinode *); 41void xfs_dinode_to_disk(struct xfs_dinode *to, struct xfs_icdinode *from); 42void xfs_dinode_from_disk(struct xfs_icdinode *to, struct xfs_dinode *from); 43 44#if defined(DEBUG) 45void xfs_inobp_check(struct xfs_mount *, struct xfs_buf *); 46#else 47#define xfs_inobp_check(mp, bp) 48#endif /* DEBUG */ 49 50#endif /* __XFS_INODE_BUF_H__ */ 51