From da1650a5d6026df1bde414173c40bbe09305e6e6 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 2 Nov 2005 10:21:35 +1100 Subject: [XFS] Add format checking to cmn_err and icmn_err SGI-PV: 942243 SGI-Modid: xfs-linux:xfs-kern:198658a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott --- fs/xfs/xfs_ialloc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'fs/xfs/xfs_ialloc.c') diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index ce5fee9eaec..02989691e4a 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c @@ -957,8 +957,11 @@ xfs_difree( agino = XFS_INO_TO_AGINO(mp, inode); if (inode != XFS_AGINO_TO_INO(mp, agno, agino)) { cmn_err(CE_WARN, - "xfs_difree: inode != XFS_AGINO_TO_INO() (%d != %d) on %s. Returning EINVAL.", - inode, XFS_AGINO_TO_INO(mp, agno, agino), mp->m_fsname); + "xfs_difree: inode != XFS_AGINO_TO_INO() " + "(%llu != %llu) on %s. Returning EINVAL.", + (unsigned long long)inode, + (unsigned long long)XFS_AGINO_TO_INO(mp, agno, agino), + mp->m_fsname); ASSERT(0); return XFS_ERROR(EINVAL); } -- cgit v1.2.3-70-g09d2 From a844f4510dce23c07f3923cb42138f5fdd745017 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Wed, 2 Nov 2005 14:38:42 +1100 Subject: [XFS] Remove xfs_macros.c, xfs_macros.h, rework headers a whole lot. SGI-PV: 943122 SGI-Modid: xfs-linux:xfs-kern:23901a Signed-off-by: Nathan Scott --- fs/xfs/linux-2.6/xfs_aops.c | 11 +- fs/xfs/linux-2.6/xfs_file.c | 5 +- fs/xfs/linux-2.6/xfs_ioctl.c | 19 +- fs/xfs/linux-2.6/xfs_iops.c | 13 +- fs/xfs/linux-2.6/xfs_lrw.c | 18 +- fs/xfs/linux-2.6/xfs_lrw.h | 5 - fs/xfs/linux-2.6/xfs_super.c | 15 +- fs/xfs/linux-2.6/xfs_sysctl.c | 18 +- fs/xfs/linux-2.6/xfs_vfs.c | 2 - fs/xfs/quota/xfs_dquot.c | 12 +- fs/xfs/quota/xfs_dquot_item.c | 13 +- fs/xfs/quota/xfs_qm.c | 17 +- fs/xfs/quota/xfs_qm_bhv.c | 16 +- fs/xfs/quota/xfs_qm_stats.c | 15 +- fs/xfs/quota/xfs_qm_syscalls.c | 16 +- fs/xfs/quota/xfs_trans_dquot.c | 12 +- fs/xfs/xfs.h | 3 - fs/xfs/xfs_acl.c | 12 +- fs/xfs/xfs_ag.h | 150 ++--------- fs/xfs/xfs_alloc.c | 18 +- fs/xfs/xfs_alloc_btree.c | 18 +- fs/xfs/xfs_alloc_btree.h | 135 ++-------- fs/xfs/xfs_attr.c | 21 +- fs/xfs/xfs_attr_leaf.c | 21 +- fs/xfs/xfs_attr_leaf.h | 77 +++--- fs/xfs/xfs_attr_sf.h | 29 +- fs/xfs/xfs_bit.h | 36 ++- fs/xfs/xfs_bmap.c | 24 +- fs/xfs/xfs_bmap.h | 19 +- fs/xfs/xfs_bmap_btree.c | 20 +- fs/xfs/xfs_bmap_btree.h | 596 +++++++++++------------------------------ fs/xfs/xfs_btree.c | 20 +- fs/xfs/xfs_btree.h | 120 +-------- fs/xfs/xfs_buf_item.c | 18 +- fs/xfs/xfs_da_btree.c | 20 +- fs/xfs/xfs_da_btree.h | 68 +---- fs/xfs/xfs_dfrag.c | 16 +- fs/xfs/xfs_dinode.h | 169 ++---------- fs/xfs/xfs_dir.c | 12 +- fs/xfs/xfs_dir2.c | 21 +- fs/xfs/xfs_dir2_block.c | 18 +- fs/xfs/xfs_dir2_block.h | 62 ++--- fs/xfs/xfs_dir2_data.c | 16 +- fs/xfs/xfs_dir2_data.h | 93 +++---- fs/xfs/xfs_dir2_leaf.c | 18 +- fs/xfs/xfs_dir2_leaf.h | 310 +++++++++------------ fs/xfs/xfs_dir2_node.c | 16 +- fs/xfs/xfs_dir2_node.h | 111 +++----- fs/xfs/xfs_dir2_sf.c | 17 +- fs/xfs/xfs_dir2_sf.h | 194 ++++++-------- fs/xfs/xfs_dir2_trace.c | 11 +- fs/xfs/xfs_dir_leaf.c | 24 +- fs/xfs/xfs_dir_leaf.h | 37 ++- fs/xfs/xfs_dir_sf.h | 73 +++-- fs/xfs/xfs_dmops.c | 5 +- fs/xfs/xfs_error.c | 10 +- fs/xfs/xfs_error.h | 66 +++-- fs/xfs/xfs_extfree_item.c | 11 +- fs/xfs/xfs_fsops.c | 25 +- fs/xfs/xfs_ialloc.c | 16 +- fs/xfs/xfs_ialloc.h | 40 +-- fs/xfs/xfs_ialloc_btree.c | 15 +- fs/xfs/xfs_ialloc_btree.h | 205 +++----------- fs/xfs/xfs_iget.c | 18 +- fs/xfs/xfs_inode.c | 23 +- fs/xfs/xfs_inode.h | 75 +----- fs/xfs/xfs_inode_item.c | 24 +- fs/xfs/xfs_inode_item.h | 41 ++- fs/xfs/xfs_inum.h | 104 +------ fs/xfs/xfs_iocore.c | 21 +- fs/xfs/xfs_iomap.c | 13 +- fs/xfs/xfs_itable.c | 14 +- fs/xfs/xfs_log.c | 25 +- fs/xfs/xfs_log_priv.h | 141 +++++----- fs/xfs/xfs_log_recover.c | 23 +- fs/xfs/xfs_mount.c | 15 +- fs/xfs/xfs_mount.h | 68 ++--- fs/xfs/xfs_qmops.c | 5 +- fs/xfs/xfs_rename.c | 11 +- fs/xfs/xfs_rtalloc.c | 19 +- fs/xfs/xfs_rw.c | 20 +- fs/xfs/xfs_rw.h | 99 ++----- fs/xfs/xfs_sb.h | 398 +++++++++++---------------- fs/xfs/xfs_trans.c | 20 +- fs/xfs/xfs_trans.h | 120 ++++----- fs/xfs/xfs_trans_ail.c | 5 +- fs/xfs/xfs_trans_buf.c | 17 +- fs/xfs/xfs_trans_extfree.c | 5 +- fs/xfs/xfs_trans_inode.c | 18 +- fs/xfs/xfs_trans_item.c | 5 +- fs/xfs/xfs_utils.c | 11 +- fs/xfs/xfs_vfsops.c | 28 +- fs/xfs/xfs_vnodeops.c | 31 ++- 93 files changed, 1567 insertions(+), 3093 deletions(-) (limited to 'fs/xfs/xfs_ialloc.c') diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 7aa39872470..8c05c3c3074 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -29,11 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_trans.h" @@ -42,13 +43,13 @@ #include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_alloc.h" -#include "xfs_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_alloc.h" +#include "xfs_btree.h" #include "xfs_error.h" #include "xfs_rw.h" #include "xfs_iomap.h" diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index 3881622bcf0..b0c00eaa79e 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c @@ -29,11 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_trans.h" diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index 6a3326bcd8d..d880e9c65fc 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c @@ -29,39 +29,38 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" - #include "xfs_fs.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dir2_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_bmap.h" -#include "xfs_bit.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" #include "xfs_rtalloc.h" -#include "xfs_error.h" #include "xfs_itable.h" +#include "xfs_error.h" #include "xfs_rw.h" #include "xfs_acl.h" #include "xfs_cap.h" #include "xfs_mac.h" #include "xfs_attr.h" +#include "xfs_bmap.h" #include "xfs_buf_item.h" #include "xfs_utils.h" #include "xfs_dfrag.h" diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 68c83ec3114..12d2a702c6c 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -29,11 +29,11 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" #include "xfs_fs.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -43,18 +43,17 @@ #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" -#include "xfs_bit.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_itable.h" diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index c04f0c063c5..36dc8b0368b 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c @@ -29,16 +29,11 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ -/* - * fs/xfs/linux/xfs_lrw.c (Linux Read Write stuff) - * - */ - #include "xfs.h" - #include "xfs_fs.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -48,18 +43,17 @@ #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" -#include "xfs_bit.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_itable.h" diff --git a/fs/xfs/linux-2.6/xfs_lrw.h b/fs/xfs/linux-2.6/xfs_lrw.h index 6294dcdb797..0647e48a8a1 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.h +++ b/fs/xfs/linux-2.6/xfs_lrw.h @@ -107,9 +107,4 @@ extern ssize_t xfs_sendfile(struct bhv_desc *, struct file *, extern int xfs_dev_is_read_only(struct xfs_mount *, char *); -#define XFS_FSB_TO_DB_IO(io,fsb) \ - (((io)->io_flags & XFS_IOCORE_RT) ? \ - XFS_FSB_TO_BB((io)->io_mount, (fsb)) : \ - XFS_FSB_TO_DADDR((io)->io_mount, (fsb))) - #endif /* __XFS_LRW_H__ */ diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index f6f6b6750d4..fac4862d09a 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c @@ -29,32 +29,31 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" - -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" #include "xfs_clnt.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" #include "xfs_bmap.h" -#include "xfs_bit.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_itable.h" diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c index 0dc010356f4..3dbd57fda2d 100644 --- a/fs/xfs/linux-2.6/xfs_sysctl.c +++ b/fs/xfs/linux-2.6/xfs_sysctl.c @@ -29,9 +29,7 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_rw.h" #include #include @@ -76,7 +74,7 @@ xfs_stats_clear_proc_handler( STATIC ctl_table xfs_table[] = { {XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val, sizeof(int), 0644, NULL, &proc_dointvec_minmax, - &sysctl_intvec, NULL, + &sysctl_intvec, NULL, &xfs_params.restrict_chown.min, &xfs_params.restrict_chown.max}, {XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit.val, @@ -86,22 +84,22 @@ STATIC ctl_table xfs_table[] = { {XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode.val, sizeof(int), 0644, NULL, &proc_dointvec_minmax, - &sysctl_intvec, NULL, + &sysctl_intvec, NULL, &xfs_params.symlink_mode.min, &xfs_params.symlink_mode.max}, {XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask.val, sizeof(int), 0644, NULL, &proc_dointvec_minmax, - &sysctl_intvec, NULL, + &sysctl_intvec, NULL, &xfs_params.panic_mask.min, &xfs_params.panic_mask.max}, {XFS_ERRLEVEL, "error_level", &xfs_params.error_level.val, sizeof(int), 0644, NULL, &proc_dointvec_minmax, - &sysctl_intvec, NULL, + &sysctl_intvec, NULL, &xfs_params.error_level.min, &xfs_params.error_level.max}, {XFS_SYNCD_TIMER, "xfssyncd_centisecs", &xfs_params.syncd_timer.val, sizeof(int), 0644, NULL, &proc_dointvec_minmax, - &sysctl_intvec, NULL, + &sysctl_intvec, NULL, &xfs_params.syncd_timer.min, &xfs_params.syncd_timer.max}, {XFS_INHERIT_SYNC, "inherit_sync", &xfs_params.inherit_sync.val, @@ -118,7 +116,7 @@ STATIC ctl_table xfs_table[] = { sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, NULL, &xfs_params.inherit_noatim.min, &xfs_params.inherit_noatim.max}, - + {XFS_BUF_TIMER, "xfsbufd_centisecs", &xfs_params.xfs_buf_timer.val, sizeof(int), 0644, NULL, &proc_dointvec_minmax, &sysctl_intvec, NULL, @@ -136,14 +134,14 @@ STATIC ctl_table xfs_table[] = { {XFS_ROTORSTEP, "rotorstep", &xfs_params.rotorstep.val, sizeof(int), 0644, NULL, &proc_dointvec_minmax, - &sysctl_intvec, NULL, + &sysctl_intvec, NULL, &xfs_params.rotorstep.min, &xfs_params.rotorstep.max}, /* please keep this the last entry */ #ifdef CONFIG_PROC_FS {XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear.val, sizeof(int), 0644, NULL, &xfs_stats_clear_proc_handler, - &sysctl_intvec, NULL, + &sysctl_intvec, NULL, &xfs_params.stats_clear.min, &xfs_params.stats_clear.max}, #endif /* CONFIG_PROC_FS */ diff --git a/fs/xfs/linux-2.6/xfs_vfs.c b/fs/xfs/linux-2.6/xfs_vfs.c index 34cc902ec11..1a08a1d8425 100644 --- a/fs/xfs/linux-2.6/xfs_vfs.c +++ b/fs/xfs/linux-2.6/xfs_vfs.c @@ -29,10 +29,8 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" #include "xfs_fs.h" -#include "xfs_macros.h" #include "xfs_inum.h" #include "xfs_log.h" #include "xfs_clnt.h" diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c index 9987977a492..5971f6f6ec7 100644 --- a/fs/xfs/quota/xfs_dquot.c +++ b/fs/xfs/quota/xfs_dquot.c @@ -32,8 +32,9 @@ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -43,18 +44,17 @@ #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" #include "xfs_bmap.h" -#include "xfs_bit.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_itable.h" diff --git a/fs/xfs/quota/xfs_dquot_item.c b/fs/xfs/quota/xfs_dquot_item.c index e74eaa7dd1b..86f22303275 100644 --- a/fs/xfs/quota/xfs_dquot_item.c +++ b/fs/xfs/quota/xfs_dquot_item.c @@ -32,8 +32,9 @@ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -43,18 +44,17 @@ #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" -#include "xfs_bit.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_itable.h" @@ -65,7 +65,6 @@ #include "xfs_attr.h" #include "xfs_buf_item.h" #include "xfs_trans_priv.h" - #include "xfs_qm.h" diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index efde16e0a91..9041ea8452e 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c @@ -32,8 +32,9 @@ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_clnt.h" #include "xfs_trans.h" #include "xfs_sb.h" @@ -44,21 +45,20 @@ #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_bmap.h" -#include "xfs_bit.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" +#include "xfs_itable.h" #include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_itable.h" +#include "xfs_bmap.h" #include "xfs_rw.h" #include "xfs_acl.h" #include "xfs_cap.h" @@ -67,7 +67,6 @@ #include "xfs_buf_item.h" #include "xfs_trans_space.h" #include "xfs_utils.h" - #include "xfs_qm.h" /* diff --git a/fs/xfs/quota/xfs_qm_bhv.c b/fs/xfs/quota/xfs_qm_bhv.c index 8890a18a99d..dac7cf8d729 100644 --- a/fs/xfs/quota/xfs_qm_bhv.c +++ b/fs/xfs/quota/xfs_qm_bhv.c @@ -32,39 +32,39 @@ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_clnt.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_ialloc.h" +#include "xfs_itable.h" +#include "xfs_btree.h" #include "xfs_bmap.h" -#include "xfs_bit.h" #include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_itable.h" #include "xfs_rw.h" #include "xfs_acl.h" #include "xfs_cap.h" #include "xfs_mac.h" #include "xfs_attr.h" #include "xfs_buf_item.h" - #include "xfs_qm.h" #define MNTOPT_QUOTA "quota" /* disk quotas (user) */ diff --git a/fs/xfs/quota/xfs_qm_stats.c b/fs/xfs/quota/xfs_qm_stats.c index 29978e037fe..b8befe1c90e 100644 --- a/fs/xfs/quota/xfs_qm_stats.c +++ b/fs/xfs/quota/xfs_qm_stats.c @@ -32,31 +32,32 @@ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_ialloc.h" +#include "xfs_itable.h" #include "xfs_bmap.h" -#include "xfs_bit.h" +#include "xfs_btree.h" #include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_itable.h" #include "xfs_rw.h" #include "xfs_acl.h" #include "xfs_cap.h" diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c index 485f83d4119..ba320f6431a 100644 --- a/fs/xfs/quota/xfs_qm_syscalls.c +++ b/fs/xfs/quota/xfs_qm_syscalls.c @@ -32,31 +32,32 @@ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_alloc.h" #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_ialloc.h" +#include "xfs_itable.h" #include "xfs_bmap.h" -#include "xfs_bit.h" +#include "xfs_btree.h" #include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_itable.h" #include "xfs_rw.h" #include "xfs_acl.h" #include "xfs_cap.h" @@ -64,7 +65,6 @@ #include "xfs_attr.h" #include "xfs_buf_item.h" #include "xfs_utils.h" - #include "xfs_qm.h" #ifdef DEBUG diff --git a/fs/xfs/quota/xfs_trans_dquot.c b/fs/xfs/quota/xfs_trans_dquot.c index 3b99daf8a64..afa3bb57e5d 100644 --- a/fs/xfs/quota/xfs_trans_dquot.c +++ b/fs/xfs/quota/xfs_trans_dquot.c @@ -32,8 +32,9 @@ #include "xfs.h" #include "xfs_fs.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -43,21 +44,20 @@ #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" #include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_ialloc.h" +#include "xfs_itable.h" +#include "xfs_btree.h" #include "xfs_bmap.h" -#include "xfs_bit.h" #include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_itable.h" #include "xfs_rw.h" #include "xfs_acl.h" #include "xfs_cap.h" diff --git a/fs/xfs/xfs.h b/fs/xfs/xfs.h index 7e276dcaf4d..30c4ab4f9c4 100644 --- a/fs/xfs/xfs.h +++ b/fs/xfs/xfs.h @@ -34,7 +34,4 @@ #include -#include -#include - #endif /* __XFS_H__ */ diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c index 49fdc392fc8..33c5f402b4e 100644 --- a/fs/xfs/xfs_acl.c +++ b/fs/xfs/xfs_acl.c @@ -29,21 +29,23 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" - +#include "xfs_fs.h" +#include "xfs_types.h" +#include "xfs_bit.h" #include "xfs_inum.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_btree.h" #include "xfs_acl.h" #include "xfs_mac.h" #include "xfs_attr.h" diff --git a/fs/xfs/xfs_ag.h b/fs/xfs/xfs_ag.h index 96b70f7fba3..7d15ef341a9 100644 --- a/fs/xfs/xfs_ag.h +++ b/fs/xfs/xfs_ag.h @@ -46,18 +46,9 @@ struct xfs_trans; #define XFS_AGI_MAGIC 0x58414749 /* 'XAGI' */ #define XFS_AGF_VERSION 1 #define XFS_AGI_VERSION 1 -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AGF_GOOD_VERSION) -int xfs_agf_good_version(unsigned v); -#define XFS_AGF_GOOD_VERSION(v) xfs_agf_good_version(v) -#else -#define XFS_AGF_GOOD_VERSION(v) ((v) == XFS_AGF_VERSION) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AGI_GOOD_VERSION) -int xfs_agi_good_version(unsigned v); -#define XFS_AGI_GOOD_VERSION(v) xfs_agi_good_version(v) -#else -#define XFS_AGI_GOOD_VERSION(v) ((v) == XFS_AGI_VERSION) -#endif + +#define XFS_AGF_GOOD_VERSION(v) ((v) == XFS_AGF_VERSION) +#define XFS_AGI_GOOD_VERSION(v) ((v) == XFS_AGI_VERSION) /* * Btree number 0 is bno, 1 is cnt. This value gives the size of the @@ -110,12 +101,9 @@ typedef struct xfs_agf /* disk block (xfs_daddr_t) in the AG */ #define XFS_AGF_DADDR(mp) ((xfs_daddr_t)(1 << (mp)->m_sectbb_log)) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AGF_BLOCK) -xfs_agblock_t xfs_agf_block(struct xfs_mount *mp); -#define XFS_AGF_BLOCK(mp) xfs_agf_block(mp) -#else -#define XFS_AGF_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGF_DADDR(mp)) -#endif +#define XFS_AGF_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGF_DADDR(mp)) +#define XFS_BUF_TO_AGF(bp) ((xfs_agf_t *)XFS_BUF_PTR(bp)) + /* * Size of the unlinked inode hash table in the agi. @@ -165,25 +153,17 @@ typedef struct xfs_agi /* disk block (xfs_daddr_t) in the AG */ #define XFS_AGI_DADDR(mp) ((xfs_daddr_t)(2 << (mp)->m_sectbb_log)) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AGI_BLOCK) -xfs_agblock_t xfs_agi_block(struct xfs_mount *mp); -#define XFS_AGI_BLOCK(mp) xfs_agi_block(mp) -#else -#define XFS_AGI_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGI_DADDR(mp)) -#endif +#define XFS_AGI_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGI_DADDR(mp)) +#define XFS_BUF_TO_AGI(bp) ((xfs_agi_t *)XFS_BUF_PTR(bp)) /* * The third a.g. block contains the a.g. freelist, an array * of block pointers to blocks owned by the allocation btree code. */ #define XFS_AGFL_DADDR(mp) ((xfs_daddr_t)(3 << (mp)->m_sectbb_log)) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AGFL_BLOCK) -xfs_agblock_t xfs_agfl_block(struct xfs_mount *mp); -#define XFS_AGFL_BLOCK(mp) xfs_agfl_block(mp) -#else -#define XFS_AGFL_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGFL_DADDR(mp)) -#endif +#define XFS_AGFL_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_AGFL_DADDR(mp)) #define XFS_AGFL_SIZE(mp) ((mp)->m_sb.sb_sectsize / sizeof(xfs_agblock_t)) +#define XFS_BUF_TO_AGFL(bp) ((xfs_agfl_t *)XFS_BUF_PTR(bp)) typedef struct xfs_agfl { xfs_agblock_t agfl_bno[1]; /* actually XFS_AGFL_SIZE(mp) */ @@ -230,116 +210,38 @@ typedef struct xfs_perag xfs_perag_busy_t *pagb_list; /* unstable blocks */ } xfs_perag_t; -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AG_MAXLEVELS) -int xfs_ag_maxlevels(struct xfs_mount *mp); -#define XFS_AG_MAXLEVELS(mp) xfs_ag_maxlevels(mp) -#else -#define XFS_AG_MAXLEVELS(mp) ((mp)->m_ag_maxlevels) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MIN_FREELIST) -int xfs_min_freelist(xfs_agf_t *a, struct xfs_mount *mp); -#define XFS_MIN_FREELIST(a,mp) xfs_min_freelist(a,mp) -#else -#define XFS_MIN_FREELIST(a,mp) \ - XFS_MIN_FREELIST_RAW( \ +#define XFS_AG_MAXLEVELS(mp) ((mp)->m_ag_maxlevels) +#define XFS_MIN_FREELIST_RAW(bl,cl,mp) \ + (MIN(bl + 1, XFS_AG_MAXLEVELS(mp)) + MIN(cl + 1, XFS_AG_MAXLEVELS(mp))) +#define XFS_MIN_FREELIST(a,mp) \ + (XFS_MIN_FREELIST_RAW( \ INT_GET((a)->agf_levels[XFS_BTNUM_BNOi], ARCH_CONVERT), \ - INT_GET((a)->agf_levels[XFS_BTNUM_CNTi], ARCH_CONVERT), mp) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MIN_FREELIST_PAG) -int xfs_min_freelist_pag(xfs_perag_t *pag, struct xfs_mount *mp); -#define XFS_MIN_FREELIST_PAG(pag,mp) xfs_min_freelist_pag(pag,mp) -#else + INT_GET((a)->agf_levels[XFS_BTNUM_CNTi], ARCH_CONVERT), mp)) #define XFS_MIN_FREELIST_PAG(pag,mp) \ - XFS_MIN_FREELIST_RAW((uint_t)(pag)->pagf_levels[XFS_BTNUM_BNOi], \ - (uint_t)(pag)->pagf_levels[XFS_BTNUM_CNTi], mp) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MIN_FREELIST_RAW) -int xfs_min_freelist_raw(int bl, int cl, struct xfs_mount *mp); -#define XFS_MIN_FREELIST_RAW(bl,cl,mp) xfs_min_freelist_raw(bl,cl,mp) -#else -#define XFS_MIN_FREELIST_RAW(bl,cl,mp) \ - (MIN(bl + 1, XFS_AG_MAXLEVELS(mp)) + \ - MIN(cl + 1, XFS_AG_MAXLEVELS(mp))) -#endif + (XFS_MIN_FREELIST_RAW( \ + (uint_t)(pag)->pagf_levels[XFS_BTNUM_BNOi], \ + (uint_t)(pag)->pagf_levels[XFS_BTNUM_CNTi], mp)) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AGB_TO_FSB) -xfs_fsblock_t xfs_agb_to_fsb(struct xfs_mount *mp, xfs_agnumber_t agno, - xfs_agblock_t agbno); -#define XFS_AGB_TO_FSB(mp,agno,agbno) xfs_agb_to_fsb(mp,agno,agbno) -#else -#define XFS_AGB_TO_FSB(mp,agno,agbno) \ +#define XFS_AGB_TO_FSB(mp,agno,agbno) \ (((xfs_fsblock_t)(agno) << (mp)->m_sb.sb_agblklog) | (agbno)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_FSB_TO_AGNO) -xfs_agnumber_t xfs_fsb_to_agno(struct xfs_mount *mp, xfs_fsblock_t fsbno); -#define XFS_FSB_TO_AGNO(mp,fsbno) xfs_fsb_to_agno(mp,fsbno) -#else -#define XFS_FSB_TO_AGNO(mp,fsbno) \ +#define XFS_FSB_TO_AGNO(mp,fsbno) \ ((xfs_agnumber_t)((fsbno) >> (mp)->m_sb.sb_agblklog)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_FSB_TO_AGBNO) -xfs_agblock_t xfs_fsb_to_agbno(struct xfs_mount *mp, xfs_fsblock_t fsbno); -#define XFS_FSB_TO_AGBNO(mp,fsbno) xfs_fsb_to_agbno(mp,fsbno) -#else -#define XFS_FSB_TO_AGBNO(mp,fsbno) \ +#define XFS_FSB_TO_AGBNO(mp,fsbno) \ ((xfs_agblock_t)((fsbno) & XFS_MASK32LO((mp)->m_sb.sb_agblklog))) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AGB_TO_DADDR) -xfs_daddr_t xfs_agb_to_daddr(struct xfs_mount *mp, xfs_agnumber_t agno, - xfs_agblock_t agbno); -#define XFS_AGB_TO_DADDR(mp,agno,agbno) xfs_agb_to_daddr(mp,agno,agbno) -#else -#define XFS_AGB_TO_DADDR(mp,agno,agbno) \ - ((xfs_daddr_t)(XFS_FSB_TO_BB(mp, \ - (xfs_fsblock_t)(agno) * (mp)->m_sb.sb_agblocks + (agbno)))) -#endif -/* - * XFS_DADDR_TO_AGNO and XFS_DADDR_TO_AGBNO moved to xfs_mount.h - * to avoid header file ordering change - */ - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AG_DADDR) -xfs_daddr_t xfs_ag_daddr(struct xfs_mount *mp, xfs_agnumber_t agno, - xfs_daddr_t d); -#define XFS_AG_DADDR(mp,agno,d) xfs_ag_daddr(mp,agno,d) -#else -#define XFS_AG_DADDR(mp,agno,d) (XFS_AGB_TO_DADDR(mp, agno, 0) + (d)) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_AGF) -xfs_agf_t *xfs_buf_to_agf(struct xfs_buf *bp); -#define XFS_BUF_TO_AGF(bp) xfs_buf_to_agf(bp) -#else -#define XFS_BUF_TO_AGF(bp) ((xfs_agf_t *)XFS_BUF_PTR(bp)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_AGI) -xfs_agi_t *xfs_buf_to_agi(struct xfs_buf *bp); -#define XFS_BUF_TO_AGI(bp) xfs_buf_to_agi(bp) -#else -#define XFS_BUF_TO_AGI(bp) ((xfs_agi_t *)XFS_BUF_PTR(bp)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_AGFL) -xfs_agfl_t *xfs_buf_to_agfl(struct xfs_buf *bp); -#define XFS_BUF_TO_AGFL(bp) xfs_buf_to_agfl(bp) -#else -#define XFS_BUF_TO_AGFL(bp) ((xfs_agfl_t *)XFS_BUF_PTR(bp)) -#endif +#define XFS_AGB_TO_DADDR(mp,agno,agbno) \ + ((xfs_daddr_t)XFS_FSB_TO_BB(mp, \ + (xfs_fsblock_t)(agno) * (mp)->m_sb.sb_agblocks + (agbno))) +#define XFS_AG_DADDR(mp,agno,d) (XFS_AGB_TO_DADDR(mp, agno, 0) + (d)) /* * For checking for bad ranges of xfs_daddr_t's, covering multiple * allocation groups or a single xfs_daddr_t that's a superblock copy. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AG_CHECK_DADDR) -void xfs_ag_check_daddr(struct xfs_mount *mp, xfs_daddr_t d, xfs_extlen_t len); -#define XFS_AG_CHECK_DADDR(mp,d,len) xfs_ag_check_daddr(mp,d,len) -#else #define XFS_AG_CHECK_DADDR(mp,d,len) \ ((len) == 1 ? \ ASSERT((d) == XFS_SB_DADDR || \ XFS_DADDR_TO_AGBNO(mp, d) != XFS_SB_DADDR) : \ ASSERT(XFS_DADDR_TO_AGNO(mp, d) == \ XFS_DADDR_TO_AGNO(mp, (d) + (len) - 1))) -#endif #endif /* __XFS_AG_H__ */ diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index dcfe1970362..c3a30e14bd1 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c @@ -29,28 +29,30 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * Free space allocation for XFS. - */ #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir.h" +#include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" +#include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" +#include "xfs_dinode.h" +#include "xfs_inode.h" #include "xfs_btree.h" #include "xfs_ialloc.h" #include "xfs_alloc.h" -#include "xfs_bit.h" #include "xfs_error.h" diff --git a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c index e0355a12d94..ccc421b438f 100644 --- a/fs/xfs/xfs_alloc_btree.c +++ b/fs/xfs/xfs_alloc_btree.c @@ -29,25 +29,27 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * Free space allocation for XFS. - */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir.h" +#include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_bmap_btree.h" +#include "xfs_dir_sf.h" +#include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" +#include "xfs_dinode.h" +#include "xfs_inode.h" #include "xfs_btree.h" #include "xfs_ialloc.h" #include "xfs_alloc.h" diff --git a/fs/xfs/xfs_alloc_btree.h b/fs/xfs/xfs_alloc_btree.h index ed5161a572e..f857b0f248d 100644 --- a/fs/xfs/xfs_alloc_btree.h +++ b/fs/xfs/xfs_alloc_btree.h @@ -62,38 +62,14 @@ typedef xfs_agblock_t xfs_alloc_ptr_t; /* btree pointer type */ /* btree block header type */ typedef struct xfs_btree_sblock xfs_alloc_block_t; -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_ALLOC_BLOCK) -xfs_alloc_block_t *xfs_buf_to_alloc_block(struct xfs_buf *bp); -#define XFS_BUF_TO_ALLOC_BLOCK(bp) xfs_buf_to_alloc_block(bp) -#else -#define XFS_BUF_TO_ALLOC_BLOCK(bp) ((xfs_alloc_block_t *)(XFS_BUF_PTR(bp))) -#endif +#define XFS_BUF_TO_ALLOC_BLOCK(bp) ((xfs_alloc_block_t *)XFS_BUF_PTR(bp)) /* * Real block structures have a size equal to the disk block size. */ - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ALLOC_BLOCK_SIZE) -int xfs_alloc_block_size(int lev, struct xfs_btree_cur *cur); -#define XFS_ALLOC_BLOCK_SIZE(lev,cur) xfs_alloc_block_size(lev,cur) -#else #define XFS_ALLOC_BLOCK_SIZE(lev,cur) (1 << (cur)->bc_blocklog) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ALLOC_BLOCK_MAXRECS) -int xfs_alloc_block_maxrecs(int lev, struct xfs_btree_cur *cur); -#define XFS_ALLOC_BLOCK_MAXRECS(lev,cur) xfs_alloc_block_maxrecs(lev,cur) -#else -#define XFS_ALLOC_BLOCK_MAXRECS(lev,cur) \ - ((cur)->bc_mp->m_alloc_mxr[lev != 0]) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ALLOC_BLOCK_MINRECS) -int xfs_alloc_block_minrecs(int lev, struct xfs_btree_cur *cur); -#define XFS_ALLOC_BLOCK_MINRECS(lev,cur) xfs_alloc_block_minrecs(lev,cur) -#else -#define XFS_ALLOC_BLOCK_MINRECS(lev,cur) \ - ((cur)->bc_mp->m_alloc_mnr[lev != 0]) -#endif +#define XFS_ALLOC_BLOCK_MAXRECS(lev,cur) ((cur)->bc_mp->m_alloc_mxr[lev != 0]) +#define XFS_ALLOC_BLOCK_MINRECS(lev,cur) ((cur)->bc_mp->m_alloc_mnr[lev != 0]) /* * Minimum and maximum blocksize and sectorsize. @@ -113,145 +89,80 @@ int xfs_alloc_block_minrecs(int lev, struct xfs_btree_cur *cur); * Block numbers in the AG: * SB is sector 0, AGF is sector 1, AGI is sector 2, AGFL is sector 3. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BNO_BLOCK) -xfs_agblock_t xfs_bno_block(struct xfs_mount *mp); -#define XFS_BNO_BLOCK(mp) xfs_bno_block(mp) -#else #define XFS_BNO_BLOCK(mp) ((xfs_agblock_t)(XFS_AGFL_BLOCK(mp) + 1)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CNT_BLOCK) -xfs_agblock_t xfs_cnt_block(struct xfs_mount *mp); -#define XFS_CNT_BLOCK(mp) xfs_cnt_block(mp) -#else #define XFS_CNT_BLOCK(mp) ((xfs_agblock_t)(XFS_BNO_BLOCK(mp) + 1)) -#endif /* * Record, key, and pointer address macros for btree blocks. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ALLOC_REC_ADDR) -xfs_alloc_rec_t *xfs_alloc_rec_addr(xfs_alloc_block_t *bb, int i, - struct xfs_btree_cur *cur); -#define XFS_ALLOC_REC_ADDR(bb,i,cur) xfs_alloc_rec_addr(bb,i,cur) -#else #define XFS_ALLOC_REC_ADDR(bb,i,cur) \ - XFS_BTREE_REC_ADDR(XFS_ALLOC_BLOCK_SIZE(0,cur), xfs_alloc, bb, i, \ - XFS_ALLOC_BLOCK_MAXRECS(0, cur)) -#endif + XFS_BTREE_REC_ADDR(XFS_ALLOC_BLOCK_SIZE(0,cur), xfs_alloc, \ + bb, i, XFS_ALLOC_BLOCK_MAXRECS(0, cur)) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ALLOC_KEY_ADDR) -xfs_alloc_key_t *xfs_alloc_key_addr(xfs_alloc_block_t *bb, int i, - struct xfs_btree_cur *cur); -#define XFS_ALLOC_KEY_ADDR(bb,i,cur) xfs_alloc_key_addr(bb,i,cur) -#else #define XFS_ALLOC_KEY_ADDR(bb,i,cur) \ - XFS_BTREE_KEY_ADDR(XFS_ALLOC_BLOCK_SIZE(1,cur), xfs_alloc, bb, i, \ - XFS_ALLOC_BLOCK_MAXRECS(1, cur)) -#endif + XFS_BTREE_KEY_ADDR(XFS_ALLOC_BLOCK_SIZE(1,cur), xfs_alloc, \ + bb, i, XFS_ALLOC_BLOCK_MAXRECS(1, cur)) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ALLOC_PTR_ADDR) -xfs_alloc_ptr_t *xfs_alloc_ptr_addr(xfs_alloc_block_t *bb, int i, - struct xfs_btree_cur *cur); -#define XFS_ALLOC_PTR_ADDR(bb,i,cur) xfs_alloc_ptr_addr(bb,i,cur) -#else #define XFS_ALLOC_PTR_ADDR(bb,i,cur) \ - XFS_BTREE_PTR_ADDR(XFS_ALLOC_BLOCK_SIZE(1,cur), xfs_alloc, bb, i, \ - XFS_ALLOC_BLOCK_MAXRECS(1, cur)) -#endif - -/* - * Prototypes for externally visible routines. - */ + XFS_BTREE_PTR_ADDR(XFS_ALLOC_BLOCK_SIZE(1,cur), xfs_alloc, \ + bb, i, XFS_ALLOC_BLOCK_MAXRECS(1, cur)) /* * Decrement cursor by one record at the level. * For nonzero levels the leaf-ward information is untouched. */ -int /* error */ -xfs_alloc_decrement( - struct xfs_btree_cur *cur, /* btree cursor */ - int level, /* level in btree, 0 is leaf */ - int *stat); /* success/failure */ +extern int xfs_alloc_decrement(struct xfs_btree_cur *cur, int level, int *stat); /* * Delete the record pointed to by cur. * The cursor refers to the place where the record was (could be inserted) * when the operation returns. */ -int /* error */ -xfs_alloc_delete( - struct xfs_btree_cur *cur, /* btree cursor */ - int *stat); /* success/failure */ +extern int xfs_alloc_delete(struct xfs_btree_cur *cur, int *stat); /* * Get the data from the pointed-to record. */ -int /* error */ -xfs_alloc_get_rec( - struct xfs_btree_cur *cur, /* btree cursor */ - xfs_agblock_t *bno, /* output: starting block of extent */ - xfs_extlen_t *len, /* output: length of extent */ - int *stat); /* output: success/failure */ +extern int xfs_alloc_get_rec(struct xfs_btree_cur *cur, xfs_agblock_t *bno, + xfs_extlen_t *len, int *stat); /* * Increment cursor by one record at the level. * For nonzero levels the leaf-ward information is untouched. */ -int /* error */ -xfs_alloc_increment( - struct xfs_btree_cur *cur, /* btree cursor */ - int level, /* level in btree, 0 is leaf */ - int *stat); /* success/failure */ +extern int xfs_alloc_increment(struct xfs_btree_cur *cur, int level, int *stat); /* * Insert the current record at the point referenced by cur. * The cursor may be inconsistent on return if splits have been done. */ -int /* error */ -xfs_alloc_insert( - struct xfs_btree_cur *cur, /* btree cursor */ - int *stat); /* success/failure */ +extern int xfs_alloc_insert(struct xfs_btree_cur *cur, int *stat); /* * Lookup the record equal to [bno, len] in the btree given by cur. */ -int /* error */ -xfs_alloc_lookup_eq( - struct xfs_btree_cur *cur, /* btree cursor */ - xfs_agblock_t bno, /* starting block of extent */ - xfs_extlen_t len, /* length of extent */ - int *stat); /* success/failure */ +extern int xfs_alloc_lookup_eq(struct xfs_btree_cur *cur, xfs_agblock_t bno, + xfs_extlen_t len, int *stat); /* * Lookup the first record greater than or equal to [bno, len] * in the btree given by cur. */ -int /* error */ -xfs_alloc_lookup_ge( - struct xfs_btree_cur *cur, /* btree cursor */ - xfs_agblock_t bno, /* starting block of extent */ - xfs_extlen_t len, /* length of extent */ - int *stat); /* success/failure */ +extern int xfs_alloc_lookup_ge(struct xfs_btree_cur *cur, xfs_agblock_t bno, + xfs_extlen_t len, int *stat); /* * Lookup the first record less than or equal to [bno, len] * in the btree given by cur. */ -int /* error */ -xfs_alloc_lookup_le( - struct xfs_btree_cur *cur, /* btree cursor */ - xfs_agblock_t bno, /* starting block of extent */ - xfs_extlen_t len, /* length of extent */ - int *stat); /* success/failure */ +extern int xfs_alloc_lookup_le(struct xfs_btree_cur *cur, xfs_agblock_t bno, + xfs_extlen_t len, int *stat); /* * Update the record referred to by cur, to the value given by [bno, len]. * This either works (return 0) or gets an EFSCORRUPTED error. */ -int /* error */ -xfs_alloc_update( - struct xfs_btree_cur *cur, /* btree cursor */ - xfs_agblock_t bno, /* starting block of extent */ - xfs_extlen_t len); /* length of extent */ +extern int xfs_alloc_update(struct xfs_btree_cur *cur, xfs_agblock_t bno, + xfs_extlen_t len); #endif /* __XFS_ALLOC_BTREE_H__ */ diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index c2c14b2103f..7db18e9649d 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c @@ -31,11 +31,11 @@ */ #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -43,27 +43,26 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_alloc.h" -#include "xfs_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_alloc.h" +#include "xfs_btree.h" +#include "xfs_inode_item.h" #include "xfs_bmap.h" -#include "xfs_da_btree.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h" #include "xfs_error.h" -#include "xfs_bit.h" #include "xfs_quota.h" -#include "xfs_rw.h" #include "xfs_trans_space.h" #include "xfs_acl.h" +#include "xfs_rw.h" /* * xfs_attr.c diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c index 63c473f8d6d..be82014b952 100644 --- a/fs/xfs/xfs_attr_leaf.c +++ b/fs/xfs/xfs_attr_leaf.c @@ -29,18 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ -/* - * xfs_attr_leaf.c - * - * GROT: figure out how to recover gracefully when bmap returns ENOSPC. - */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -48,23 +42,22 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" #include "xfs_alloc.h" #include "xfs_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_inode_item.h" #include "xfs_bmap.h" -#include "xfs_da_btree.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h" #include "xfs_error.h" -#include "xfs_bit.h" /* * xfs_attr_leaf.c diff --git a/fs/xfs/xfs_attr_leaf.h b/fs/xfs/xfs_attr_leaf.h index 326802f80d5..ef5f5eaa60d 100644 --- a/fs/xfs/xfs_attr_leaf.h +++ b/fs/xfs/xfs_attr_leaf.h @@ -147,65 +147,58 @@ typedef struct xfs_attr_leaf_name_remote xfs_attr_leaf_name_remote_t; /* * Cast typed pointers for "local" and "remote" name/value structs. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ATTR_LEAF_NAME_REMOTE) -xfs_attr_leaf_name_remote_t * -xfs_attr_leaf_name_remote(xfs_attr_leafblock_t *leafp, int idx); #define XFS_ATTR_LEAF_NAME_REMOTE(leafp,idx) \ xfs_attr_leaf_name_remote(leafp,idx) -#else -#define XFS_ATTR_LEAF_NAME_REMOTE(leafp,idx) /* remote name struct ptr */ \ - ((xfs_attr_leaf_name_remote_t *) \ - &((char *)(leafp))[ INT_GET((leafp)->entries[idx].nameidx, ARCH_CONVERT) ]) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ATTR_LEAF_NAME_LOCAL) -xfs_attr_leaf_name_local_t * -xfs_attr_leaf_name_local(xfs_attr_leafblock_t *leafp, int idx); +static inline xfs_attr_leaf_name_remote_t * +xfs_attr_leaf_name_remote(xfs_attr_leafblock_t *leafp, int idx) +{ + return (xfs_attr_leaf_name_remote_t *) &((char *) + (leafp))[INT_GET((leafp)->entries[idx].nameidx, ARCH_CONVERT)]; +} + #define XFS_ATTR_LEAF_NAME_LOCAL(leafp,idx) \ xfs_attr_leaf_name_local(leafp,idx) -#else -#define XFS_ATTR_LEAF_NAME_LOCAL(leafp,idx) /* local name struct ptr */ \ - ((xfs_attr_leaf_name_local_t *) \ - &((char *)(leafp))[ INT_GET((leafp)->entries[idx].nameidx, ARCH_CONVERT) ]) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ATTR_LEAF_NAME) -char *xfs_attr_leaf_name(xfs_attr_leafblock_t *leafp, int idx); +static inline xfs_attr_leaf_name_local_t * +xfs_attr_leaf_name_local(xfs_attr_leafblock_t *leafp, int idx) +{ + return (xfs_attr_leaf_name_local_t *) &((char *) + (leafp))[INT_GET((leafp)->entries[idx].nameidx, ARCH_CONVERT)]; +} + #define XFS_ATTR_LEAF_NAME(leafp,idx) xfs_attr_leaf_name(leafp,idx) -#else -#define XFS_ATTR_LEAF_NAME(leafp,idx) /* generic name struct ptr */ \ - (&((char *)(leafp))[ INT_GET((leafp)->entries[idx].nameidx, ARCH_CONVERT) ]) -#endif +static inline char *xfs_attr_leaf_name(xfs_attr_leafblock_t *leafp, int idx) +{ + return (&((char *) + (leafp))[INT_GET((leafp)->entries[idx].nameidx, ARCH_CONVERT)]); +} /* * Calculate total bytes used (including trailing pad for alignment) for * a "local" name/value structure, a "remote" name/value structure, and * a pointer which might be either. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ATTR_LEAF_ENTSIZE_REMOTE) -int xfs_attr_leaf_entsize_remote(int nlen); #define XFS_ATTR_LEAF_ENTSIZE_REMOTE(nlen) \ xfs_attr_leaf_entsize_remote(nlen) -#else -#define XFS_ATTR_LEAF_ENTSIZE_REMOTE(nlen) /* space for remote struct */ \ - (((uint)sizeof(xfs_attr_leaf_name_remote_t) - 1 + (nlen) + \ - XFS_ATTR_LEAF_NAME_ALIGN - 1) & ~(XFS_ATTR_LEAF_NAME_ALIGN - 1)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ATTR_LEAF_ENTSIZE_LOCAL) -int xfs_attr_leaf_entsize_local(int nlen, int vlen); +static inline int xfs_attr_leaf_entsize_remote(int nlen) +{ + return ((uint)sizeof(xfs_attr_leaf_name_remote_t) - 1 + (nlen) + \ + XFS_ATTR_LEAF_NAME_ALIGN - 1) & ~(XFS_ATTR_LEAF_NAME_ALIGN - 1); +} + #define XFS_ATTR_LEAF_ENTSIZE_LOCAL(nlen,vlen) \ xfs_attr_leaf_entsize_local(nlen,vlen) -#else -#define XFS_ATTR_LEAF_ENTSIZE_LOCAL(nlen,vlen) /* space for local struct */ \ - (((uint)sizeof(xfs_attr_leaf_name_local_t) - 1 + (nlen) + (vlen) + \ - XFS_ATTR_LEAF_NAME_ALIGN - 1) & ~(XFS_ATTR_LEAF_NAME_ALIGN - 1)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ATTR_LEAF_ENTSIZE_LOCAL_MAX) -int xfs_attr_leaf_entsize_local_max(int bsize); +static inline int xfs_attr_leaf_entsize_local(int nlen, int vlen) +{ + return ((uint)sizeof(xfs_attr_leaf_name_local_t) - 1 + (nlen) + (vlen) + + XFS_ATTR_LEAF_NAME_ALIGN - 1) & ~(XFS_ATTR_LEAF_NAME_ALIGN - 1); +} + #define XFS_ATTR_LEAF_ENTSIZE_LOCAL_MAX(bsize) \ xfs_attr_leaf_entsize_local_max(bsize) -#else -#define XFS_ATTR_LEAF_ENTSIZE_LOCAL_MAX(bsize) /* max local struct size */ \ - (((bsize) >> 1) + ((bsize) >> 2)) -#endif +static inline int xfs_attr_leaf_entsize_local_max(int bsize) +{ + return (((bsize) >> 1) + ((bsize) >> 2)); +} /*======================================================================== diff --git a/fs/xfs/xfs_attr_sf.h b/fs/xfs/xfs_attr_sf.h index ef7d2942d30..c8001929dea 100644 --- a/fs/xfs/xfs_attr_sf.h +++ b/fs/xfs/xfs_attr_sf.h @@ -71,38 +71,17 @@ typedef struct xfs_attr_sf_sort { char *name; /* name value, pointer into buffer */ } xfs_attr_sf_sort_t; -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ATTR_SF_ENTSIZE_BYNAME) -int xfs_attr_sf_entsize_byname(int nlen, int vlen); -#define XFS_ATTR_SF_ENTSIZE_BYNAME(nlen,vlen) \ - xfs_attr_sf_entsize_byname(nlen,vlen) -#else #define XFS_ATTR_SF_ENTSIZE_BYNAME(nlen,vlen) /* space name/value uses */ \ - ((int)sizeof(xfs_attr_sf_entry_t)-1 + (nlen)+(vlen)) -#endif + (((int)sizeof(xfs_attr_sf_entry_t)-1 + (nlen)+(vlen))) #define XFS_ATTR_SF_ENTSIZE_MAX /* max space for name&value */ \ ((1 << (NBBY*(int)sizeof(__uint8_t))) - 1) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ATTR_SF_ENTSIZE) -int xfs_attr_sf_entsize(xfs_attr_sf_entry_t *sfep); -#define XFS_ATTR_SF_ENTSIZE(sfep) xfs_attr_sf_entsize(sfep) -#else #define XFS_ATTR_SF_ENTSIZE(sfep) /* space an entry uses */ \ ((int)sizeof(xfs_attr_sf_entry_t)-1 + (sfep)->namelen+(sfep)->valuelen) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ATTR_SF_NEXTENTRY) -xfs_attr_sf_entry_t *xfs_attr_sf_nextentry(xfs_attr_sf_entry_t *sfep); -#define XFS_ATTR_SF_NEXTENTRY(sfep) xfs_attr_sf_nextentry(sfep) -#else #define XFS_ATTR_SF_NEXTENTRY(sfep) /* next entry in struct */ \ - ((xfs_attr_sf_entry_t *) \ - ((char *)(sfep) + XFS_ATTR_SF_ENTSIZE(sfep))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ATTR_SF_TOTSIZE) -int xfs_attr_sf_totsize(struct xfs_inode *dp); -#define XFS_ATTR_SF_TOTSIZE(dp) xfs_attr_sf_totsize(dp) -#else + ((xfs_attr_sf_entry_t *)((char *)(sfep) + XFS_ATTR_SF_ENTSIZE(sfep))) #define XFS_ATTR_SF_TOTSIZE(dp) /* total space in use */ \ - (INT_GET(((xfs_attr_shortform_t *)((dp)->i_afp->if_u1.if_data))->hdr.totsize, ARCH_CONVERT)) -#endif + (INT_GET(((xfs_attr_shortform_t *) \ + ((dp)->i_afp->if_u1.if_data))->hdr.totsize, ARCH_CONVERT)) #if defined(XFS_ATTR_TRACE) /* diff --git a/fs/xfs/xfs_bit.h b/fs/xfs/xfs_bit.h index 1e7f57ddf7a..041e8248506 100644 --- a/fs/xfs/xfs_bit.h +++ b/fs/xfs/xfs_bit.h @@ -39,30 +39,26 @@ /* * masks with n high/low bits set, 32-bit values & 64-bit values */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MASK32HI) -__uint32_t xfs_mask32hi(int n); #define XFS_MASK32HI(n) xfs_mask32hi(n) -#else -#define XFS_MASK32HI(n) ((__uint32_t)-1 << (32 - (n))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MASK64HI) -__uint64_t xfs_mask64hi(int n); +static inline __uint32_t xfs_mask32hi(int n) +{ + return (__uint32_t)-1 << (32 - (n)); +} #define XFS_MASK64HI(n) xfs_mask64hi(n) -#else -#define XFS_MASK64HI(n) ((__uint64_t)-1 << (64 - (n))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MASK32LO) -__uint32_t xfs_mask32lo(int n); +static inline __uint64_t xfs_mask64hi(int n) +{ + return (__uint64_t)-1 << (64 - (n)); +} #define XFS_MASK32LO(n) xfs_mask32lo(n) -#else -#define XFS_MASK32LO(n) (((__uint32_t)1 << (n)) - 1) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MASK64LO) -__uint64_t xfs_mask64lo(int n); +static inline __uint32_t xfs_mask32lo(int n) +{ + return ((__uint32_t)1 << (n)) - 1; +} #define XFS_MASK64LO(n) xfs_mask64lo(n) -#else -#define XFS_MASK64LO(n) (((__uint64_t)1 << (n)) - 1) -#endif +static inline __uint64_t xfs_mask64lo(int n) +{ + return ((__uint64_t)1 << (n)) - 1; +} /* Get high bit set out of 32-bit argument, -1 if none set */ extern int xfs_highbit32(__uint32_t v); diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index 3e013530d00..f8e3357c1e8 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -29,41 +29,39 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" -#include "xfs_dmapi.h" -#include "xfs_mount.h" -#include "xfs_alloc_btree.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_btree.h" +#include "xfs_dmapi.h" +#include "xfs_mount.h" +#include "xfs_ialloc.h" #include "xfs_itable.h" +#include "xfs_inode_item.h" #include "xfs_extfree_item.h" #include "xfs_alloc.h" #include "xfs_bmap.h" #include "xfs_rtalloc.h" #include "xfs_error.h" -#include "xfs_da_btree.h" #include "xfs_dir_leaf.h" #include "xfs_attr_leaf.h" -#include "xfs_bit.h" #include "xfs_rw.h" #include "xfs_quota.h" #include "xfs_trans_space.h" diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h index e42d1b7777e..51a9c82f0f6 100644 --- a/fs/xfs/xfs_bmap.h +++ b/fs/xfs/xfs_bmap.h @@ -77,12 +77,11 @@ typedef struct xfs_bmap_free /* combine contig. space */ #define XFS_BMAPI_CONTIG 0x400 /* must allocate only one extent */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAPI_AFLAG) -int xfs_bmapi_aflag(int w); #define XFS_BMAPI_AFLAG(w) xfs_bmapi_aflag(w) -#else -#define XFS_BMAPI_AFLAG(w) ((w) == XFS_ATTR_FORK ? XFS_BMAPI_ATTRFORK : 0) -#endif +static inline int xfs_bmapi_aflag(int w) +{ + return (w == XFS_ATTR_FORK ? XFS_BMAPI_ATTRFORK : 0); +} /* * Special values for xfs_bmbt_irec_t br_startblock field. @@ -90,14 +89,12 @@ int xfs_bmapi_aflag(int w); #define DELAYSTARTBLOCK ((xfs_fsblock_t)-1LL) #define HOLESTARTBLOCK ((xfs_fsblock_t)-2LL) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_INIT) -void xfs_bmap_init(xfs_bmap_free_t *flp, xfs_fsblock_t *fbp); #define XFS_BMAP_INIT(flp,fbp) xfs_bmap_init(flp,fbp) -#else -#define XFS_BMAP_INIT(flp,fbp) \ +static inline void xfs_bmap_init(xfs_bmap_free_t *flp, xfs_fsblock_t *fbp) +{ ((flp)->xbf_first = NULL, (flp)->xbf_count = 0, \ - (flp)->xbf_low = 0, *(fbp) = NULLFSBLOCK) -#endif + (flp)->xbf_low = 0, *(fbp) = NULLFSBLOCK); +} /* * Argument structure for xfs_bmap_alloc. diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c index 09a77b17565..cc72f77f982 100644 --- a/fs/xfs/xfs_bmap_btree.c +++ b/fs/xfs/xfs_bmap_btree.c @@ -29,13 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -43,20 +42,19 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_itable.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_inode_item.h" #include "xfs_alloc.h" -#include "xfs_bit.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" +#include "xfs_itable.h" #include "xfs_bmap.h" #include "xfs_error.h" #include "xfs_quota.h" diff --git a/fs/xfs/xfs_bmap_btree.h b/fs/xfs/xfs_bmap_btree.h index 2cf4fe45cbc..ff0102d1491 100644 --- a/fs/xfs/xfs_bmap_btree.h +++ b/fs/xfs/xfs_bmap_btree.h @@ -114,31 +114,31 @@ typedef xfs_bmbt_rec_64_t xfs_bmbt_rec_t, xfs_bmdr_rec_t; (((((xfs_fsblock_t)1) << STARTBLOCKMASKBITS) - 1) << STARTBLOCKVALBITS) #define DSTARTBLOCKMASK \ (((((xfs_dfsbno_t)1) << DSTARTBLOCKMASKBITS) - 1) << STARTBLOCKVALBITS) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_ISNULLSTARTBLOCK) -int isnullstartblock(xfs_fsblock_t x); + #define ISNULLSTARTBLOCK(x) isnullstartblock(x) -#else -#define ISNULLSTARTBLOCK(x) (((x) & STARTBLOCKMASK) == STARTBLOCKMASK) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_ISNULLDSTARTBLOCK) -int isnulldstartblock(xfs_dfsbno_t x); +static inline int isnullstartblock(xfs_fsblock_t x) +{ + return ((x) & STARTBLOCKMASK) == STARTBLOCKMASK; +} + #define ISNULLDSTARTBLOCK(x) isnulldstartblock(x) -#else -#define ISNULLDSTARTBLOCK(x) (((x) & DSTARTBLOCKMASK) == DSTARTBLOCKMASK) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_NULLSTARTBLOCK) -xfs_fsblock_t nullstartblock(int k); +static inline int isnulldstartblock(xfs_dfsbno_t x) +{ + return ((x) & DSTARTBLOCKMASK) == DSTARTBLOCKMASK; +} + #define NULLSTARTBLOCK(k) nullstartblock(k) -#else -#define NULLSTARTBLOCK(k) \ - ((ASSERT(k < (1 << STARTBLOCKVALBITS))), (STARTBLOCKMASK | (k))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_STARTBLOCKVAL) -xfs_filblks_t startblockval(xfs_fsblock_t x); +static inline xfs_fsblock_t nullstartblock(int k) +{ + ASSERT(k < (1 << STARTBLOCKVALBITS)); + return STARTBLOCKMASK | (k); +} + #define STARTBLOCKVAL(x) startblockval(x) -#else -#define STARTBLOCKVAL(x) ((xfs_filblks_t)((x) & ~STARTBLOCKMASK)) -#endif +static inline xfs_filblks_t startblockval(xfs_fsblock_t x) +{ + return (xfs_filblks_t)((x) & ~STARTBLOCKMASK); +} /* * Possible extent formats. @@ -159,14 +159,9 @@ typedef enum { /* * Extent state and extent format macros. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_EXTFMT_INODE ) -xfs_exntfmt_t xfs_extfmt_inode(struct xfs_inode *ip); -#define XFS_EXTFMT_INODE(x) xfs_extfmt_inode(x) -#else -#define XFS_EXTFMT_INODE(x) \ - (XFS_SB_VERSION_HASEXTFLGBIT(&((x)->i_mount->m_sb)) ? \ - XFS_EXTFMT_HASSTATE : XFS_EXTFMT_NOSTATE) -#endif +#define XFS_EXTFMT_INODE(x) \ + (XFS_SB_VERSION_HASEXTFLGBIT(&((x)->i_mount->m_sb)) ? \ + XFS_EXTFMT_HASSTATE : XFS_EXTFMT_NOSTATE) #define ISUNWRITTEN(x) ((x)->br_state == XFS_EXT_UNWRITTEN) /* @@ -192,248 +187,111 @@ typedef xfs_dfsbno_t xfs_bmbt_ptr_t, xfs_bmdr_ptr_t; /* btree pointer type */ /* btree block header type */ typedef struct xfs_btree_lblock xfs_bmbt_block_t; -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_BMBT_BLOCK) -xfs_bmbt_block_t *xfs_buf_to_bmbt_block(struct xfs_buf *bp); -#define XFS_BUF_TO_BMBT_BLOCK(bp) xfs_buf_to_bmbt_block(bp) -#else -#define XFS_BUF_TO_BMBT_BLOCK(bp) ((xfs_bmbt_block_t *)(XFS_BUF_PTR(bp))) -#endif +#define XFS_BUF_TO_BMBT_BLOCK(bp) ((xfs_bmbt_block_t *)XFS_BUF_PTR(bp)) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_RBLOCK_DSIZE) -int xfs_bmap_rblock_dsize(int lev, struct xfs_btree_cur *cur); -#define XFS_BMAP_RBLOCK_DSIZE(lev,cur) xfs_bmap_rblock_dsize(lev,cur) -#else -#define XFS_BMAP_RBLOCK_DSIZE(lev,cur) ((cur)->bc_private.b.forksize) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_RBLOCK_ISIZE) -int xfs_bmap_rblock_isize(int lev, struct xfs_btree_cur *cur); -#define XFS_BMAP_RBLOCK_ISIZE(lev,cur) xfs_bmap_rblock_isize(lev,cur) -#else -#define XFS_BMAP_RBLOCK_ISIZE(lev,cur) \ +#define XFS_BMAP_IBLOCK_SIZE(lev,cur) (1 << (cur)->bc_blocklog) +#define XFS_BMAP_RBLOCK_DSIZE(lev,cur) ((cur)->bc_private.b.forksize) +#define XFS_BMAP_RBLOCK_ISIZE(lev,cur) \ ((int)XFS_IFORK_PTR((cur)->bc_private.b.ip, \ - (cur)->bc_private.b.whichfork)->if_broot_bytes) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_IBLOCK_SIZE) -int xfs_bmap_iblock_size(int lev, struct xfs_btree_cur *cur); -#define XFS_BMAP_IBLOCK_SIZE(lev,cur) xfs_bmap_iblock_size(lev,cur) -#else -#define XFS_BMAP_IBLOCK_SIZE(lev,cur) (1 << (cur)->bc_blocklog) -#endif + (cur)->bc_private.b.whichfork)->if_broot_bytes) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_BLOCK_DSIZE) -int xfs_bmap_block_dsize(int lev, struct xfs_btree_cur *cur); -#define XFS_BMAP_BLOCK_DSIZE(lev,cur) xfs_bmap_block_dsize(lev,cur) -#else -#define XFS_BMAP_BLOCK_DSIZE(lev,cur) \ - ((lev) == (cur)->bc_nlevels - 1 ? \ - XFS_BMAP_RBLOCK_DSIZE(lev,cur) : \ - XFS_BMAP_IBLOCK_SIZE(lev,cur)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_BLOCK_ISIZE) -int xfs_bmap_block_isize(int lev, struct xfs_btree_cur *cur); -#define XFS_BMAP_BLOCK_ISIZE(lev,cur) xfs_bmap_block_isize(lev,cur) -#else -#define XFS_BMAP_BLOCK_ISIZE(lev,cur) \ - ((lev) == (cur)->bc_nlevels - 1 ? \ - XFS_BMAP_RBLOCK_ISIZE(lev,cur) : \ - XFS_BMAP_IBLOCK_SIZE(lev,cur)) -#endif +#define XFS_BMAP_BLOCK_DSIZE(lev,cur) \ + (((lev) == (cur)->bc_nlevels - 1 ? \ + XFS_BMAP_RBLOCK_DSIZE(lev,cur) : XFS_BMAP_IBLOCK_SIZE(lev,cur))) +#define XFS_BMAP_BLOCK_ISIZE(lev,cur) \ + (((lev) == (cur)->bc_nlevels - 1 ? \ + XFS_BMAP_RBLOCK_ISIZE(lev,cur) : XFS_BMAP_IBLOCK_SIZE(lev,cur))) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_BLOCK_DMAXRECS) -int xfs_bmap_block_dmaxrecs(int lev, struct xfs_btree_cur *cur); -#define XFS_BMAP_BLOCK_DMAXRECS(lev,cur) xfs_bmap_block_dmaxrecs(lev,cur) -#else #define XFS_BMAP_BLOCK_DMAXRECS(lev,cur) \ - ((lev) == (cur)->bc_nlevels - 1 ? \ + (((lev) == (cur)->bc_nlevels - 1 ? \ XFS_BTREE_BLOCK_MAXRECS(XFS_BMAP_RBLOCK_DSIZE(lev,cur), \ xfs_bmdr, (lev) == 0) : \ - ((cur)->bc_mp->m_bmap_dmxr[(lev) != 0])) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_BLOCK_IMAXRECS) -int xfs_bmap_block_imaxrecs(int lev, struct xfs_btree_cur *cur); -#define XFS_BMAP_BLOCK_IMAXRECS(lev,cur) xfs_bmap_block_imaxrecs(lev,cur) -#else + ((cur)->bc_mp->m_bmap_dmxr[(lev) != 0]))) #define XFS_BMAP_BLOCK_IMAXRECS(lev,cur) \ - ((lev) == (cur)->bc_nlevels - 1 ? \ - XFS_BTREE_BLOCK_MAXRECS(XFS_BMAP_RBLOCK_ISIZE(lev,cur), \ - xfs_bmbt, (lev) == 0) : \ - ((cur)->bc_mp->m_bmap_dmxr[(lev) != 0])) -#endif + (((lev) == (cur)->bc_nlevels - 1 ? \ + XFS_BTREE_BLOCK_MAXRECS(XFS_BMAP_RBLOCK_ISIZE(lev,cur),\ + xfs_bmbt, (lev) == 0) : \ + ((cur)->bc_mp->m_bmap_dmxr[(lev) != 0]))) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_BLOCK_DMINRECS) -int xfs_bmap_block_dminrecs(int lev, struct xfs_btree_cur *cur); -#define XFS_BMAP_BLOCK_DMINRECS(lev,cur) xfs_bmap_block_dminrecs(lev,cur) -#else #define XFS_BMAP_BLOCK_DMINRECS(lev,cur) \ - ((lev) == (cur)->bc_nlevels - 1 ? \ - XFS_BTREE_BLOCK_MINRECS(XFS_BMAP_RBLOCK_DSIZE(lev,cur), \ - xfs_bmdr, (lev) == 0) : \ - ((cur)->bc_mp->m_bmap_dmnr[(lev) != 0])) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_BLOCK_IMINRECS) -int xfs_bmap_block_iminrecs(int lev, struct xfs_btree_cur *cur); -#define XFS_BMAP_BLOCK_IMINRECS(lev,cur) xfs_bmap_block_iminrecs(lev,cur) -#else + (((lev) == (cur)->bc_nlevels - 1 ? \ + XFS_BTREE_BLOCK_MINRECS(XFS_BMAP_RBLOCK_DSIZE(lev,cur),\ + xfs_bmdr, (lev) == 0) : \ + ((cur)->bc_mp->m_bmap_dmnr[(lev) != 0]))) #define XFS_BMAP_BLOCK_IMINRECS(lev,cur) \ - ((lev) == (cur)->bc_nlevels - 1 ? \ - XFS_BTREE_BLOCK_MINRECS(XFS_BMAP_RBLOCK_ISIZE(lev,cur), \ - xfs_bmbt, (lev) == 0) : \ - ((cur)->bc_mp->m_bmap_dmnr[(lev) != 0])) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_REC_DADDR) -xfs_bmbt_rec_t * -xfs_bmap_rec_daddr(xfs_bmbt_block_t *bb, int i, struct xfs_btree_cur *cur); -#define XFS_BMAP_REC_DADDR(bb,i,cur) xfs_bmap_rec_daddr(bb,i,cur) -#else -#define XFS_BMAP_REC_DADDR(bb,i,cur) \ - XFS_BTREE_REC_ADDR(XFS_BMAP_BLOCK_DSIZE( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ - xfs_bmbt, bb, i, XFS_BMAP_BLOCK_DMAXRECS( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_REC_IADDR) -xfs_bmbt_rec_t * -xfs_bmap_rec_iaddr(xfs_bmbt_block_t *bb, int i, struct xfs_btree_cur *cur); -#define XFS_BMAP_REC_IADDR(bb,i,cur) xfs_bmap_rec_iaddr(bb,i,cur) -#else -#define XFS_BMAP_REC_IADDR(bb,i,cur) \ - XFS_BTREE_REC_ADDR(XFS_BMAP_BLOCK_ISIZE( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ - xfs_bmbt, bb, i, XFS_BMAP_BLOCK_IMAXRECS( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur)) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_KEY_DADDR) -xfs_bmbt_key_t * -xfs_bmap_key_daddr(xfs_bmbt_block_t *bb, int i, struct xfs_btree_cur *cur); -#define XFS_BMAP_KEY_DADDR(bb,i,cur) xfs_bmap_key_daddr(bb,i,cur) -#else -#define XFS_BMAP_KEY_DADDR(bb,i,cur) \ - XFS_BTREE_KEY_ADDR(XFS_BMAP_BLOCK_DSIZE( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ - xfs_bmbt, bb, i, XFS_BMAP_BLOCK_DMAXRECS( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_KEY_IADDR) -xfs_bmbt_key_t * -xfs_bmap_key_iaddr(xfs_bmbt_block_t *bb, int i, struct xfs_btree_cur *cur); -#define XFS_BMAP_KEY_IADDR(bb,i,cur) xfs_bmap_key_iaddr(bb,i,cur) -#else -#define XFS_BMAP_KEY_IADDR(bb,i,cur) \ - XFS_BTREE_KEY_ADDR(XFS_BMAP_BLOCK_ISIZE( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ - xfs_bmbt, bb, i, XFS_BMAP_BLOCK_IMAXRECS( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur)) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_PTR_DADDR) -xfs_bmbt_ptr_t * -xfs_bmap_ptr_daddr(xfs_bmbt_block_t *bb, int i, struct xfs_btree_cur *cur); -#define XFS_BMAP_PTR_DADDR(bb,i,cur) xfs_bmap_ptr_daddr(bb,i,cur) -#else -#define XFS_BMAP_PTR_DADDR(bb,i,cur) \ - XFS_BTREE_PTR_ADDR(XFS_BMAP_BLOCK_DSIZE( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ - xfs_bmbt, bb, i, XFS_BMAP_BLOCK_DMAXRECS( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_PTR_IADDR) -xfs_bmbt_ptr_t * -xfs_bmap_ptr_iaddr(xfs_bmbt_block_t *bb, int i, struct xfs_btree_cur *cur); -#define XFS_BMAP_PTR_IADDR(bb,i,cur) xfs_bmap_ptr_iaddr(bb,i,cur) -#else -#define XFS_BMAP_PTR_IADDR(bb,i,cur) \ - XFS_BTREE_PTR_ADDR(XFS_BMAP_BLOCK_ISIZE( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ - xfs_bmbt, bb, i, XFS_BMAP_BLOCK_IMAXRECS( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur)) -#endif + (((lev) == (cur)->bc_nlevels - 1 ? \ + XFS_BTREE_BLOCK_MINRECS(XFS_BMAP_RBLOCK_ISIZE(lev,cur),\ + xfs_bmbt, (lev) == 0) : \ + ((cur)->bc_mp->m_bmap_dmnr[(lev) != 0]))) + +#define XFS_BMAP_REC_DADDR(bb,i,cur) \ + (XFS_BTREE_REC_ADDR(XFS_BMAP_BLOCK_DSIZE( \ + INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ + xfs_bmbt, bb, i, XFS_BMAP_BLOCK_DMAXRECS( \ + INT_GET((bb)->bb_level, ARCH_CONVERT), cur))) +#define XFS_BMAP_REC_IADDR(bb,i,cur) \ + (XFS_BTREE_REC_ADDR(XFS_BMAP_BLOCK_ISIZE( \ + INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ + xfs_bmbt, bb, i, XFS_BMAP_BLOCK_IMAXRECS( \ + INT_GET((bb)->bb_level, ARCH_CONVERT), cur))) + +#define XFS_BMAP_KEY_DADDR(bb,i,cur) \ + (XFS_BTREE_KEY_ADDR(XFS_BMAP_BLOCK_DSIZE( \ + INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ + xfs_bmbt, bb, i, XFS_BMAP_BLOCK_DMAXRECS( \ + INT_GET((bb)->bb_level, ARCH_CONVERT), cur))) +#define XFS_BMAP_KEY_IADDR(bb,i,cur) \ + (XFS_BTREE_KEY_ADDR(XFS_BMAP_BLOCK_ISIZE( \ + INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ + xfs_bmbt, bb, i, XFS_BMAP_BLOCK_IMAXRECS( \ + INT_GET((bb)->bb_level, ARCH_CONVERT), cur))) + +#define XFS_BMAP_PTR_DADDR(bb,i,cur) \ + (XFS_BTREE_PTR_ADDR(XFS_BMAP_BLOCK_DSIZE( \ + INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ + xfs_bmbt, bb, i, XFS_BMAP_BLOCK_DMAXRECS( \ + INT_GET((bb)->bb_level, ARCH_CONVERT), cur))) +#define XFS_BMAP_PTR_IADDR(bb,i,cur) \ + (XFS_BTREE_PTR_ADDR(XFS_BMAP_BLOCK_ISIZE( \ + INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ + xfs_bmbt, bb, i, XFS_BMAP_BLOCK_IMAXRECS( \ + INT_GET((bb)->bb_level, ARCH_CONVERT), cur))) /* * These are to be used when we know the size of the block and * we don't have a cursor. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_BROOT_REC_ADDR) -xfs_bmbt_rec_t *xfs_bmap_broot_rec_addr(xfs_bmbt_block_t *bb, int i, int sz); -#define XFS_BMAP_BROOT_REC_ADDR(bb,i,sz) xfs_bmap_broot_rec_addr(bb,i,sz) -#else #define XFS_BMAP_BROOT_REC_ADDR(bb,i,sz) \ - XFS_BTREE_REC_ADDR(sz,xfs_bmbt,bb,i,XFS_BMAP_BROOT_MAXRECS(sz)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_BROOT_KEY_ADDR) -xfs_bmbt_key_t *xfs_bmap_broot_key_addr(xfs_bmbt_block_t *bb, int i, int sz); -#define XFS_BMAP_BROOT_KEY_ADDR(bb,i,sz) xfs_bmap_broot_key_addr(bb,i,sz) -#else + (XFS_BTREE_REC_ADDR(sz,xfs_bmbt,bb,i,XFS_BMAP_BROOT_MAXRECS(sz))) #define XFS_BMAP_BROOT_KEY_ADDR(bb,i,sz) \ - XFS_BTREE_KEY_ADDR(sz,xfs_bmbt,bb,i,XFS_BMAP_BROOT_MAXRECS(sz)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_BROOT_PTR_ADDR) -xfs_bmbt_ptr_t *xfs_bmap_broot_ptr_addr(xfs_bmbt_block_t *bb, int i, int sz); -#define XFS_BMAP_BROOT_PTR_ADDR(bb,i,sz) xfs_bmap_broot_ptr_addr(bb,i,sz) -#else + (XFS_BTREE_KEY_ADDR(sz,xfs_bmbt,bb,i,XFS_BMAP_BROOT_MAXRECS(sz))) #define XFS_BMAP_BROOT_PTR_ADDR(bb,i,sz) \ - XFS_BTREE_PTR_ADDR(sz,xfs_bmbt,bb,i,XFS_BMAP_BROOT_MAXRECS(sz)) -#endif + (XFS_BTREE_PTR_ADDR(sz,xfs_bmbt,bb,i,XFS_BMAP_BROOT_MAXRECS(sz))) + +#define XFS_BMAP_BROOT_NUMRECS(bb) INT_GET((bb)->bb_numrecs, ARCH_CONVERT) +#define XFS_BMAP_BROOT_MAXRECS(sz) XFS_BTREE_BLOCK_MAXRECS(sz,xfs_bmbt,0) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_BROOT_NUMRECS) -int xfs_bmap_broot_numrecs(xfs_bmdr_block_t *bb); -#define XFS_BMAP_BROOT_NUMRECS(bb) xfs_bmap_broot_numrecs(bb) -#else -#define XFS_BMAP_BROOT_NUMRECS(bb) (INT_GET((bb)->bb_numrecs, ARCH_CONVERT)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_BROOT_MAXRECS) -int xfs_bmap_broot_maxrecs(int sz); -#define XFS_BMAP_BROOT_MAXRECS(sz) xfs_bmap_broot_maxrecs(sz) -#else -#define XFS_BMAP_BROOT_MAXRECS(sz) XFS_BTREE_BLOCK_MAXRECS(sz,xfs_bmbt,0) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_BROOT_SPACE_CALC) -int xfs_bmap_broot_space_calc(int nrecs); -#define XFS_BMAP_BROOT_SPACE_CALC(nrecs) xfs_bmap_broot_space_calc(nrecs) -#else #define XFS_BMAP_BROOT_SPACE_CALC(nrecs) \ - ((int)(sizeof(xfs_bmbt_block_t) + \ - ((nrecs) * (sizeof(xfs_bmbt_key_t) + sizeof(xfs_bmbt_ptr_t))))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_BROOT_SPACE) -int xfs_bmap_broot_space(xfs_bmdr_block_t *bb); -#define XFS_BMAP_BROOT_SPACE(bb) xfs_bmap_broot_space(bb) -#else + (int)(sizeof(xfs_bmbt_block_t) + \ + ((nrecs) * (sizeof(xfs_bmbt_key_t) + sizeof(xfs_bmbt_ptr_t)))) + #define XFS_BMAP_BROOT_SPACE(bb) \ - XFS_BMAP_BROOT_SPACE_CALC(INT_GET((bb)->bb_numrecs, ARCH_CONVERT)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMDR_SPACE_CALC) -int xfs_bmdr_space_calc(int nrecs); -#define XFS_BMDR_SPACE_CALC(nrecs) xfs_bmdr_space_calc(nrecs) -#else -#define XFS_BMDR_SPACE_CALC(nrecs) \ - ((int)(sizeof(xfs_bmdr_block_t) + \ - ((nrecs) * (sizeof(xfs_bmbt_key_t) + sizeof(xfs_bmbt_ptr_t))))) -#endif + (XFS_BMAP_BROOT_SPACE_CALC(INT_GET((bb)->bb_numrecs, ARCH_CONVERT))) +#define XFS_BMDR_SPACE_CALC(nrecs) \ + (int)(sizeof(xfs_bmdr_block_t) + \ + ((nrecs) * (sizeof(xfs_bmbt_key_t) + sizeof(xfs_bmbt_ptr_t)))) /* * Maximum number of bmap btree levels. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BM_MAXLEVELS) -int xfs_bm_maxlevels(struct xfs_mount *mp, int w); -#define XFS_BM_MAXLEVELS(mp,w) xfs_bm_maxlevels(mp,w) -#else -#define XFS_BM_MAXLEVELS(mp,w) ((mp)->m_bm_maxlevels[w]) -#endif +#define XFS_BM_MAXLEVELS(mp,w) ((mp)->m_bm_maxlevels[(w)]) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BMAP_SANITY_CHECK) -int xfs_bmap_sanity_check(struct xfs_mount *mp, xfs_bmbt_block_t *bb, - int level); -#define XFS_BMAP_SANITY_CHECK(mp,bb,level) \ - xfs_bmap_sanity_check(mp,bb,level) -#else -#define XFS_BMAP_SANITY_CHECK(mp,bb,level) \ +#define XFS_BMAP_SANITY_CHECK(mp,bb,level) \ (INT_GET((bb)->bb_magic, ARCH_CONVERT) == XFS_BMAP_MAGIC && \ INT_GET((bb)->bb_level, ARCH_CONVERT) == level && \ INT_GET((bb)->bb_numrecs, ARCH_CONVERT) > 0 && \ - INT_GET((bb)->bb_numrecs, ARCH_CONVERT) <= (mp)->m_bmap_dmxr[(level) != 0]) -#endif + INT_GET((bb)->bb_numrecs, ARCH_CONVERT) <= \ + (mp)->m_bmap_dmxr[(level) != 0]) #ifdef __KERNEL__ @@ -459,234 +317,84 @@ extern ktrace_t *xfs_bmbt_trace_buf; /* * Prototypes for xfs_bmap.c to call. */ - -void -xfs_bmdr_to_bmbt( - xfs_bmdr_block_t *, - int, - xfs_bmbt_block_t *, - int); - -int -xfs_bmbt_decrement( - struct xfs_btree_cur *, - int, - int *); - -int -xfs_bmbt_delete( - struct xfs_btree_cur *, - int *); - -void -xfs_bmbt_get_all( - xfs_bmbt_rec_t *r, - xfs_bmbt_irec_t *s); - -xfs_bmbt_block_t * -xfs_bmbt_get_block( - struct xfs_btree_cur *cur, - int level, - struct xfs_buf **bpp); - -xfs_filblks_t -xfs_bmbt_get_blockcount( - xfs_bmbt_rec_t *r); - -xfs_fsblock_t -xfs_bmbt_get_startblock( - xfs_bmbt_rec_t *r); - -xfs_fileoff_t -xfs_bmbt_get_startoff( - xfs_bmbt_rec_t *r); - -xfs_exntst_t -xfs_bmbt_get_state( - xfs_bmbt_rec_t *r); +extern void xfs_bmdr_to_bmbt(xfs_bmdr_block_t *, int, xfs_bmbt_block_t *, int); +extern int xfs_bmbt_decrement(struct xfs_btree_cur *, int, int *); +extern int xfs_bmbt_delete(struct xfs_btree_cur *, int *); +extern void xfs_bmbt_get_all(xfs_bmbt_rec_t *r, xfs_bmbt_irec_t *s); +extern xfs_bmbt_block_t *xfs_bmbt_get_block(struct xfs_btree_cur *cur, + int, struct xfs_buf **bpp); +extern xfs_filblks_t xfs_bmbt_get_blockcount(xfs_bmbt_rec_t *r); +extern xfs_fsblock_t xfs_bmbt_get_startblock(xfs_bmbt_rec_t *r); +extern xfs_fileoff_t xfs_bmbt_get_startoff(xfs_bmbt_rec_t *r); +extern xfs_exntst_t xfs_bmbt_get_state(xfs_bmbt_rec_t *r); #ifndef XFS_NATIVE_HOST -void -xfs_bmbt_disk_get_all( - xfs_bmbt_rec_t *r, - xfs_bmbt_irec_t *s); - -xfs_exntst_t -xfs_bmbt_disk_get_state( - xfs_bmbt_rec_t *r); - -xfs_filblks_t -xfs_bmbt_disk_get_blockcount( - xfs_bmbt_rec_t *r); - -xfs_fsblock_t -xfs_bmbt_disk_get_startblock( - xfs_bmbt_rec_t *r); - -xfs_fileoff_t -xfs_bmbt_disk_get_startoff( - xfs_bmbt_rec_t *r); - -#else -#define xfs_bmbt_disk_get_all(r, s) \ - xfs_bmbt_get_all(r, s) -#define xfs_bmbt_disk_get_state(r) \ - xfs_bmbt_get_state(r) -#define xfs_bmbt_disk_get_blockcount(r) \ - xfs_bmbt_get_blockcount(r) -#define xfs_bmbt_disk_get_startblock(r) \ - xfs_bmbt_get_blockcount(r) -#define xfs_bmbt_disk_get_startoff(r) \ - xfs_bmbt_get_startoff(r) +extern void xfs_bmbt_disk_get_all(xfs_bmbt_rec_t *r, xfs_bmbt_irec_t *s); +extern xfs_exntst_t xfs_bmbt_disk_get_state(xfs_bmbt_rec_t *r); +extern xfs_filblks_t xfs_bmbt_disk_get_blockcount(xfs_bmbt_rec_t *r); +extern xfs_fsblock_t xfs_bmbt_disk_get_startblock(xfs_bmbt_rec_t *r); +extern xfs_fileoff_t xfs_bmbt_disk_get_startoff(xfs_bmbt_rec_t *r); +#else +#define xfs_bmbt_disk_get_all(r, s) xfs_bmbt_get_all(r, s) +#define xfs_bmbt_disk_get_state(r) xfs_bmbt_get_state(r) +#define xfs_bmbt_disk_get_blockcount(r) xfs_bmbt_get_blockcount(r) +#define xfs_bmbt_disk_get_startblock(r) xfs_bmbt_get_blockcount(r) +#define xfs_bmbt_disk_get_startoff(r) xfs_bmbt_get_startoff(r) #endif /* XFS_NATIVE_HOST */ -int -xfs_bmbt_increment( - struct xfs_btree_cur *, - int, - int *); - -int -xfs_bmbt_insert( - struct xfs_btree_cur *, - int *); - -void -xfs_bmbt_log_block( - struct xfs_btree_cur *, - struct xfs_buf *, - int); - -void -xfs_bmbt_log_recs( - struct xfs_btree_cur *, - struct xfs_buf *, - int, - int); - -int -xfs_bmbt_lookup_eq( - struct xfs_btree_cur *, - xfs_fileoff_t, - xfs_fsblock_t, - xfs_filblks_t, - int *); - -int -xfs_bmbt_lookup_ge( - struct xfs_btree_cur *, - xfs_fileoff_t, - xfs_fsblock_t, - xfs_filblks_t, - int *); +extern int xfs_bmbt_increment(struct xfs_btree_cur *, int, int *); +extern int xfs_bmbt_insert(struct xfs_btree_cur *, int *); +extern void xfs_bmbt_log_block(struct xfs_btree_cur *, struct xfs_buf *, int); +extern void xfs_bmbt_log_recs(struct xfs_btree_cur *, struct xfs_buf *, int, + int); +extern int xfs_bmbt_lookup_eq(struct xfs_btree_cur *, xfs_fileoff_t, + xfs_fsblock_t, xfs_filblks_t, int *); +extern int xfs_bmbt_lookup_ge(struct xfs_btree_cur *, xfs_fileoff_t, + xfs_fsblock_t, xfs_filblks_t, int *); /* * Give the bmap btree a new root block. Copy the old broot contents * down into a real block and make the broot point to it. */ -int /* error */ -xfs_bmbt_newroot( - struct xfs_btree_cur *cur, /* btree cursor */ - int *logflags, /* logging flags for inode */ - int *stat); /* return status - 0 fail */ - -void -xfs_bmbt_set_all( - xfs_bmbt_rec_t *r, - xfs_bmbt_irec_t *s); - -void -xfs_bmbt_set_allf( - xfs_bmbt_rec_t *r, - xfs_fileoff_t o, - xfs_fsblock_t b, - xfs_filblks_t c, - xfs_exntst_t v); - -void -xfs_bmbt_set_blockcount( - xfs_bmbt_rec_t *r, - xfs_filblks_t v); - -void -xfs_bmbt_set_startblock( - xfs_bmbt_rec_t *r, - xfs_fsblock_t v); - -void -xfs_bmbt_set_startoff( - xfs_bmbt_rec_t *r, - xfs_fileoff_t v); - -void -xfs_bmbt_set_state( - xfs_bmbt_rec_t *r, - xfs_exntst_t v); +extern int xfs_bmbt_newroot(struct xfs_btree_cur *cur, int *lflags, int *stat); + +extern void xfs_bmbt_set_all(xfs_bmbt_rec_t *r, xfs_bmbt_irec_t *s); +extern void xfs_bmbt_set_allf(xfs_bmbt_rec_t *r, xfs_fileoff_t o, + xfs_fsblock_t b, xfs_filblks_t c, xfs_exntst_t v); +extern void xfs_bmbt_set_blockcount(xfs_bmbt_rec_t *r, xfs_filblks_t v); +extern void xfs_bmbt_set_startblock(xfs_bmbt_rec_t *r, xfs_fsblock_t v); +extern void xfs_bmbt_set_startoff(xfs_bmbt_rec_t *r, xfs_fileoff_t v); +extern void xfs_bmbt_set_state(xfs_bmbt_rec_t *r, xfs_exntst_t v); #ifndef XFS_NATIVE_HOST -void -xfs_bmbt_disk_set_all( - xfs_bmbt_rec_t *r, - xfs_bmbt_irec_t *s); - -void -xfs_bmbt_disk_set_allf( - xfs_bmbt_rec_t *r, - xfs_fileoff_t o, - xfs_fsblock_t b, - xfs_filblks_t c, - xfs_exntst_t v); +extern void xfs_bmbt_disk_set_all(xfs_bmbt_rec_t *r, xfs_bmbt_irec_t *s); +extern void xfs_bmbt_disk_set_allf(xfs_bmbt_rec_t *r, xfs_fileoff_t o, + xfs_fsblock_t b, xfs_filblks_t c, xfs_exntst_t v); #else -#define xfs_bmbt_disk_set_all(r, s) \ - xfs_bmbt_set_all(r, s) -#define xfs_bmbt_disk_set_allf(r, o, b, c, v) \ - xfs_bmbt_set_allf(r, o, b, c, v) +#define xfs_bmbt_disk_set_all(r, s) xfs_bmbt_set_all(r, s) +#define xfs_bmbt_disk_set_allf(r, o, b, c, v) xfs_bmbt_set_allf(r, o, b, c, v) #endif /* XFS_NATIVE_HOST */ -void -xfs_bmbt_to_bmdr( - xfs_bmbt_block_t *, - int, - xfs_bmdr_block_t *, - int); - -int -xfs_bmbt_update( - struct xfs_btree_cur *, - xfs_fileoff_t, - xfs_fsblock_t, - xfs_filblks_t, - xfs_exntst_t); +extern void xfs_bmbt_to_bmdr(xfs_bmbt_block_t *, int, xfs_bmdr_block_t *, int); +extern int xfs_bmbt_update(struct xfs_btree_cur *, xfs_fileoff_t, + xfs_fsblock_t, xfs_filblks_t, xfs_exntst_t); #ifdef DEBUG /* * Get the data from the pointed-to record. */ -int -xfs_bmbt_get_rec( - struct xfs_btree_cur *, - xfs_fileoff_t *, - xfs_fsblock_t *, - xfs_filblks_t *, - xfs_exntst_t *, - int *); +extern int xfs_bmbt_get_rec(struct xfs_btree_cur *, xfs_fileoff_t *, + xfs_fsblock_t *, xfs_filblks_t *, + xfs_exntst_t *, int *); #endif - /* * Search an extent list for the extent which includes block * bno. */ -xfs_bmbt_rec_t * -xfs_bmap_do_search_extents( - xfs_bmbt_rec_t *, - xfs_extnum_t, - xfs_extnum_t, - xfs_fileoff_t, - int *, - xfs_extnum_t *, - xfs_bmbt_irec_t *, - xfs_bmbt_irec_t *); +xfs_bmbt_rec_t *xfs_bmap_do_search_extents(xfs_bmbt_rec_t *, + xfs_extnum_t, xfs_extnum_t, xfs_fileoff_t, int *, + xfs_extnum_t *, xfs_bmbt_irec_t *, xfs_bmbt_irec_t *); #endif /* __KERNEL__ */ diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c index 0cc63d657a1..4d63f1c490f 100644 --- a/fs/xfs/xfs_btree.c +++ b/fs/xfs/xfs_btree.c @@ -29,17 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * This file contains common code for the space manager's btree implementations. - */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -47,17 +42,16 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_bit.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" #include "xfs_error.h" /* diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h index 09b4e1532a3..30ee83712c7 100644 --- a/fs/xfs/xfs_btree.h +++ b/fs/xfs/xfs_btree.h @@ -113,12 +113,7 @@ typedef struct xfs_btree_block /* * Boolean to select which form of xfs_btree_block_t.bb_u to use. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BTREE_LONG_PTRS) -int xfs_btree_long_ptrs(xfs_btnum_t btnum); #define XFS_BTREE_LONG_PTRS(btnum) ((btnum) == XFS_BTNUM_BMAP) -#else -#define XFS_BTREE_LONG_PTRS(btnum) ((btnum) == XFS_BTNUM_BMAP) -#endif /* * Magic numbers for btree blocks. @@ -205,24 +200,10 @@ typedef struct xfs_btree_cur /* * Convert from buffer to btree block header. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_BLOCK) -xfs_btree_block_t *xfs_buf_to_block(struct xfs_buf *bp); -#define XFS_BUF_TO_BLOCK(bp) xfs_buf_to_block(bp) -#else -#define XFS_BUF_TO_BLOCK(bp) ((xfs_btree_block_t *)(XFS_BUF_PTR(bp))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_LBLOCK) -xfs_btree_lblock_t *xfs_buf_to_lblock(struct xfs_buf *bp); -#define XFS_BUF_TO_LBLOCK(bp) xfs_buf_to_lblock(bp) -#else -#define XFS_BUF_TO_LBLOCK(bp) ((xfs_btree_lblock_t *)(XFS_BUF_PTR(bp))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_SBLOCK) -xfs_btree_sblock_t *xfs_buf_to_sblock(struct xfs_buf *bp); -#define XFS_BUF_TO_SBLOCK(bp) xfs_buf_to_sblock(bp) -#else -#define XFS_BUF_TO_SBLOCK(bp) ((xfs_btree_sblock_t *)(XFS_BUF_PTR(bp))) -#endif +#define XFS_BUF_TO_BLOCK(bp) ((xfs_btree_block_t *)XFS_BUF_PTR(bp)) +#define XFS_BUF_TO_LBLOCK(bp) ((xfs_btree_lblock_t *)XFS_BUF_PTR(bp)) +#define XFS_BUF_TO_SBLOCK(bp) ((xfs_btree_sblock_t *)XFS_BUF_PTR(bp)) + #ifdef __KERNEL__ @@ -477,106 +458,33 @@ xfs_btree_setbuf( /* * Min and max functions for extlen, agblock, fileoff, and filblks types. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_EXTLEN_MIN) -xfs_extlen_t xfs_extlen_min(xfs_extlen_t a, xfs_extlen_t b); -#define XFS_EXTLEN_MIN(a,b) xfs_extlen_min(a,b) -#else #define XFS_EXTLEN_MIN(a,b) \ ((xfs_extlen_t)(a) < (xfs_extlen_t)(b) ? \ - (xfs_extlen_t)(a) : (xfs_extlen_t)(b)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_EXTLEN_MAX) -xfs_extlen_t xfs_extlen_max(xfs_extlen_t a, xfs_extlen_t b); -#define XFS_EXTLEN_MAX(a,b) xfs_extlen_max(a,b) -#else + (xfs_extlen_t)(a) : (xfs_extlen_t)(b)) #define XFS_EXTLEN_MAX(a,b) \ ((xfs_extlen_t)(a) > (xfs_extlen_t)(b) ? \ - (xfs_extlen_t)(a) : (xfs_extlen_t)(b)) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AGBLOCK_MIN) -xfs_agblock_t xfs_agblock_min(xfs_agblock_t a, xfs_agblock_t b); -#define XFS_AGBLOCK_MIN(a,b) xfs_agblock_min(a,b) -#else + (xfs_extlen_t)(a) : (xfs_extlen_t)(b)) #define XFS_AGBLOCK_MIN(a,b) \ ((xfs_agblock_t)(a) < (xfs_agblock_t)(b) ? \ - (xfs_agblock_t)(a) : (xfs_agblock_t)(b)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AGBLOCK_MAX) -xfs_agblock_t xfs_agblock_max(xfs_agblock_t a, xfs_agblock_t b); -#define XFS_AGBLOCK_MAX(a,b) xfs_agblock_max(a,b) -#else + (xfs_agblock_t)(a) : (xfs_agblock_t)(b)) #define XFS_AGBLOCK_MAX(a,b) \ ((xfs_agblock_t)(a) > (xfs_agblock_t)(b) ? \ - (xfs_agblock_t)(a) : (xfs_agblock_t)(b)) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_FILEOFF_MIN) -xfs_fileoff_t xfs_fileoff_min(xfs_fileoff_t a, xfs_fileoff_t b); -#define XFS_FILEOFF_MIN(a,b) xfs_fileoff_min(a,b) -#else + (xfs_agblock_t)(a) : (xfs_agblock_t)(b)) #define XFS_FILEOFF_MIN(a,b) \ ((xfs_fileoff_t)(a) < (xfs_fileoff_t)(b) ? \ - (xfs_fileoff_t)(a) : (xfs_fileoff_t)(b)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_FILEOFF_MAX) -xfs_fileoff_t xfs_fileoff_max(xfs_fileoff_t a, xfs_fileoff_t b); -#define XFS_FILEOFF_MAX(a,b) xfs_fileoff_max(a,b) -#else + (xfs_fileoff_t)(a) : (xfs_fileoff_t)(b)) #define XFS_FILEOFF_MAX(a,b) \ ((xfs_fileoff_t)(a) > (xfs_fileoff_t)(b) ? \ - (xfs_fileoff_t)(a) : (xfs_fileoff_t)(b)) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_FILBLKS_MIN) -xfs_filblks_t xfs_filblks_min(xfs_filblks_t a, xfs_filblks_t b); -#define XFS_FILBLKS_MIN(a,b) xfs_filblks_min(a,b) -#else + (xfs_fileoff_t)(a) : (xfs_fileoff_t)(b)) #define XFS_FILBLKS_MIN(a,b) \ ((xfs_filblks_t)(a) < (xfs_filblks_t)(b) ? \ - (xfs_filblks_t)(a) : (xfs_filblks_t)(b)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_FILBLKS_MAX) -xfs_filblks_t xfs_filblks_max(xfs_filblks_t a, xfs_filblks_t b); -#define XFS_FILBLKS_MAX(a,b) xfs_filblks_max(a,b) -#else + (xfs_filblks_t)(a) : (xfs_filblks_t)(b)) #define XFS_FILBLKS_MAX(a,b) \ ((xfs_filblks_t)(a) > (xfs_filblks_t)(b) ? \ - (xfs_filblks_t)(a) : (xfs_filblks_t)(b)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_FSB_SANITY_CHECK) -int xfs_fsb_sanity_check(struct xfs_mount *mp, xfs_fsblock_t fsb); -#define XFS_FSB_SANITY_CHECK(mp,fsb) xfs_fsb_sanity_check(mp,fsb) -#else + (xfs_filblks_t)(a) : (xfs_filblks_t)(b)) + #define XFS_FSB_SANITY_CHECK(mp,fsb) \ (XFS_FSB_TO_AGNO(mp, fsb) < mp->m_sb.sb_agcount && \ - XFS_FSB_TO_AGBNO(mp, fsb) < mp->m_sb.sb_agblocks) -#endif - -/* - * Macros to set EFSCORRUPTED & return/branch. - */ -#define XFS_WANT_CORRUPTED_GOTO(x,l) \ - { \ - int fs_is_ok = (x); \ - ASSERT(fs_is_ok); \ - if (unlikely(!fs_is_ok)) { \ - XFS_ERROR_REPORT("XFS_WANT_CORRUPTED_GOTO", \ - XFS_ERRLEVEL_LOW, NULL); \ - error = XFS_ERROR(EFSCORRUPTED); \ - goto l; \ - } \ - } - -#define XFS_WANT_CORRUPTED_RETURN(x) \ - { \ - int fs_is_ok = (x); \ - ASSERT(fs_is_ok); \ - if (unlikely(!fs_is_ok)) { \ - XFS_ERROR_REPORT("XFS_WANT_CORRUPTED_RETURN", \ - XFS_ERRLEVEL_LOW, NULL); \ - return XFS_ERROR(EFSCORRUPTED); \ - } \ - } + XFS_FSB_TO_AGBNO(mp, fsb) < mp->m_sb.sb_agblocks) #endif /* __XFS_BTREE_H__ */ diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index a264657acfd..a37ffc38bb1 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c @@ -29,29 +29,19 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * This file contains the implementation of the xfs_buf_log_item. - * It contains the item operations used to manipulate the buf log - * items as well as utility routines used by the buffer specific - * transaction routines. - */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_sb.h" #include "xfs_dir.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_buf_item.h" #include "xfs_trans_priv.h" -#include "xfs_rw.h" -#include "xfs_bit.h" #include "xfs_error.h" diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c index 7e086c60485..b4075ec7545 100644 --- a/fs/xfs/xfs_da_btree.c +++ b/fs/xfs/xfs_da_btree.c @@ -29,13 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -43,19 +42,19 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_alloc.h" -#include "xfs_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_inode_item.h" +#include "xfs_alloc.h" +#include "xfs_btree.h" #include "xfs_bmap.h" -#include "xfs_da_btree.h" #include "xfs_attr.h" #include "xfs_attr_leaf.h" #include "xfs_dir_leaf.h" @@ -64,7 +63,6 @@ #include "xfs_dir2_block.h" #include "xfs_dir2_node.h" #include "xfs_error.h" -#include "xfs_bit.h" /* * xfs_da_btree.c diff --git a/fs/xfs/xfs_da_btree.h b/fs/xfs/xfs_da_btree.h index a2199578b4c..654956e9787 100644 --- a/fs/xfs/xfs_da_btree.h +++ b/fs/xfs/xfs_da_btree.h @@ -92,72 +92,24 @@ typedef struct xfs_da_node_entry xfs_da_node_entry_t; #define XFS_DA_MAXHASH ((xfs_dahash_t)-1) /* largest valid hash value */ -/* - * Macros used by directory code to interface to the filesystem. - */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LBSIZE) -int xfs_lbsize(struct xfs_mount *mp); -#define XFS_LBSIZE(mp) xfs_lbsize(mp) -#else -#define XFS_LBSIZE(mp) ((mp)->m_sb.sb_blocksize) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LBLOG) -int xfs_lblog(struct xfs_mount *mp); -#define XFS_LBLOG(mp) xfs_lblog(mp) -#else -#define XFS_LBLOG(mp) ((mp)->m_sb.sb_blocklog) -#endif - -/* - * Macros used by directory code to interface to the kernel - */ +#define XFS_LBSIZE(mp) (mp)->m_sb.sb_blocksize +#define XFS_LBLOG(mp) (mp)->m_sb.sb_blocklog -/* - * Macros used to manipulate directory off_t's - */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DA_MAKE_BNOENTRY) -__uint32_t xfs_da_make_bnoentry(struct xfs_mount *mp, xfs_dablk_t bno, - int entry); #define XFS_DA_MAKE_BNOENTRY(mp,bno,entry) \ - xfs_da_make_bnoentry(mp,bno,entry) -#else -#define XFS_DA_MAKE_BNOENTRY(mp,bno,entry) \ (((bno) << (mp)->m_dircook_elog) | (entry)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DA_MAKE_COOKIE) -xfs_off_t xfs_da_make_cookie(struct xfs_mount *mp, xfs_dablk_t bno, int entry, - xfs_dahash_t hash); #define XFS_DA_MAKE_COOKIE(mp,bno,entry,hash) \ - xfs_da_make_cookie(mp,bno,entry,hash) -#else -#define XFS_DA_MAKE_COOKIE(mp,bno,entry,hash) \ (((xfs_off_t)XFS_DA_MAKE_BNOENTRY(mp, bno, entry) << 32) | (hash)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DA_COOKIE_HASH) -xfs_dahash_t xfs_da_cookie_hash(struct xfs_mount *mp, xfs_off_t cookie); -#define XFS_DA_COOKIE_HASH(mp,cookie) xfs_da_cookie_hash(mp,cookie) -#else -#define XFS_DA_COOKIE_HASH(mp,cookie) ((xfs_dahash_t)(cookie)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DA_COOKIE_BNO) -xfs_dablk_t xfs_da_cookie_bno(struct xfs_mount *mp, xfs_off_t cookie); -#define XFS_DA_COOKIE_BNO(mp,cookie) xfs_da_cookie_bno(mp,cookie) -#else -#define XFS_DA_COOKIE_BNO(mp,cookie) \ - (((xfs_off_t)(cookie) >> 31) == -1LL ? \ +#define XFS_DA_COOKIE_HASH(mp,cookie) ((xfs_dahash_t)cookie) +#define XFS_DA_COOKIE_BNO(mp,cookie) \ + ((((xfs_off_t)(cookie) >> 31) == -1LL ? \ (xfs_dablk_t)0 : \ - (xfs_dablk_t)((xfs_off_t)(cookie) >> ((mp)->m_dircook_elog + 32))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DA_COOKIE_ENTRY) -int xfs_da_cookie_entry(struct xfs_mount *mp, xfs_off_t cookie); -#define XFS_DA_COOKIE_ENTRY(mp,cookie) xfs_da_cookie_entry(mp,cookie) -#else -#define XFS_DA_COOKIE_ENTRY(mp,cookie) \ - (((xfs_off_t)(cookie) >> 31) == -1LL ? \ + (xfs_dablk_t)((xfs_off_t)(cookie) >> \ + ((mp)->m_dircook_elog + 32)))) +#define XFS_DA_COOKIE_ENTRY(mp,cookie) \ + ((((xfs_off_t)(cookie) >> 31) == -1LL ? \ (xfs_dablk_t)0 : \ (xfs_dablk_t)(((xfs_off_t)(cookie) >> 32) & \ - ((1 << (mp)->m_dircook_elog) - 1))) -#endif + ((1 << (mp)->m_dircook_elog) - 1)))) /*======================================================================== diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c index 8dd7a3923f6..925b0a22c66 100644 --- a/fs/xfs/xfs_dfrag.c +++ b/fs/xfs/xfs_dfrag.c @@ -29,30 +29,30 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_ag.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_inode_item.h" #include "xfs_bmap.h" +#include "xfs_btree.h" #include "xfs_ialloc.h" #include "xfs_itable.h" #include "xfs_dfrag.h" diff --git a/fs/xfs/xfs_dinode.h b/fs/xfs/xfs_dinode.h index f5c932b064e..9e1fd232325 100644 --- a/fs/xfs/xfs_dinode.h +++ b/fs/xfs/xfs_dinode.h @@ -37,13 +37,8 @@ struct xfs_mount; #define XFS_DINODE_VERSION_1 1 #define XFS_DINODE_VERSION_2 2 -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DINODE_GOOD_VERSION) -int xfs_dinode_good_version(int v); -#define XFS_DINODE_GOOD_VERSION(v) xfs_dinode_good_version(v) -#else -#define XFS_DINODE_GOOD_VERSION(v) (((v) == XFS_DINODE_VERSION_1) || \ - ((v) == XFS_DINODE_VERSION_2)) -#endif +#define XFS_DINODE_GOOD_VERSION(v) \ + (((v) == XFS_DINODE_VERSION_1 || (v) == XFS_DINODE_VERSION_2)) #define XFS_DINODE_MAGIC 0x494e /* 'IN' */ /* @@ -184,75 +179,30 @@ typedef enum xfs_dinode_fmt /* * Inode size for given fs. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LITINO) -int xfs_litino(struct xfs_mount *mp); -#define XFS_LITINO(mp) xfs_litino(mp) -#else #define XFS_LITINO(mp) ((mp)->m_litino) -#endif #define XFS_BROOT_SIZE_ADJ \ (sizeof(xfs_bmbt_block_t) - sizeof(xfs_bmdr_block_t)) -/* - * Fork identifiers. Here so utilities can use them without including - * xfs_inode.h. - */ -#define XFS_DATA_FORK 0 -#define XFS_ATTR_FORK 1 - /* * Inode data & attribute fork sizes, per inode. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_Q) -int xfs_cfork_q_disk(xfs_dinode_core_t *dcp); -int xfs_cfork_q(xfs_dinode_core_t *dcp); -#define XFS_CFORK_Q_DISK(dcp) xfs_cfork_q_disk(dcp) -#define XFS_CFORK_Q(dcp) xfs_cfork_q(dcp) -#else -#define XFS_CFORK_Q_DISK(dcp) ((dcp)->di_forkoff != 0) #define XFS_CFORK_Q(dcp) ((dcp)->di_forkoff != 0) +#define XFS_CFORK_Q_DISK(dcp) ((dcp)->di_forkoff != 0) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_BOFF) -int xfs_cfork_boff_disk(xfs_dinode_core_t *dcp); -int xfs_cfork_boff(xfs_dinode_core_t *dcp); -#define XFS_CFORK_BOFF_DISK(dcp) xfs_cfork_boff_disk(dcp) -#define XFS_CFORK_BOFF(dcp) xfs_cfork_boff(dcp) -#else -#define XFS_CFORK_BOFF_DISK(dcp) ((int)(INT_GET((dcp)->di_forkoff, ARCH_CONVERT) << 3)) #define XFS_CFORK_BOFF(dcp) ((int)((dcp)->di_forkoff << 3)) +#define XFS_CFORK_BOFF_DISK(dcp) \ + ((int)(INT_GET((dcp)->di_forkoff, ARCH_CONVERT) << 3)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_DSIZE) -int xfs_cfork_dsize_disk(xfs_dinode_core_t *dcp, struct xfs_mount *mp); -int xfs_cfork_dsize(xfs_dinode_core_t *dcp, struct xfs_mount *mp); -#define XFS_CFORK_DSIZE_DISK(dcp,mp) xfs_cfork_dsize_disk(dcp,mp) -#define XFS_CFORK_DSIZE(dcp,mp) xfs_cfork_dsize(dcp,mp) -#else #define XFS_CFORK_DSIZE_DISK(dcp,mp) \ (XFS_CFORK_Q_DISK(dcp) ? XFS_CFORK_BOFF_DISK(dcp) : XFS_LITINO(mp)) #define XFS_CFORK_DSIZE(dcp,mp) \ (XFS_CFORK_Q(dcp) ? XFS_CFORK_BOFF(dcp) : XFS_LITINO(mp)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_ASIZE) -int xfs_cfork_asize_disk(xfs_dinode_core_t *dcp, struct xfs_mount *mp); -int xfs_cfork_asize(xfs_dinode_core_t *dcp, struct xfs_mount *mp); -#define XFS_CFORK_ASIZE_DISK(dcp,mp) xfs_cfork_asize_disk(dcp,mp) -#define XFS_CFORK_ASIZE(dcp,mp) xfs_cfork_asize(dcp,mp) -#else #define XFS_CFORK_ASIZE_DISK(dcp,mp) \ (XFS_CFORK_Q_DISK(dcp) ? XFS_LITINO(mp) - XFS_CFORK_BOFF_DISK(dcp) : 0) #define XFS_CFORK_ASIZE(dcp,mp) \ (XFS_CFORK_Q(dcp) ? XFS_LITINO(mp) - XFS_CFORK_BOFF(dcp) : 0) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_SIZE) -int xfs_cfork_size_disk(xfs_dinode_core_t *dcp, struct xfs_mount *mp, int w); -int xfs_cfork_size(xfs_dinode_core_t *dcp, struct xfs_mount *mp, int w); -#define XFS_CFORK_SIZE_DISK(dcp,mp,w) xfs_cfork_size_disk(dcp,mp,w) -#define XFS_CFORK_SIZE(dcp,mp,w) xfs_cfork_size(dcp,mp,w) -#else #define XFS_CFORK_SIZE_DISK(dcp,mp,w) \ ((w) == XFS_DATA_FORK ? \ XFS_CFORK_DSIZE_DISK(dcp, mp) : \ @@ -261,93 +211,26 @@ int xfs_cfork_size(xfs_dinode_core_t *dcp, struct xfs_mount *mp, int w); ((w) == XFS_DATA_FORK ? \ XFS_CFORK_DSIZE(dcp, mp) : XFS_CFORK_ASIZE(dcp, mp)) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_DSIZE) -int xfs_dfork_dsize(xfs_dinode_t *dip, struct xfs_mount *mp); -#define XFS_DFORK_DSIZE(dip,mp) xfs_dfork_dsize(dip,mp) -#else -#define XFS_DFORK_DSIZE(dip,mp) XFS_CFORK_DSIZE_DISK(&(dip)->di_core, mp) - -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_ASIZE) -int xfs_dfork_asize(xfs_dinode_t *dip, struct xfs_mount *mp); -#define XFS_DFORK_ASIZE(dip,mp) xfs_dfork_asize(dip,mp) -#else -#define XFS_DFORK_ASIZE(dip,mp) XFS_CFORK_ASIZE_DISK(&(dip)->di_core, mp) - -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_SIZE) -int xfs_dfork_size(xfs_dinode_t *dip, struct xfs_mount *mp, int w); -#define XFS_DFORK_SIZE(dip,mp,w) xfs_dfork_size(dip,mp,w) -#else -#define XFS_DFORK_SIZE(dip,mp,w) XFS_CFORK_SIZE_DISK(&(dip)->di_core, mp, w) - -#endif +#define XFS_DFORK_DSIZE(dip,mp) \ + XFS_CFORK_DSIZE_DISK(&(dip)->di_core, mp) +#define XFS_DFORK_ASIZE(dip,mp) \ + XFS_CFORK_ASIZE_DISK(&(dip)->di_core, mp) +#define XFS_DFORK_SIZE(dip,mp,w) \ + XFS_CFORK_SIZE_DISK(&(dip)->di_core, mp, w) -/* - * Macros for accessing per-fork disk inode information. - */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_Q) -int xfs_dfork_q(xfs_dinode_t *dip); -#define XFS_DFORK_Q(dip) xfs_dfork_q(dip) -#else #define XFS_DFORK_Q(dip) XFS_CFORK_Q_DISK(&(dip)->di_core) - -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_BOFF) -int xfs_dfork_boff(xfs_dinode_t *dip); -#define XFS_DFORK_BOFF(dip) xfs_dfork_boff(dip) -#else #define XFS_DFORK_BOFF(dip) XFS_CFORK_BOFF_DISK(&(dip)->di_core) - -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_DPTR) -char *xfs_dfork_dptr(xfs_dinode_t *dip); -#define XFS_DFORK_DPTR(dip) xfs_dfork_dptr(dip) -#else #define XFS_DFORK_DPTR(dip) ((dip)->di_u.di_c) - -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_APTR) -char *xfs_dfork_aptr(xfs_dinode_t *dip); -#define XFS_DFORK_APTR(dip) xfs_dfork_aptr(dip) -#else -#define XFS_DFORK_APTR(dip) ((dip)->di_u.di_c + XFS_DFORK_BOFF(dip)) - -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_PTR) -char *xfs_dfork_ptr(xfs_dinode_t *dip, int w); -#define XFS_DFORK_PTR(dip,w) xfs_dfork_ptr(dip,w) -#else +#define XFS_DFORK_APTR(dip) \ + ((dip)->di_u.di_c + XFS_DFORK_BOFF(dip)) #define XFS_DFORK_PTR(dip,w) \ ((w) == XFS_DATA_FORK ? XFS_DFORK_DPTR(dip) : XFS_DFORK_APTR(dip)) - -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_FORMAT) -int xfs_cfork_format(xfs_dinode_core_t *dcp, int w); -#define XFS_CFORK_FORMAT(dcp,w) xfs_cfork_format(dcp,w) -#else -#define XFS_CFORK_FORMAT(dcp,w) \ +#define XFS_CFORK_FORMAT(dcp,w) \ ((w) == XFS_DATA_FORK ? (dcp)->di_format : (dcp)->di_aformat) - -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_FMT_SET) -void xfs_cfork_fmt_set(xfs_dinode_core_t *dcp, int w, int n); -#define XFS_CFORK_FMT_SET(dcp,w,n) xfs_cfork_fmt_set(dcp,w,n) -#else #define XFS_CFORK_FMT_SET(dcp,w,n) \ ((w) == XFS_DATA_FORK ? \ - ((dcp)->di_format = (n)) : \ - ((dcp)->di_aformat = (n))) + ((dcp)->di_format = (n)) : ((dcp)->di_aformat = (n))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_NEXTENTS) -int xfs_cfork_nextents_disk(xfs_dinode_core_t *dcp, int w); -int xfs_cfork_nextents(xfs_dinode_core_t *dcp, int w); -#define XFS_CFORK_NEXTENTS_DISK(dcp,w) xfs_cfork_nextents_disk(dcp,w) -#define XFS_CFORK_NEXTENTS(dcp,w) xfs_cfork_nextents(dcp,w) -#else #define XFS_CFORK_NEXTENTS_DISK(dcp,w) \ ((w) == XFS_DATA_FORK ? \ INT_GET((dcp)->di_nextents, ARCH_CONVERT) : \ @@ -355,31 +238,13 @@ int xfs_cfork_nextents(xfs_dinode_core_t *dcp, int w); #define XFS_CFORK_NEXTENTS(dcp,w) \ ((w) == XFS_DATA_FORK ? (dcp)->di_nextents : (dcp)->di_anextents) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_CFORK_NEXT_SET) -void xfs_cfork_next_set(xfs_dinode_core_t *dcp, int w, int n); -#define XFS_CFORK_NEXT_SET(dcp,w,n) xfs_cfork_next_set(dcp,w,n) -#else #define XFS_CFORK_NEXT_SET(dcp,w,n) \ ((w) == XFS_DATA_FORK ? \ - ((dcp)->di_nextents = (n)) : \ - ((dcp)->di_anextents = (n))) - -#endif + ((dcp)->di_nextents = (n)) : ((dcp)->di_anextents = (n))) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DFORK_NEXTENTS) -int xfs_dfork_nextents(xfs_dinode_t *dip, int w); -#define XFS_DFORK_NEXTENTS(dip,w) xfs_dfork_nextents(dip,w) -#else #define XFS_DFORK_NEXTENTS(dip,w) XFS_CFORK_NEXTENTS_DISK(&(dip)->di_core, w) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_DINODE) -xfs_dinode_t *xfs_buf_to_dinode(struct xfs_buf *bp); -#define XFS_BUF_TO_DINODE(bp) xfs_buf_to_dinode(bp) -#else -#define XFS_BUF_TO_DINODE(bp) ((xfs_dinode_t *)(XFS_BUF_PTR(bp))) -#endif +#define XFS_BUF_TO_DINODE(bp) ((xfs_dinode_t *)XFS_BUF_PTR(bp)) /* * Values for di_flags diff --git a/fs/xfs/xfs_dir.c b/fs/xfs/xfs_dir.c index 53787f35338..d32824e8d86 100644 --- a/fs/xfs/xfs_dir.c +++ b/fs/xfs/xfs_dir.c @@ -29,31 +29,29 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" #include "xfs_alloc.h" #include "xfs_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" -#include "xfs_da_btree.h" #include "xfs_dir_leaf.h" #include "xfs_error.h" diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c index 49fc0a3695a..40a741c7e5c 100644 --- a/fs/xfs/xfs_dir2.c +++ b/fs/xfs/xfs_dir2.c @@ -29,18 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * XFS v2 directory implmentation. - * Top-level and utility routines. - */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -48,16 +42,16 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" -#include "xfs_attr_sf.h" +#include "xfs_alloc_btree.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_inode_item.h" #include "xfs_bmap.h" -#include "xfs_da_btree.h" #include "xfs_dir_leaf.h" #include "xfs_dir2_data.h" #include "xfs_dir2_leaf.h" @@ -65,7 +59,6 @@ #include "xfs_dir2_node.h" #include "xfs_dir2_trace.h" #include "xfs_error.h" -#include "xfs_bit.h" /* * Declarations for interface routines. diff --git a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c index 088d3bdfac9..47b5d2c4b93 100644 --- a/fs/xfs/xfs_dir2_block.c +++ b/fs/xfs/xfs_dir2_block.c @@ -29,33 +29,25 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * xfs_dir2_block.c - * XFS V2 directory implementation, single-block form. - * See xfs_dir2_block.h for the format. - */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" -#include "xfs_da_btree.h" +#include "xfs_inode_item.h" #include "xfs_dir_leaf.h" #include "xfs_dir2_data.h" #include "xfs_dir2_leaf.h" diff --git a/fs/xfs/xfs_dir2_block.h b/fs/xfs/xfs_dir2_block.h index 5a578b84e24..70dcbe8976f 100644 --- a/fs/xfs/xfs_dir2_block.h +++ b/fs/xfs/xfs_dir2_block.h @@ -74,53 +74,37 @@ typedef struct xfs_dir2_block { /* * Pointer to the leaf header embedded in a data block (1-block format) */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_BLOCK_TAIL_P) -xfs_dir2_block_tail_t * -xfs_dir2_block_tail_p(struct xfs_mount *mp, xfs_dir2_block_t *block); #define XFS_DIR2_BLOCK_TAIL_P(mp,block) xfs_dir2_block_tail_p(mp,block) -#else -#define XFS_DIR2_BLOCK_TAIL_P(mp,block) \ - (((xfs_dir2_block_tail_t *)((char *)(block) + (mp)->m_dirblksize)) - 1) -#endif +static inline xfs_dir2_block_tail_t * +xfs_dir2_block_tail_p(struct xfs_mount *mp, xfs_dir2_block_t *block) +{ + return (((xfs_dir2_block_tail_t *) + ((char *)(block) + (mp)->m_dirblksize)) - 1); +} /* * Pointer to the leaf entries embedded in a data block (1-block format) */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_BLOCK_LEAF_P) -struct xfs_dir2_leaf_entry *xfs_dir2_block_leaf_p(xfs_dir2_block_tail_t *btp); -#define XFS_DIR2_BLOCK_LEAF_P(btp) \ - xfs_dir2_block_leaf_p(btp) -#else -#define XFS_DIR2_BLOCK_LEAF_P(btp) \ - (((struct xfs_dir2_leaf_entry *)(btp)) - INT_GET((btp)->count, ARCH_CONVERT)) -#endif +#define XFS_DIR2_BLOCK_LEAF_P(btp) xfs_dir2_block_leaf_p(btp) +static inline struct xfs_dir2_leaf_entry * +xfs_dir2_block_leaf_p(xfs_dir2_block_tail_t *btp) +{ + return (((struct xfs_dir2_leaf_entry *) + (btp)) - INT_GET((btp)->count, ARCH_CONVERT)); +} /* * Function declarations. */ - -extern int - xfs_dir2_block_addname(struct xfs_da_args *args); - -extern int - xfs_dir2_block_getdents(struct xfs_trans *tp, struct xfs_inode *dp, - struct uio *uio, int *eofp, struct xfs_dirent *dbp, - xfs_dir2_put_t put); - -extern int - xfs_dir2_block_lookup(struct xfs_da_args *args); - -extern int - xfs_dir2_block_removename(struct xfs_da_args *args); - -extern int - xfs_dir2_block_replace(struct xfs_da_args *args); - -extern int - xfs_dir2_leaf_to_block(struct xfs_da_args *args, struct xfs_dabuf *lbp, - struct xfs_dabuf *dbp); - -extern int - xfs_dir2_sf_to_block(struct xfs_da_args *args); +extern int xfs_dir2_block_addname(struct xfs_da_args *args); +extern int xfs_dir2_block_getdents(struct xfs_trans *tp, struct xfs_inode *dp, + struct uio *uio, int *eofp, + struct xfs_dirent *dbp, xfs_dir2_put_t put); +extern int xfs_dir2_block_lookup(struct xfs_da_args *args); +extern int xfs_dir2_block_removename(struct xfs_da_args *args); +extern int xfs_dir2_block_replace(struct xfs_da_args *args); +extern int xfs_dir2_leaf_to_block(struct xfs_da_args *args, + struct xfs_dabuf *lbp, struct xfs_dabuf *dbp); +extern int xfs_dir2_sf_to_block(struct xfs_da_args *args); #endif /* __XFS_DIR2_BLOCK_H__ */ diff --git a/fs/xfs/xfs_dir2_data.c b/fs/xfs/xfs_dir2_data.c index a0aa0e44ff9..4b25f7e7c81 100644 --- a/fs/xfs/xfs_dir2_data.c +++ b/fs/xfs/xfs_dir2_data.c @@ -29,32 +29,24 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * xfs_dir2_data.c - * Core data block handling routines for XFS V2 directories. - * See xfs_dir2_data.h for data structures. - */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_da_btree.h" #include "xfs_dir_leaf.h" #include "xfs_dir2_data.h" #include "xfs_dir2_leaf.h" diff --git a/fs/xfs/xfs_dir2_data.h b/fs/xfs/xfs_dir2_data.h index 476cac920bf..eeff8557072 100644 --- a/fs/xfs/xfs_dir2_data.h +++ b/fs/xfs/xfs_dir2_data.h @@ -137,88 +137,65 @@ typedef struct xfs_dir2_data { /* * Size of a data entry. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DATA_ENTSIZE) -int xfs_dir2_data_entsize(int n); #define XFS_DIR2_DATA_ENTSIZE(n) xfs_dir2_data_entsize(n) -#else -#define XFS_DIR2_DATA_ENTSIZE(n) \ - ((int)(roundup(offsetof(xfs_dir2_data_entry_t, name[0]) + (n) + \ - (uint)sizeof(xfs_dir2_data_off_t), XFS_DIR2_DATA_ALIGN))) -#endif +static inline int xfs_dir2_data_entsize(int n) +{ + return (int)roundup(offsetof(xfs_dir2_data_entry_t, name[0]) + (n) + \ + (uint)sizeof(xfs_dir2_data_off_t), XFS_DIR2_DATA_ALIGN); +} /* * Pointer to an entry's tag word. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DATA_ENTRY_TAG_P) -xfs_dir2_data_off_t *xfs_dir2_data_entry_tag_p(xfs_dir2_data_entry_t *dep); #define XFS_DIR2_DATA_ENTRY_TAG_P(dep) xfs_dir2_data_entry_tag_p(dep) -#else -#define XFS_DIR2_DATA_ENTRY_TAG_P(dep) \ - ((xfs_dir2_data_off_t *)\ - ((char *)(dep) + XFS_DIR2_DATA_ENTSIZE((dep)->namelen) - \ - (uint)sizeof(xfs_dir2_data_off_t))) -#endif +static inline xfs_dir2_data_off_t * +xfs_dir2_data_entry_tag_p(xfs_dir2_data_entry_t *dep) +{ + return (xfs_dir2_data_off_t *) \ + ((char *)(dep) + XFS_DIR2_DATA_ENTSIZE((dep)->namelen) - \ + (uint)sizeof(xfs_dir2_data_off_t)); +} /* * Pointer to a freespace's tag word. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DATA_UNUSED_TAG_P) -xfs_dir2_data_off_t *xfs_dir2_data_unused_tag_p(xfs_dir2_data_unused_t *dup); #define XFS_DIR2_DATA_UNUSED_TAG_P(dup) \ xfs_dir2_data_unused_tag_p(dup) -#else -#define XFS_DIR2_DATA_UNUSED_TAG_P(dup) \ - ((xfs_dir2_data_off_t *)\ - ((char *)(dup) + INT_GET((dup)->length, ARCH_CONVERT) \ - - (uint)sizeof(xfs_dir2_data_off_t))) -#endif +static inline xfs_dir2_data_off_t * +xfs_dir2_data_unused_tag_p(xfs_dir2_data_unused_t *dup) +{ + return (xfs_dir2_data_off_t *) \ + ((char *)(dup) + INT_GET((dup)->length, ARCH_CONVERT) \ + - (uint)sizeof(xfs_dir2_data_off_t)); +} /* * Function declarations. */ - #ifdef DEBUG -extern void - xfs_dir2_data_check(struct xfs_inode *dp, struct xfs_dabuf *bp); +extern void xfs_dir2_data_check(struct xfs_inode *dp, struct xfs_dabuf *bp); #else #define xfs_dir2_data_check(dp,bp) #endif - -extern xfs_dir2_data_free_t * - xfs_dir2_data_freefind(xfs_dir2_data_t *d, - xfs_dir2_data_unused_t *dup); - -extern xfs_dir2_data_free_t * - xfs_dir2_data_freeinsert(xfs_dir2_data_t *d, - xfs_dir2_data_unused_t *dup, int *loghead); - -extern void - xfs_dir2_data_freescan(struct xfs_mount *mp, xfs_dir2_data_t *d, - int *loghead, char *aendp); - -extern int - xfs_dir2_data_init(struct xfs_da_args *args, xfs_dir2_db_t blkno, - struct xfs_dabuf **bpp); - -extern void - xfs_dir2_data_log_entry(struct xfs_trans *tp, struct xfs_dabuf *bp, +extern xfs_dir2_data_free_t *xfs_dir2_data_freefind(xfs_dir2_data_t *d, + xfs_dir2_data_unused_t *dup); +extern xfs_dir2_data_free_t *xfs_dir2_data_freeinsert(xfs_dir2_data_t *d, + xfs_dir2_data_unused_t *dup, int *loghead); +extern void xfs_dir2_data_freescan(struct xfs_mount *mp, xfs_dir2_data_t *d, + int *loghead, char *aendp); +extern int xfs_dir2_data_init(struct xfs_da_args *args, xfs_dir2_db_t blkno, + struct xfs_dabuf **bpp); +extern void xfs_dir2_data_log_entry(struct xfs_trans *tp, struct xfs_dabuf *bp, xfs_dir2_data_entry_t *dep); - -extern void - xfs_dir2_data_log_header(struct xfs_trans *tp, struct xfs_dabuf *bp); - -extern void - xfs_dir2_data_log_unused(struct xfs_trans *tp, struct xfs_dabuf *bp, - xfs_dir2_data_unused_t *dup); - -extern void - xfs_dir2_data_make_free(struct xfs_trans *tp, struct xfs_dabuf *bp, +extern void xfs_dir2_data_log_header(struct xfs_trans *tp, + struct xfs_dabuf *bp); +extern void xfs_dir2_data_log_unused(struct xfs_trans *tp, struct xfs_dabuf *bp, + xfs_dir2_data_unused_t *dup); +extern void xfs_dir2_data_make_free(struct xfs_trans *tp, struct xfs_dabuf *bp, xfs_dir2_data_aoff_t offset, xfs_dir2_data_aoff_t len, int *needlogp, int *needscanp); - -extern void - xfs_dir2_data_use_free(struct xfs_trans *tp, struct xfs_dabuf *bp, +extern void xfs_dir2_data_use_free(struct xfs_trans *tp, struct xfs_dabuf *bp, xfs_dir2_data_unused_t *dup, xfs_dir2_data_aoff_t offset, xfs_dir2_data_aoff_t len, int *needlogp, diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c index 056f5283904..89e48877e0e 100644 --- a/fs/xfs/xfs_dir2_leaf.c +++ b/fs/xfs/xfs_dir2_leaf.c @@ -29,21 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * xfs_dir2_leaf.c - * XFS directory version 2 implementation - single leaf form - * see xfs_dir2_leaf.h for data structures. - * These directories have multiple XFS_DIR2_DATA blocks and one - * XFS_DIR2_LEAF1 block containing the hash table and freespace map. - */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -51,6 +42,7 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_attr_sf.h" #include "xfs_dir_sf.h" @@ -58,14 +50,12 @@ #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" -#include "xfs_da_btree.h" #include "xfs_dir2_data.h" #include "xfs_dir2_leaf.h" #include "xfs_dir2_block.h" #include "xfs_dir2_node.h" #include "xfs_dir2_trace.h" #include "xfs_error.h" -#include "xfs_bit.h" /* * Local function declarations. diff --git a/fs/xfs/xfs_dir2_leaf.h b/fs/xfs/xfs_dir2_leaf.h index 3303cd6f4c0..43f0ec2131a 100644 --- a/fs/xfs/xfs_dir2_leaf.h +++ b/fs/xfs/xfs_dir2_leaf.h @@ -43,10 +43,6 @@ struct xfs_inode; struct xfs_mount; struct xfs_trans; -/* - * Constants. - */ - /* * Offset of the leaf/node space. First block in this space * is the btree root. @@ -56,10 +52,6 @@ struct xfs_trans; #define XFS_DIR2_LEAF_FIRSTDB(mp) \ XFS_DIR2_BYTE_TO_DB(mp, XFS_DIR2_LEAF_OFFSET) -/* - * Types. - */ - /* * Offset in data space of a data entry. */ @@ -67,10 +59,6 @@ typedef __uint32_t xfs_dir2_dataptr_t; #define XFS_DIR2_MAX_DATAPTR ((xfs_dir2_dataptr_t)0xffffffff) #define XFS_DIR2_NULL_DATAPTR ((xfs_dir2_dataptr_t)0) -/* - * Structures. - */ - /* * Leaf block header. */ @@ -109,245 +97,193 @@ typedef struct xfs_dir2_leaf { } xfs_dir2_leaf_t; /* - * Macros. - * The DB blocks are logical directory block numbers, not filesystem blocks. + * DB blocks here are logical directory block numbers, not filesystem blocks. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_MAX_LEAF_ENTS) -int -xfs_dir2_max_leaf_ents(struct xfs_mount *mp); -#define XFS_DIR2_MAX_LEAF_ENTS(mp) \ - xfs_dir2_max_leaf_ents(mp) -#else -#define XFS_DIR2_MAX_LEAF_ENTS(mp) \ - ((int)(((mp)->m_dirblksize - (uint)sizeof(xfs_dir2_leaf_hdr_t)) / \ - (uint)sizeof(xfs_dir2_leaf_entry_t))) -#endif +#define XFS_DIR2_MAX_LEAF_ENTS(mp) xfs_dir2_max_leaf_ents(mp) +static inline int xfs_dir2_max_leaf_ents(struct xfs_mount *mp) +{ + return (int)(((mp)->m_dirblksize - (uint)sizeof(xfs_dir2_leaf_hdr_t)) / + (uint)sizeof(xfs_dir2_leaf_entry_t)); +} /* * Get address of the bestcount field in the single-leaf block. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_LEAF_TAIL_P) -xfs_dir2_leaf_tail_t * -xfs_dir2_leaf_tail_p(struct xfs_mount *mp, xfs_dir2_leaf_t *lp); -#define XFS_DIR2_LEAF_TAIL_P(mp,lp) \ - xfs_dir2_leaf_tail_p(mp, lp) -#else -#define XFS_DIR2_LEAF_TAIL_P(mp,lp) \ - ((xfs_dir2_leaf_tail_t *)\ - ((char *)(lp) + (mp)->m_dirblksize - \ - (uint)sizeof(xfs_dir2_leaf_tail_t))) -#endif +#define XFS_DIR2_LEAF_TAIL_P(mp,lp) xfs_dir2_leaf_tail_p(mp, lp) +static inline xfs_dir2_leaf_tail_t * +xfs_dir2_leaf_tail_p(struct xfs_mount *mp, xfs_dir2_leaf_t *lp) +{ + return (xfs_dir2_leaf_tail_t *) + ((char *)(lp) + (mp)->m_dirblksize - + (uint)sizeof(xfs_dir2_leaf_tail_t)); +} /* * Get address of the bests array in the single-leaf block. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_LEAF_BESTS_P) -xfs_dir2_data_off_t * -xfs_dir2_leaf_bests_p(xfs_dir2_leaf_tail_t *ltp); #define XFS_DIR2_LEAF_BESTS_P(ltp) xfs_dir2_leaf_bests_p(ltp) -#else -#define XFS_DIR2_LEAF_BESTS_P(ltp) \ - ((xfs_dir2_data_off_t *)(ltp) - INT_GET((ltp)->bestcount, ARCH_CONVERT)) -#endif +static inline xfs_dir2_data_off_t * +xfs_dir2_leaf_bests_p(xfs_dir2_leaf_tail_t *ltp) +{ + return (xfs_dir2_data_off_t *) + (ltp) - INT_GET((ltp)->bestcount, ARCH_CONVERT); +} /* * Convert dataptr to byte in file space */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DATAPTR_TO_BYTE) -xfs_dir2_off_t -xfs_dir2_dataptr_to_byte(struct xfs_mount *mp, xfs_dir2_dataptr_t dp); #define XFS_DIR2_DATAPTR_TO_BYTE(mp,dp) xfs_dir2_dataptr_to_byte(mp, dp) -#else -#define XFS_DIR2_DATAPTR_TO_BYTE(mp,dp) \ - ((xfs_dir2_off_t)(dp) << XFS_DIR2_DATA_ALIGN_LOG) -#endif +static inline xfs_dir2_off_t +xfs_dir2_dataptr_to_byte(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) +{ + return (xfs_dir2_off_t)(dp) << XFS_DIR2_DATA_ALIGN_LOG; +} /* * Convert byte in file space to dataptr. It had better be aligned. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_BYTE_TO_DATAPTR) -xfs_dir2_dataptr_t -xfs_dir2_byte_to_dataptr(struct xfs_mount *mp, xfs_dir2_off_t by); #define XFS_DIR2_BYTE_TO_DATAPTR(mp,by) xfs_dir2_byte_to_dataptr(mp,by) -#else -#define XFS_DIR2_BYTE_TO_DATAPTR(mp,by) \ - ((xfs_dir2_dataptr_t)((by) >> XFS_DIR2_DATA_ALIGN_LOG)) -#endif +static inline xfs_dir2_dataptr_t +xfs_dir2_byte_to_dataptr(struct xfs_mount *mp, xfs_dir2_off_t by) +{ + return (xfs_dir2_dataptr_t)((by) >> XFS_DIR2_DATA_ALIGN_LOG); +} + +/* + * Convert byte in space to (DB) block + */ +#define XFS_DIR2_BYTE_TO_DB(mp,by) xfs_dir2_byte_to_db(mp, by) +static inline xfs_dir2_db_t +xfs_dir2_byte_to_db(struct xfs_mount *mp, xfs_dir2_off_t by) +{ + return (xfs_dir2_db_t)((by) >> \ + ((mp)->m_sb.sb_blocklog + (mp)->m_sb.sb_dirblklog)); +} /* * Convert dataptr to a block number */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DATAPTR_TO_DB) -xfs_dir2_db_t -xfs_dir2_dataptr_to_db(struct xfs_mount *mp, xfs_dir2_dataptr_t dp); #define XFS_DIR2_DATAPTR_TO_DB(mp,dp) xfs_dir2_dataptr_to_db(mp, dp) -#else -#define XFS_DIR2_DATAPTR_TO_DB(mp,dp) \ - XFS_DIR2_BYTE_TO_DB(mp, XFS_DIR2_DATAPTR_TO_BYTE(mp, dp)) -#endif +static inline xfs_dir2_db_t +xfs_dir2_dataptr_to_db(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) +{ + return XFS_DIR2_BYTE_TO_DB(mp, XFS_DIR2_DATAPTR_TO_BYTE(mp, dp)); +} + +/* + * Convert byte in space to offset in a block + */ +#define XFS_DIR2_BYTE_TO_OFF(mp,by) xfs_dir2_byte_to_off(mp, by) +static inline xfs_dir2_data_aoff_t +xfs_dir2_byte_to_off(struct xfs_mount *mp, xfs_dir2_off_t by) +{ + return (xfs_dir2_data_aoff_t)((by) & \ + ((1 << ((mp)->m_sb.sb_blocklog + (mp)->m_sb.sb_dirblklog)) - 1)); +} /* * Convert dataptr to a byte offset in a block */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DATAPTR_TO_OFF) -xfs_dir2_data_aoff_t -xfs_dir2_dataptr_to_off(struct xfs_mount *mp, xfs_dir2_dataptr_t dp); #define XFS_DIR2_DATAPTR_TO_OFF(mp,dp) xfs_dir2_dataptr_to_off(mp, dp) -#else -#define XFS_DIR2_DATAPTR_TO_OFF(mp,dp) \ - XFS_DIR2_BYTE_TO_OFF(mp, XFS_DIR2_DATAPTR_TO_BYTE(mp, dp)) -#endif +static inline xfs_dir2_data_aoff_t +xfs_dir2_dataptr_to_off(struct xfs_mount *mp, xfs_dir2_dataptr_t dp) +{ + return XFS_DIR2_BYTE_TO_OFF(mp, XFS_DIR2_DATAPTR_TO_BYTE(mp, dp)); +} /* * Convert block and offset to byte in space */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DB_OFF_TO_BYTE) -xfs_dir2_off_t -xfs_dir2_db_off_to_byte(struct xfs_mount *mp, xfs_dir2_db_t db, - xfs_dir2_data_aoff_t o); #define XFS_DIR2_DB_OFF_TO_BYTE(mp,db,o) \ xfs_dir2_db_off_to_byte(mp, db, o) -#else -#define XFS_DIR2_DB_OFF_TO_BYTE(mp,db,o) \ - (((xfs_dir2_off_t)(db) << \ - ((mp)->m_sb.sb_blocklog + (mp)->m_sb.sb_dirblklog)) + (o)) -#endif +static inline xfs_dir2_off_t +xfs_dir2_db_off_to_byte(struct xfs_mount *mp, xfs_dir2_db_t db, + xfs_dir2_data_aoff_t o) +{ + return ((xfs_dir2_off_t)(db) << \ + ((mp)->m_sb.sb_blocklog + (mp)->m_sb.sb_dirblklog)) + (o); +} /* - * Convert byte in space to (DB) block + * Convert block (DB) to block (dablk) */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_BYTE_TO_DB) -xfs_dir2_db_t xfs_dir2_byte_to_db(struct xfs_mount *mp, xfs_dir2_off_t by); -#define XFS_DIR2_BYTE_TO_DB(mp,by) xfs_dir2_byte_to_db(mp, by) -#else -#define XFS_DIR2_BYTE_TO_DB(mp,by) \ - ((xfs_dir2_db_t)((by) >> \ - ((mp)->m_sb.sb_blocklog + (mp)->m_sb.sb_dirblklog))) -#endif +#define XFS_DIR2_DB_TO_DA(mp,db) xfs_dir2_db_to_da(mp, db) +static inline xfs_dablk_t +xfs_dir2_db_to_da(struct xfs_mount *mp, xfs_dir2_db_t db) +{ + return (xfs_dablk_t)((db) << (mp)->m_sb.sb_dirblklog); +} /* * Convert byte in space to (DA) block */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_BYTE_TO_DA) -xfs_dablk_t xfs_dir2_byte_to_da(struct xfs_mount *mp, xfs_dir2_off_t by); #define XFS_DIR2_BYTE_TO_DA(mp,by) xfs_dir2_byte_to_da(mp, by) -#else -#define XFS_DIR2_BYTE_TO_DA(mp,by) \ - XFS_DIR2_DB_TO_DA(mp, XFS_DIR2_BYTE_TO_DB(mp, by)) -#endif - -/* - * Convert byte in space to offset in a block - */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_BYTE_TO_OFF) -xfs_dir2_data_aoff_t -xfs_dir2_byte_to_off(struct xfs_mount *mp, xfs_dir2_off_t by); -#define XFS_DIR2_BYTE_TO_OFF(mp,by) xfs_dir2_byte_to_off(mp, by) -#else -#define XFS_DIR2_BYTE_TO_OFF(mp,by) \ - ((xfs_dir2_data_aoff_t)((by) & \ - ((1 << ((mp)->m_sb.sb_blocklog + \ - (mp)->m_sb.sb_dirblklog)) - 1))) -#endif +static inline xfs_dablk_t +xfs_dir2_byte_to_da(struct xfs_mount *mp, xfs_dir2_off_t by) +{ + return XFS_DIR2_DB_TO_DA(mp, XFS_DIR2_BYTE_TO_DB(mp, by)); +} /* * Convert block and offset to dataptr */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DB_OFF_TO_DATAPTR) -xfs_dir2_dataptr_t -xfs_dir2_db_off_to_dataptr(struct xfs_mount *mp, xfs_dir2_db_t db, - xfs_dir2_data_aoff_t o); #define XFS_DIR2_DB_OFF_TO_DATAPTR(mp,db,o) \ xfs_dir2_db_off_to_dataptr(mp, db, o) -#else -#define XFS_DIR2_DB_OFF_TO_DATAPTR(mp,db,o) \ - XFS_DIR2_BYTE_TO_DATAPTR(mp, XFS_DIR2_DB_OFF_TO_BYTE(mp, db, o)) -#endif - -/* - * Convert block (DB) to block (dablk) - */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DB_TO_DA) -xfs_dablk_t xfs_dir2_db_to_da(struct xfs_mount *mp, xfs_dir2_db_t db); -#define XFS_DIR2_DB_TO_DA(mp,db) xfs_dir2_db_to_da(mp, db) -#else -#define XFS_DIR2_DB_TO_DA(mp,db) \ - ((xfs_dablk_t)((db) << (mp)->m_sb.sb_dirblklog)) -#endif +static inline xfs_dir2_dataptr_t +xfs_dir2_db_off_to_dataptr(struct xfs_mount *mp, xfs_dir2_db_t db, + xfs_dir2_data_aoff_t o) +{ + return XFS_DIR2_BYTE_TO_DATAPTR(mp, XFS_DIR2_DB_OFF_TO_BYTE(mp, db, o)); +} /* * Convert block (dablk) to block (DB) */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DA_TO_DB) -xfs_dir2_db_t xfs_dir2_da_to_db(struct xfs_mount *mp, xfs_dablk_t da); #define XFS_DIR2_DA_TO_DB(mp,da) xfs_dir2_da_to_db(mp, da) -#else -#define XFS_DIR2_DA_TO_DB(mp,da) \ - ((xfs_dir2_db_t)((da) >> (mp)->m_sb.sb_dirblklog)) -#endif +static inline xfs_dir2_db_t +xfs_dir2_da_to_db(struct xfs_mount *mp, xfs_dablk_t da) +{ + return (xfs_dir2_db_t)((da) >> (mp)->m_sb.sb_dirblklog); +} /* * Convert block (dablk) to byte offset in space */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DA_TO_BYTE) -xfs_dir2_off_t xfs_dir2_da_to_byte(struct xfs_mount *mp, xfs_dablk_t da); #define XFS_DIR2_DA_TO_BYTE(mp,da) xfs_dir2_da_to_byte(mp, da) -#else -#define XFS_DIR2_DA_TO_BYTE(mp,da) \ - XFS_DIR2_DB_OFF_TO_BYTE(mp, XFS_DIR2_DA_TO_DB(mp, da), 0) -#endif +static inline xfs_dir2_off_t +xfs_dir2_da_to_byte(struct xfs_mount *mp, xfs_dablk_t da) +{ + return XFS_DIR2_DB_OFF_TO_BYTE(mp, XFS_DIR2_DA_TO_DB(mp, da), 0); +} /* * Function declarations. */ - -extern int - xfs_dir2_block_to_leaf(struct xfs_da_args *args, struct xfs_dabuf *dbp); - -extern int - xfs_dir2_leaf_addname(struct xfs_da_args *args); - -extern void - xfs_dir2_leaf_compact(struct xfs_da_args *args, struct xfs_dabuf *bp); - -extern void - xfs_dir2_leaf_compact_x1(struct xfs_dabuf *bp, int *indexp, - int *lowstalep, int *highstalep, int *lowlogp, - int *highlogp); - -extern int - xfs_dir2_leaf_getdents(struct xfs_trans *tp, struct xfs_inode *dp, - struct uio *uio, int *eofp, struct xfs_dirent *dbp, - xfs_dir2_put_t put); - -extern int - xfs_dir2_leaf_init(struct xfs_da_args *args, xfs_dir2_db_t bno, - struct xfs_dabuf **bpp, int magic); - -extern void - xfs_dir2_leaf_log_ents(struct xfs_trans *tp, struct xfs_dabuf *bp, - int first, int last); - -extern void - xfs_dir2_leaf_log_header(struct xfs_trans *tp, struct xfs_dabuf *bp); - -extern int - xfs_dir2_leaf_lookup(struct xfs_da_args *args); - -extern int - xfs_dir2_leaf_removename(struct xfs_da_args *args); - -extern int - xfs_dir2_leaf_replace(struct xfs_da_args *args); - -extern int - xfs_dir2_leaf_search_hash(struct xfs_da_args *args, - struct xfs_dabuf *lbp); -extern int - xfs_dir2_leaf_trim_data(struct xfs_da_args *args, struct xfs_dabuf *lbp, xfs_dir2_db_t db); - -extern int - xfs_dir2_node_to_leaf(struct xfs_da_state *state); +extern int xfs_dir2_block_to_leaf(struct xfs_da_args *args, + struct xfs_dabuf *dbp); +extern int xfs_dir2_leaf_addname(struct xfs_da_args *args); +extern void xfs_dir2_leaf_compact(struct xfs_da_args *args, + struct xfs_dabuf *bp); +extern void xfs_dir2_leaf_compact_x1(struct xfs_dabuf *bp, int *indexp, + int *lowstalep, int *highstalep, + int *lowlogp, int *highlogp); +extern int xfs_dir2_leaf_getdents(struct xfs_trans *tp, struct xfs_inode *dp, + struct uio *uio, int *eofp, + struct xfs_dirent *dbp, xfs_dir2_put_t put); +extern int xfs_dir2_leaf_init(struct xfs_da_args *args, xfs_dir2_db_t bno, + struct xfs_dabuf **bpp, int magic); +extern void xfs_dir2_leaf_log_ents(struct xfs_trans *tp, struct xfs_dabuf *bp, + int first, int last); +extern void xfs_dir2_leaf_log_header(struct xfs_trans *tp, + struct xfs_dabuf *bp); +extern int xfs_dir2_leaf_lookup(struct xfs_da_args *args); +extern int xfs_dir2_leaf_removename(struct xfs_da_args *args); +extern int xfs_dir2_leaf_replace(struct xfs_da_args *args); +extern int xfs_dir2_leaf_search_hash(struct xfs_da_args *args, + struct xfs_dabuf *lbp); +extern int xfs_dir2_leaf_trim_data(struct xfs_da_args *args, + struct xfs_dabuf *lbp, xfs_dir2_db_t db); +extern int xfs_dir2_node_to_leaf(struct xfs_da_state *state); #endif /* __XFS_DIR2_LEAF_H__ */ diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c index a7615d86bfb..2517460430d 100644 --- a/fs/xfs/xfs_dir2_node.c +++ b/fs/xfs/xfs_dir2_node.c @@ -29,33 +29,25 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * xfs_dir2_node.c - * XFS directory implementation, version 2, node form files - * See data structures in xfs_dir2_node.h and xfs_da_btree.h. - */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_bmap.h" -#include "xfs_da_btree.h" #include "xfs_dir2_data.h" #include "xfs_dir2_leaf.h" #include "xfs_dir2_block.h" diff --git a/fs/xfs/xfs_dir2_node.h b/fs/xfs/xfs_dir2_node.h index 96db420c7c5..70fa0797c20 100644 --- a/fs/xfs/xfs_dir2_node.h +++ b/fs/xfs/xfs_dir2_node.h @@ -44,10 +44,6 @@ struct xfs_da_state_blk; struct xfs_inode; struct xfs_trans; -/* - * Constants. - */ - /* * Offset of the freespace index. */ @@ -58,9 +54,6 @@ struct xfs_trans; #define XFS_DIR2_FREE_MAGIC 0x58443246 /* XD2F */ -/* - * Structures. - */ typedef struct xfs_dir2_free_hdr { __uint32_t magic; /* XFS_DIR2_FREE_MAGIC */ __int32_t firstdb; /* db of first entry */ @@ -73,87 +66,53 @@ typedef struct xfs_dir2_free { xfs_dir2_data_off_t bests[1]; /* best free counts */ /* unused entries are -1 */ } xfs_dir2_free_t; + #define XFS_DIR2_MAX_FREE_BESTS(mp) \ (((mp)->m_dirblksize - (uint)sizeof(xfs_dir2_free_hdr_t)) / \ (uint)sizeof(xfs_dir2_data_off_t)) -/* - * Macros. - */ - /* * Convert data space db to the corresponding free db. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DB_TO_FDB) -xfs_dir2_db_t -xfs_dir2_db_to_fdb(struct xfs_mount *mp, xfs_dir2_db_t db); #define XFS_DIR2_DB_TO_FDB(mp,db) xfs_dir2_db_to_fdb(mp, db) -#else -#define XFS_DIR2_DB_TO_FDB(mp,db) \ - (XFS_DIR2_FREE_FIRSTDB(mp) + (db) / XFS_DIR2_MAX_FREE_BESTS(mp)) -#endif +static inline xfs_dir2_db_t +xfs_dir2_db_to_fdb(struct xfs_mount *mp, xfs_dir2_db_t db) +{ + return (XFS_DIR2_FREE_FIRSTDB(mp) + (db) / XFS_DIR2_MAX_FREE_BESTS(mp)); +} /* * Convert data space db to the corresponding index in a free db. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_DB_TO_FDINDEX) -int -xfs_dir2_db_to_fdindex(struct xfs_mount *mp, xfs_dir2_db_t db); #define XFS_DIR2_DB_TO_FDINDEX(mp,db) xfs_dir2_db_to_fdindex(mp, db) -#else -#define XFS_DIR2_DB_TO_FDINDEX(mp,db) ((db) % XFS_DIR2_MAX_FREE_BESTS(mp)) -#endif - -/* - * Functions. - */ - -extern void - xfs_dir2_free_log_bests(struct xfs_trans *tp, struct xfs_dabuf *bp, - int first, int last); - -extern int - xfs_dir2_leaf_to_node(struct xfs_da_args *args, struct xfs_dabuf *lbp); - -extern xfs_dahash_t - xfs_dir2_leafn_lasthash(struct xfs_dabuf *bp, int *count); - -extern int - xfs_dir2_leafn_lookup_int(struct xfs_dabuf *bp, - struct xfs_da_args *args, int *indexp, - struct xfs_da_state *state); - -extern int - xfs_dir2_leafn_order(struct xfs_dabuf *leaf1_bp, - struct xfs_dabuf *leaf2_bp); - -extern int - xfs_dir2_leafn_split(struct xfs_da_state *state, - struct xfs_da_state_blk *oldblk, - struct xfs_da_state_blk *newblk); - -extern int - xfs_dir2_leafn_toosmall(struct xfs_da_state *state, int *action); - -extern void - xfs_dir2_leafn_unbalance(struct xfs_da_state *state, - struct xfs_da_state_blk *drop_blk, - struct xfs_da_state_blk *save_blk); - -extern int - xfs_dir2_node_addname(struct xfs_da_args *args); - -extern int - xfs_dir2_node_lookup(struct xfs_da_args *args); - -extern int - xfs_dir2_node_removename(struct xfs_da_args *args); - -extern int - xfs_dir2_node_replace(struct xfs_da_args *args); - -extern int - xfs_dir2_node_trim_free(struct xfs_da_args *args, xfs_fileoff_t fo, - int *rvalp); +static inline int +xfs_dir2_db_to_fdindex(struct xfs_mount *mp, xfs_dir2_db_t db) +{ + return ((db) % XFS_DIR2_MAX_FREE_BESTS(mp)); +} + +extern void xfs_dir2_free_log_bests(struct xfs_trans *tp, struct xfs_dabuf *bp, + int first, int last); +extern int xfs_dir2_leaf_to_node(struct xfs_da_args *args, + struct xfs_dabuf *lbp); +extern xfs_dahash_t xfs_dir2_leafn_lasthash(struct xfs_dabuf *bp, int *count); +extern int xfs_dir2_leafn_lookup_int(struct xfs_dabuf *bp, + struct xfs_da_args *args, int *indexp, + struct xfs_da_state *state); +extern int xfs_dir2_leafn_order(struct xfs_dabuf *leaf1_bp, + struct xfs_dabuf *leaf2_bp); +extern int xfs_dir2_leafn_split(struct xfs_da_state *state, + struct xfs_da_state_blk *oldblk, + struct xfs_da_state_blk *newblk); +extern int xfs_dir2_leafn_toosmall(struct xfs_da_state *state, int *action); +extern void xfs_dir2_leafn_unbalance(struct xfs_da_state *state, + struct xfs_da_state_blk *drop_blk, + struct xfs_da_state_blk *save_blk); +extern int xfs_dir2_node_addname(struct xfs_da_args *args); +extern int xfs_dir2_node_lookup(struct xfs_da_args *args); +extern int xfs_dir2_node_removename(struct xfs_da_args *args); +extern int xfs_dir2_node_replace(struct xfs_da_args *args); +extern int xfs_dir2_node_trim_free(struct xfs_da_args *args, xfs_fileoff_t fo, + int *rvalp); #endif /* __XFS_DIR2_NODE_H__ */ diff --git a/fs/xfs/xfs_dir2_sf.c b/fs/xfs/xfs_dir2_sf.c index 6bbc6167441..95e703d5bc0 100644 --- a/fs/xfs/xfs_dir2_sf.c +++ b/fs/xfs/xfs_dir2_sf.c @@ -29,32 +29,25 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * xfs_dir2_sf.c - * Shortform directory implementation for v2 directories. - */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" -#include "xfs_da_btree.h" +#include "xfs_inode_item.h" #include "xfs_dir_leaf.h" #include "xfs_error.h" #include "xfs_dir2_data.h" diff --git a/fs/xfs/xfs_dir2_sf.h b/fs/xfs/xfs_dir2_sf.h index bac6f5a2a31..133464935ef 100644 --- a/fs/xfs/xfs_dir2_sf.h +++ b/fs/xfs/xfs_dir2_sf.h @@ -104,140 +104,106 @@ typedef struct xfs_dir2_sf { xfs_dir2_sf_entry_t list[1]; /* shortform entries */ } xfs_dir2_sf_t; -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_HDR_SIZE) -int xfs_dir2_sf_hdr_size(int i8count); #define XFS_DIR2_SF_HDR_SIZE(i8count) xfs_dir2_sf_hdr_size(i8count) -#else -#define XFS_DIR2_SF_HDR_SIZE(i8count) \ - ((uint)sizeof(xfs_dir2_sf_hdr_t) - \ - ((i8count) == 0) * \ - ((uint)sizeof(xfs_dir2_ino8_t) - (uint)sizeof(xfs_dir2_ino4_t))) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_INUMBERP) -xfs_dir2_inou_t *xfs_dir2_sf_inumberp(xfs_dir2_sf_entry_t *sfep); +static inline int xfs_dir2_sf_hdr_size(int i8count) +{ + return ((uint)sizeof(xfs_dir2_sf_hdr_t) - \ + ((i8count) == 0) * \ + ((uint)sizeof(xfs_dir2_ino8_t) - (uint)sizeof(xfs_dir2_ino4_t))); +} + #define XFS_DIR2_SF_INUMBERP(sfep) xfs_dir2_sf_inumberp(sfep) -#else -#define XFS_DIR2_SF_INUMBERP(sfep) \ - ((xfs_dir2_inou_t *)&(sfep)->name[(sfep)->namelen]) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_GET_INUMBER) -xfs_intino_t xfs_dir2_sf_get_inumber(xfs_dir2_sf_t *sfp, xfs_dir2_inou_t *from); -#define XFS_DIR2_SF_GET_INUMBER(sfp, from) \ - xfs_dir2_sf_get_inumber(sfp, from) +static inline xfs_dir2_inou_t *xfs_dir2_sf_inumberp(xfs_dir2_sf_entry_t *sfep) +{ + return (xfs_dir2_inou_t *)&(sfep)->name[(sfep)->namelen]; +} -#else -#define XFS_DIR2_SF_GET_INUMBER(sfp, from) \ - ((sfp)->hdr.i8count == 0 ? \ +#define XFS_DIR2_SF_GET_INUMBER(sfp, from) \ + xfs_dir2_sf_get_inumber(sfp, from) +static inline xfs_intino_t +xfs_dir2_sf_get_inumber(xfs_dir2_sf_t *sfp, xfs_dir2_inou_t *from) +{ + return ((sfp)->hdr.i8count == 0 ? \ (xfs_intino_t)XFS_GET_DIR_INO4((from)->i4) : \ - (xfs_intino_t)XFS_GET_DIR_INO8((from)->i8)) -#endif + (xfs_intino_t)XFS_GET_DIR_INO8((from)->i8)); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_PUT_INUMBER) -void xfs_dir2_sf_put_inumber(xfs_dir2_sf_t *sfp, xfs_ino_t *from, - xfs_dir2_inou_t *to); -#define XFS_DIR2_SF_PUT_INUMBER(sfp,from,to) \ +#define XFS_DIR2_SF_PUT_INUMBER(sfp,from,to) \ xfs_dir2_sf_put_inumber(sfp,from,to) -#else -#define XFS_DIR2_SF_PUT_INUMBER(sfp,from,to) \ - if ((sfp)->hdr.i8count == 0) { \ - XFS_PUT_DIR_INO4(*(from), (to)->i4); \ - } else { \ - XFS_PUT_DIR_INO8(*(from), (to)->i8); \ - } -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_GET_OFFSET) -xfs_dir2_data_aoff_t xfs_dir2_sf_get_offset(xfs_dir2_sf_entry_t *sfep); +static inline void xfs_dir2_sf_put_inumber(xfs_dir2_sf_t *sfp, xfs_ino_t *from, + xfs_dir2_inou_t *to) +{ + if ((sfp)->hdr.i8count == 0) + XFS_PUT_DIR_INO4(*(from), (to)->i4); + else + XFS_PUT_DIR_INO8(*(from), (to)->i8); +} + #define XFS_DIR2_SF_GET_OFFSET(sfep) \ xfs_dir2_sf_get_offset(sfep) -#else -#define XFS_DIR2_SF_GET_OFFSET(sfep) \ - INT_GET_UNALIGNED_16_BE(&(sfep)->offset.i) -#endif +static inline xfs_dir2_data_aoff_t +xfs_dir2_sf_get_offset(xfs_dir2_sf_entry_t *sfep) +{ + return INT_GET_UNALIGNED_16_BE(&(sfep)->offset.i); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_PUT_OFFSET) -void xfs_dir2_sf_put_offset(xfs_dir2_sf_entry_t *sfep, - xfs_dir2_data_aoff_t off); #define XFS_DIR2_SF_PUT_OFFSET(sfep,off) \ xfs_dir2_sf_put_offset(sfep,off) -#else -#define XFS_DIR2_SF_PUT_OFFSET(sfep,off) \ - INT_SET_UNALIGNED_16_BE(&(sfep)->offset.i,off) -#endif +static inline void +xfs_dir2_sf_put_offset(xfs_dir2_sf_entry_t *sfep, xfs_dir2_data_aoff_t off) +{ + INT_SET_UNALIGNED_16_BE(&(sfep)->offset.i, off); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_ENTSIZE_BYNAME) -int xfs_dir2_sf_entsize_byname(xfs_dir2_sf_t *sfp, int len); #define XFS_DIR2_SF_ENTSIZE_BYNAME(sfp,len) \ xfs_dir2_sf_entsize_byname(sfp,len) -#else -#define XFS_DIR2_SF_ENTSIZE_BYNAME(sfp,len) /* space a name uses */ \ - ((uint)sizeof(xfs_dir2_sf_entry_t) - 1 + (len) - \ - ((sfp)->hdr.i8count == 0) * \ - ((uint)sizeof(xfs_dir2_ino8_t) - (uint)sizeof(xfs_dir2_ino4_t))) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_ENTSIZE_BYENTRY) -int xfs_dir2_sf_entsize_byentry(xfs_dir2_sf_t *sfp, xfs_dir2_sf_entry_t *sfep); +static inline int xfs_dir2_sf_entsize_byname(xfs_dir2_sf_t *sfp, int len) +{ + return ((uint)sizeof(xfs_dir2_sf_entry_t) - 1 + (len) - \ + ((sfp)->hdr.i8count == 0) * \ + ((uint)sizeof(xfs_dir2_ino8_t) - (uint)sizeof(xfs_dir2_ino4_t))); +} + #define XFS_DIR2_SF_ENTSIZE_BYENTRY(sfp,sfep) \ xfs_dir2_sf_entsize_byentry(sfp,sfep) -#else -#define XFS_DIR2_SF_ENTSIZE_BYENTRY(sfp,sfep) /* space an entry uses */ \ - ((uint)sizeof(xfs_dir2_sf_entry_t) - 1 + (sfep)->namelen - \ - ((sfp)->hdr.i8count == 0) * \ - ((uint)sizeof(xfs_dir2_ino8_t) - (uint)sizeof(xfs_dir2_ino4_t))) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_FIRSTENTRY) -xfs_dir2_sf_entry_t *xfs_dir2_sf_firstentry(xfs_dir2_sf_t *sfp); +static inline int +xfs_dir2_sf_entsize_byentry(xfs_dir2_sf_t *sfp, xfs_dir2_sf_entry_t *sfep) +{ + return ((uint)sizeof(xfs_dir2_sf_entry_t) - 1 + (sfep)->namelen - \ + ((sfp)->hdr.i8count == 0) * \ + ((uint)sizeof(xfs_dir2_ino8_t) - (uint)sizeof(xfs_dir2_ino4_t))); +} + #define XFS_DIR2_SF_FIRSTENTRY(sfp) xfs_dir2_sf_firstentry(sfp) -#else -#define XFS_DIR2_SF_FIRSTENTRY(sfp) /* first entry in struct */ \ - ((xfs_dir2_sf_entry_t *) \ - ((char *)(sfp) + XFS_DIR2_SF_HDR_SIZE(sfp->hdr.i8count))) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR2_SF_NEXTENTRY) -xfs_dir2_sf_entry_t *xfs_dir2_sf_nextentry(xfs_dir2_sf_t *sfp, - xfs_dir2_sf_entry_t *sfep); -#define XFS_DIR2_SF_NEXTENTRY(sfp,sfep) xfs_dir2_sf_nextentry(sfp,sfep) -#else -#define XFS_DIR2_SF_NEXTENTRY(sfp,sfep) /* next entry in struct */ \ - ((xfs_dir2_sf_entry_t *) \ - ((char *)(sfep) + XFS_DIR2_SF_ENTSIZE_BYENTRY(sfp,sfep))) -#endif +static inline xfs_dir2_sf_entry_t *xfs_dir2_sf_firstentry(xfs_dir2_sf_t *sfp) +{ + return ((xfs_dir2_sf_entry_t *) \ + ((char *)(sfp) + XFS_DIR2_SF_HDR_SIZE(sfp->hdr.i8count))); +} + +#define XFS_DIR2_SF_NEXTENTRY(sfp,sfep) xfs_dir2_sf_nextentry(sfp,sfep) +static inline xfs_dir2_sf_entry_t * +xfs_dir2_sf_nextentry(xfs_dir2_sf_t *sfp, xfs_dir2_sf_entry_t *sfep) +{ + return ((xfs_dir2_sf_entry_t *) \ + ((char *)(sfep) + XFS_DIR2_SF_ENTSIZE_BYENTRY(sfp,sfep))); +} /* * Functions. */ - -extern int - xfs_dir2_block_sfsize(struct xfs_inode *dp, - struct xfs_dir2_block *block, - xfs_dir2_sf_hdr_t *sfhp); - -extern int - xfs_dir2_block_to_sf(struct xfs_da_args *args, struct xfs_dabuf *bp, - int size, xfs_dir2_sf_hdr_t *sfhp); - -extern int - xfs_dir2_sf_addname(struct xfs_da_args *args); - -extern int - xfs_dir2_sf_create(struct xfs_da_args *args, xfs_ino_t pino); - -extern int - xfs_dir2_sf_getdents(struct xfs_inode *dp, struct uio *uio, int *eofp, - struct xfs_dirent *dbp, xfs_dir2_put_t put); - -extern int - xfs_dir2_sf_lookup(struct xfs_da_args *args); - -extern int - xfs_dir2_sf_removename(struct xfs_da_args *args); - -extern int - xfs_dir2_sf_replace(struct xfs_da_args *args); +extern int xfs_dir2_block_sfsize(struct xfs_inode *dp, + struct xfs_dir2_block *block, + xfs_dir2_sf_hdr_t *sfhp); +extern int xfs_dir2_block_to_sf(struct xfs_da_args *args, struct xfs_dabuf *bp, + int size, xfs_dir2_sf_hdr_t *sfhp); +extern int xfs_dir2_sf_addname(struct xfs_da_args *args); +extern int xfs_dir2_sf_create(struct xfs_da_args *args, xfs_ino_t pino); +extern int xfs_dir2_sf_getdents(struct xfs_inode *dp, struct uio *uio, + int *eofp, struct xfs_dirent *dbp, + xfs_dir2_put_t put); +extern int xfs_dir2_sf_lookup(struct xfs_da_args *args); +extern int xfs_dir2_sf_removename(struct xfs_da_args *args); +extern int xfs_dir2_sf_replace(struct xfs_da_args *args); #endif /* __XFS_DIR2_SF_H__ */ diff --git a/fs/xfs/xfs_dir2_trace.c b/fs/xfs/xfs_dir2_trace.c index 9d641739314..34e5138c670 100644 --- a/fs/xfs/xfs_dir2_trace.c +++ b/fs/xfs/xfs_dir2_trace.c @@ -29,24 +29,19 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * xfs_dir2_trace.c - * Tracing for xfs v2 directories. - */ #include "xfs.h" - +#include "xfs_fs.h" #include "xfs_types.h" #include "xfs_inum.h" #include "xfs_dir.h" #include "xfs_dir2.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" -#include "xfs_da_btree.h" #include "xfs_dir2_trace.h" #ifdef XFS_DIR2_TRACE diff --git a/fs/xfs/xfs_dir_leaf.c b/fs/xfs/xfs_dir_leaf.c index ca9bc2d9ba0..22997d314cf 100644 --- a/fs/xfs/xfs_dir_leaf.c +++ b/fs/xfs/xfs_dir_leaf.c @@ -29,38 +29,30 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * xfs_dir_leaf.c - * - * GROT: figure out how to recover gracefully when bmap returns ENOSPC. - */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_alloc.h" -#include "xfs_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_inode_item.h" +#include "xfs_alloc.h" +#include "xfs_btree.h" #include "xfs_bmap.h" -#include "xfs_da_btree.h" #include "xfs_dir_leaf.h" #include "xfs_error.h" diff --git a/fs/xfs/xfs_dir_leaf.h b/fs/xfs/xfs_dir_leaf.h index 480bffc1f29..216d62693b7 100644 --- a/fs/xfs/xfs_dir_leaf.h +++ b/fs/xfs/xfs_dir_leaf.h @@ -152,30 +152,26 @@ typedef struct xfs_dir_put_args struct uio *uio; /* uio control structure */ } xfs_dir_put_args_t; -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_LEAF_ENTSIZE_BYNAME) -int xfs_dir_leaf_entsize_byname(int len); #define XFS_DIR_LEAF_ENTSIZE_BYNAME(len) xfs_dir_leaf_entsize_byname(len) -#else -#define XFS_DIR_LEAF_ENTSIZE_BYNAME(len) /* space a name will use */ \ - ((uint)sizeof(xfs_dir_leaf_name_t)-1 + len) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_LEAF_ENTSIZE_BYENTRY) -int xfs_dir_leaf_entsize_byentry(xfs_dir_leaf_entry_t *entry); +static inline int xfs_dir_leaf_entsize_byname(int len) +{ + return (uint)sizeof(xfs_dir_leaf_name_t)-1 + len; +} + #define XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry) \ xfs_dir_leaf_entsize_byentry(entry) -#else -#define XFS_DIR_LEAF_ENTSIZE_BYENTRY(entry) /* space an entry will use */ \ - ((uint)sizeof(xfs_dir_leaf_name_t)-1 + (entry)->namelen) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_LEAF_NAMESTRUCT) -xfs_dir_leaf_name_t * -xfs_dir_leaf_namestruct(xfs_dir_leafblock_t *leafp, int offset); +static inline int xfs_dir_leaf_entsize_byentry(xfs_dir_leaf_entry_t *entry) +{ + return (uint)sizeof(xfs_dir_leaf_name_t)-1 + (entry)->namelen; +} + #define XFS_DIR_LEAF_NAMESTRUCT(leafp,offset) \ xfs_dir_leaf_namestruct(leafp,offset) -#else -#define XFS_DIR_LEAF_NAMESTRUCT(leafp,offset) /* point to name struct */ \ - ((xfs_dir_leaf_name_t *)&((char *)(leafp))[offset]) -#endif +static inline xfs_dir_leaf_name_t * +xfs_dir_leaf_namestruct(xfs_dir_leafblock_t *leafp, int offset) +{ + return (xfs_dir_leaf_name_t *)&((char *)(leafp))[offset]; +} /*======================================================================== * Function prototypes for the kernel. @@ -190,7 +186,7 @@ int xfs_dir_shortform_lookup(struct xfs_da_args *args); int xfs_dir_shortform_to_leaf(struct xfs_da_args *args); int xfs_dir_shortform_removename(struct xfs_da_args *args); int xfs_dir_shortform_getdents(struct xfs_inode *dp, struct uio *uio, int *eofp, - struct xfs_dirent *dbp, xfs_dir_put_t put); + struct xfs_dirent *dbp, xfs_dir_put_t put); int xfs_dir_shortform_replace(struct xfs_da_args *args); /* @@ -237,7 +233,6 @@ int xfs_dir_put_dirent64_direct(xfs_dir_put_args_t *pa); int xfs_dir_put_dirent64_uio(xfs_dir_put_args_t *pa); int xfs_dir_ino_validate(struct xfs_mount *mp, xfs_ino_t ino); - /* * Global data. */ diff --git a/fs/xfs/xfs_dir_sf.h b/fs/xfs/xfs_dir_sf.h index a61bcfc2a87..2b75b767e15 100644 --- a/fs/xfs/xfs_dir_sf.h +++ b/fs/xfs/xfs_dir_sf.h @@ -76,49 +76,44 @@ typedef struct xfs_dir_sf_sort { char *name; /* name value, pointer into buffer */ } xfs_dir_sf_sort_t; -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_SF_GET_DIRINO) -void xfs_dir_sf_get_dirino(xfs_dir_ino_t *from, xfs_ino_t *to); -#define XFS_DIR_SF_GET_DIRINO(from,to) xfs_dir_sf_get_dirino(from, to) -#else -#define XFS_DIR_SF_GET_DIRINO(from,to) (*(to) = XFS_GET_DIR_INO8(*from)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_SF_PUT_DIRINO) -void xfs_dir_sf_put_dirino(xfs_ino_t *from, xfs_dir_ino_t *to); -#define XFS_DIR_SF_PUT_DIRINO(from,to) xfs_dir_sf_put_dirino(from, to) -#else -#define XFS_DIR_SF_PUT_DIRINO(from,to) XFS_PUT_DIR_INO8(*(from), *(to)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_SF_ENTSIZE_BYNAME) -int xfs_dir_sf_entsize_byname(int len); -#define XFS_DIR_SF_ENTSIZE_BYNAME(len) xfs_dir_sf_entsize_byname(len) -#else -#define XFS_DIR_SF_ENTSIZE_BYNAME(len) /* space a name uses */ \ - ((uint)sizeof(xfs_dir_sf_entry_t)-1 + (len)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_SF_ENTSIZE_BYENTRY) -int xfs_dir_sf_entsize_byentry(xfs_dir_sf_entry_t *sfep); +#define XFS_DIR_SF_GET_DIRINO(from,to) xfs_dir_sf_get_dirino(from, to) +static inline void xfs_dir_sf_get_dirino(xfs_dir_ino_t *from, xfs_ino_t *to) +{ + *(to) = XFS_GET_DIR_INO8(*from); +} + +#define XFS_DIR_SF_PUT_DIRINO(from,to) xfs_dir_sf_put_dirino(from, to) +static inline void xfs_dir_sf_put_dirino(xfs_ino_t *from, xfs_dir_ino_t *to) +{ + XFS_PUT_DIR_INO8(*(from), *(to)); +} + +#define XFS_DIR_SF_ENTSIZE_BYNAME(len) xfs_dir_sf_entsize_byname(len) +static inline int xfs_dir_sf_entsize_byname(int len) +{ + return (uint)sizeof(xfs_dir_sf_entry_t)-1 + (len); +} + #define XFS_DIR_SF_ENTSIZE_BYENTRY(sfep) xfs_dir_sf_entsize_byentry(sfep) -#else -#define XFS_DIR_SF_ENTSIZE_BYENTRY(sfep) /* space an entry uses */ \ - ((uint)sizeof(xfs_dir_sf_entry_t)-1 + (sfep)->namelen) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_SF_NEXTENTRY) -xfs_dir_sf_entry_t *xfs_dir_sf_nextentry(xfs_dir_sf_entry_t *sfep); +static inline int xfs_dir_sf_entsize_byentry(xfs_dir_sf_entry_t *sfep) +{ + return (uint)sizeof(xfs_dir_sf_entry_t)-1 + (sfep)->namelen; +} + #define XFS_DIR_SF_NEXTENTRY(sfep) xfs_dir_sf_nextentry(sfep) -#else -#define XFS_DIR_SF_NEXTENTRY(sfep) /* next entry in struct */ \ - ((xfs_dir_sf_entry_t *) \ - ((char *)(sfep) + XFS_DIR_SF_ENTSIZE_BYENTRY(sfep))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DIR_SF_ALLFIT) -int xfs_dir_sf_allfit(int count, int totallen); +static inline xfs_dir_sf_entry_t *xfs_dir_sf_nextentry(xfs_dir_sf_entry_t *sfep) +{ + return (xfs_dir_sf_entry_t *) \ + ((char *)(sfep) + XFS_DIR_SF_ENTSIZE_BYENTRY(sfep)); +} + #define XFS_DIR_SF_ALLFIT(count,totallen) \ xfs_dir_sf_allfit(count,totallen) -#else -#define XFS_DIR_SF_ALLFIT(count,totallen) /* will all entries fit? */ \ - ((uint)sizeof(xfs_dir_sf_hdr_t) + \ - ((uint)sizeof(xfs_dir_sf_entry_t)-1)*(count) + (totallen)) -#endif +static inline int xfs_dir_sf_allfit(int count, int totallen) +{ + return ((uint)sizeof(xfs_dir_sf_hdr_t) + \ + ((uint)sizeof(xfs_dir_sf_entry_t)-1)*(count) + (totallen)); +} #if defined(XFS_DIR_TRACE) diff --git a/fs/xfs/xfs_dmops.c b/fs/xfs/xfs_dmops.c index cec54ba800e..1b99c4dfbab 100644 --- a/fs/xfs/xfs_dmops.c +++ b/fs/xfs/xfs_dmops.c @@ -30,11 +30,10 @@ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c index dcd3fdd5c1f..5da2738b453 100644 --- a/fs/xfs/xfs_error.c +++ b/fs/xfs/xfs_error.c @@ -29,23 +29,21 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" -#include "xfs_sb.h" +#include "xfs_inum.h" #include "xfs_trans.h" +#include "xfs_sb.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_utils.h" diff --git a/fs/xfs/xfs_error.h b/fs/xfs/xfs_error.h index 52ee2b90b5e..66eef1beb0e 100644 --- a/fs/xfs/xfs_error.h +++ b/fs/xfs/xfs_error.h @@ -54,24 +54,10 @@ extern int xfs_error_trap(int); struct xfs_mount; -extern void -xfs_error_report( - char *tag, - int level, - struct xfs_mount *mp, - char *fname, - int linenum, - inst_t *ra); - -extern void -xfs_corruption_error( - char *tag, - int level, - struct xfs_mount *mp, - void *p, - char *fname, - int linenum, - inst_t *ra); +extern void xfs_error_report(char *tag, int level, struct xfs_mount *mp, + char *fname, int linenum, inst_t *ra); +extern void xfs_corruption_error(char *tag, int level, struct xfs_mount *mp, + void *p, char *fname, int linenum, inst_t *ra); #define XFS_ERROR_REPORT(e, lvl, mp) \ xfs_error_report(e, lvl, mp, __FILE__, __LINE__, __return_address) @@ -83,6 +69,32 @@ xfs_corruption_error( #define XFS_ERRLEVEL_LOW 1 #define XFS_ERRLEVEL_HIGH 5 +/* + * Macros to set EFSCORRUPTED & return/branch. + */ +#define XFS_WANT_CORRUPTED_GOTO(x,l) \ + { \ + int fs_is_ok = (x); \ + ASSERT(fs_is_ok); \ + if (unlikely(!fs_is_ok)) { \ + XFS_ERROR_REPORT("XFS_WANT_CORRUPTED_GOTO", \ + XFS_ERRLEVEL_LOW, NULL); \ + error = XFS_ERROR(EFSCORRUPTED); \ + goto l; \ + } \ + } + +#define XFS_WANT_CORRUPTED_RETURN(x) \ + { \ + int fs_is_ok = (x); \ + ASSERT(fs_is_ok); \ + if (unlikely(!fs_is_ok)) { \ + XFS_ERROR_REPORT("XFS_WANT_CORRUPTED_RETURN", \ + XFS_ERRLEVEL_LOW, NULL); \ + return XFS_ERROR(EFSCORRUPTED); \ + } \ + } + /* * error injection tags - the labels can be anything you want * but each tag should have its own unique number @@ -139,8 +151,8 @@ xfs_corruption_error( #define XFS_RANDOM_BMAPIFORMAT XFS_RANDOM_DEFAULT #if (defined(DEBUG) || defined(INDUCE_IO_ERROR)) -extern int xfs_error_test(int, int *, char *, int, char *, unsigned long); -void xfs_error_test_init(void); +extern int xfs_error_test(int, int *, char *, int, char *, unsigned long); +extern void xfs_error_test_init(void); #define XFS_NUM_INJECT_ERROR 10 @@ -156,12 +168,10 @@ void xfs_error_test_init(void); (rf))) #endif /* __ANSI_CPP__ */ -int xfs_errortag_add(int error_tag, xfs_mount_t *mp); -int xfs_errortag_clear(int error_tag, xfs_mount_t *mp); - -int xfs_errortag_clearall(xfs_mount_t *mp); -int xfs_errortag_clearall_umount(int64_t fsid, char *fsname, - int loud); +extern int xfs_errortag_add(int error_tag, xfs_mount_t *mp); +extern int xfs_errortag_clear(int error_tag, xfs_mount_t *mp); +extern int xfs_errortag_clearall(xfs_mount_t *mp); +extern int xfs_errortag_clearall_umount(int64_t fsid, char *fsname, int loud); #else #define XFS_TEST_ERROR(expr, mp, tag, rf) (expr) #define xfs_errortag_add(tag, mp) (ENOSYS) @@ -185,9 +195,9 @@ int xfs_errortag_clearall_umount(int64_t fsid, char *fsname, struct xfs_mount; /* PRINTFLIKE4 */ -void xfs_cmn_err(int panic_tag, int level, struct xfs_mount *mp, +extern void xfs_cmn_err(int panic_tag, int level, struct xfs_mount *mp, char *fmt, ...); /* PRINTFLIKE3 */ -void xfs_fs_cmn_err(int level, struct xfs_mount *mp, char *fmt, ...); +extern void xfs_fs_cmn_err(int level, struct xfs_mount *mp, char *fmt, ...); #endif /* __XFS_ERROR_H__ */ diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c index cc7d1494a45..f48cc9a7cd5 100644 --- a/fs/xfs/xfs_extfree_item.c +++ b/fs/xfs/xfs_extfree_item.c @@ -29,18 +29,11 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * This file contains the implementation of the xfs_efi_log_item - * and xfs_efd_log_item items. - */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_sb.h" diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 67522f2bcee..411081c0fd7 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c @@ -29,38 +29,37 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" +#include "xfs_bit.h" #include "xfs_inum.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" +#include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_ag.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" +#include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" +#include "xfs_dinode.h" +#include "xfs_inode.h" +#include "xfs_inode_item.h" #include "xfs_btree.h" #include "xfs_error.h" #include "xfs_alloc.h" #include "xfs_ialloc.h" #include "xfs_fsops.h" #include "xfs_itable.h" -#include "xfs_rw.h" -#include "xfs_refcache.h" #include "xfs_trans_space.h" #include "xfs_rtalloc.h" -#include "xfs_dir2.h" -#include "xfs_attr_sf.h" -#include "xfs_dir_sf.h" -#include "xfs_dir2_sf.h" -#include "xfs_dinode.h" -#include "xfs_inode.h" -#include "xfs_inode_item.h" +#include "xfs_rw.h" /* * File system operations diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 02989691e4a..4fc0e73fd18 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c @@ -29,13 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -43,18 +42,17 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" #include "xfs_alloc.h" -#include "xfs_bit.h" #include "xfs_rtalloc.h" #include "xfs_error.h" #include "xfs_bmap.h" diff --git a/fs/xfs/xfs_ialloc.h b/fs/xfs/xfs_ialloc.h index db6d0015cec..fab660dd6d1 100644 --- a/fs/xfs/xfs_ialloc.h +++ b/fs/xfs/xfs_ialloc.h @@ -40,18 +40,8 @@ struct xfs_trans; /* * Allocation parameters for inode allocation. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IALLOC_INODES) -int xfs_ialloc_inodes(struct xfs_mount *mp); -#define XFS_IALLOC_INODES(mp) xfs_ialloc_inodes(mp) -#else -#define XFS_IALLOC_INODES(mp) ((mp)->m_ialloc_inos) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IALLOC_BLOCKS) -xfs_extlen_t xfs_ialloc_blocks(struct xfs_mount *mp); -#define XFS_IALLOC_BLOCKS(mp) xfs_ialloc_blocks(mp) -#else -#define XFS_IALLOC_BLOCKS(mp) ((mp)->m_ialloc_blks) -#endif +#define XFS_IALLOC_INODES(mp) (mp)->m_ialloc_inos +#define XFS_IALLOC_BLOCKS(mp) (mp)->m_ialloc_blks /* * For small block file systems, move inodes in clusters of this size. @@ -67,31 +57,25 @@ xfs_extlen_t xfs_ialloc_blocks(struct xfs_mount *mp); /* * Make an inode pointer out of the buffer/offset. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MAKE_IPTR) -struct xfs_dinode *xfs_make_iptr(struct xfs_mount *mp, struct xfs_buf *b, int o); #define XFS_MAKE_IPTR(mp,b,o) xfs_make_iptr(mp,b,o) -#else -#define XFS_MAKE_IPTR(mp,b,o) \ - ((xfs_dinode_t *)(xfs_buf_offset(b, (o) << (mp)->m_sb.sb_inodelog))) -#endif +static inline struct xfs_dinode * +xfs_make_iptr(struct xfs_mount *mp, struct xfs_buf *b, int o) +{ + return (xfs_dinode_t *) + (xfs_buf_offset(b, o << (mp)->m_sb.sb_inodelog)); +} /* * Find a free (set) bit in the inode bitmask. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IALLOC_FIND_FREE) -int xfs_ialloc_find_free(xfs_inofree_t *fp); #define XFS_IALLOC_FIND_FREE(fp) xfs_ialloc_find_free(fp) -#else -#define XFS_IALLOC_FIND_FREE(fp) xfs_lowbit64(*(fp)) -#endif +static inline int xfs_ialloc_find_free(xfs_inofree_t *fp) +{ + return xfs_lowbit64(*fp); +} #ifdef __KERNEL__ - -/* - * Prototypes for visible xfs_ialloc.c routines. - */ - /* * Allocate an inode on disk. * Mode is used to tell whether the new inode will need space, and whether diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c index 2d4daecec99..a49958d21e8 100644 --- a/fs/xfs/xfs_ialloc_btree.c +++ b/fs/xfs/xfs_ialloc_btree.c @@ -29,22 +29,27 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir.h" +#include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" +#include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" +#include "xfs_dinode.h" +#include "xfs_inode.h" #include "xfs_btree.h" #include "xfs_ialloc.h" #include "xfs_alloc.h" diff --git a/fs/xfs/xfs_ialloc_btree.h b/fs/xfs/xfs_ialloc_btree.h index 44be188674a..b8c7e72ed83 100644 --- a/fs/xfs/xfs_ialloc_btree.h +++ b/fs/xfs/xfs_ialloc_btree.h @@ -51,14 +51,12 @@ typedef __uint64_t xfs_inofree_t; #define XFS_INODES_PER_CHUNK_LOG (XFS_NBBYLOG + 3) #define XFS_INOBT_ALL_FREE ((xfs_inofree_t)-1) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_MASKN) -xfs_inofree_t xfs_inobt_maskn(int i, int n); #define XFS_INOBT_MASKN(i,n) xfs_inobt_maskn(i,n) -#else -#define XFS_INOBT_MASKN(i,n) \ - ((((n) >= XFS_INODES_PER_CHUNK ? \ - (xfs_inofree_t)0 : ((xfs_inofree_t)1 << (n))) - 1) << (i)) -#endif +static inline xfs_inofree_t xfs_inobt_maskn(int i, int n) +{ + return (((n) >= XFS_INODES_PER_CHUNK ? \ + (xfs_inofree_t)0 : ((xfs_inofree_t)1 << (n))) - 1) << (i); +} /* * Data record structure @@ -82,237 +80,110 @@ typedef xfs_agblock_t xfs_inobt_ptr_t; /* btree pointer type */ /* btree block header type */ typedef struct xfs_btree_sblock xfs_inobt_block_t; -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_INOBT_BLOCK) -xfs_inobt_block_t *xfs_buf_to_inobt_block(struct xfs_buf *bp); -#define XFS_BUF_TO_INOBT_BLOCK(bp) xfs_buf_to_inobt_block(bp) -#else -#define XFS_BUF_TO_INOBT_BLOCK(bp) ((xfs_inobt_block_t *)(XFS_BUF_PTR(bp))) -#endif +#define XFS_BUF_TO_INOBT_BLOCK(bp) ((xfs_inobt_block_t *)XFS_BUF_PTR(bp)) /* * Bit manipulations for ir_free. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_MASK) -xfs_inofree_t xfs_inobt_mask(int i); -#define XFS_INOBT_MASK(i) xfs_inobt_mask(i) -#else #define XFS_INOBT_MASK(i) ((xfs_inofree_t)1 << (i)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_IS_FREE) -int xfs_inobt_is_free(xfs_inobt_rec_t *rp, int i); -#define XFS_INOBT_IS_FREE(rp,i) xfs_inobt_is_free(rp,i) -#define XFS_INOBT_IS_FREE_DISK(rp,i) xfs_inobt_is_free_disk(rp,i) -#else -#define XFS_INOBT_IS_FREE(rp,i) \ - (((rp)->ir_free & XFS_INOBT_MASK(i)) != 0) -#define XFS_INOBT_IS_FREE_DISK(rp,i) \ - ((INT_GET((rp)->ir_free, ARCH_CONVERT) & XFS_INOBT_MASK(i)) != 0) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_SET_FREE) -void xfs_inobt_set_free(xfs_inobt_rec_t *rp, int i); -#define XFS_INOBT_SET_FREE(rp,i) xfs_inobt_set_free(rp,i) -#else +#define XFS_INOBT_IS_FREE(rp,i) \ + (((rp)->ir_free & XFS_INOBT_MASK(i)) != 0) +#define XFS_INOBT_IS_FREE_DISK(rp,i) \ + ((INT_GET((rp)->ir_free,ARCH_CONVERT) & XFS_INOBT_MASK(i)) != 0) #define XFS_INOBT_SET_FREE(rp,i) ((rp)->ir_free |= XFS_INOBT_MASK(i)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_CLR_FREE) -void xfs_inobt_clr_free(xfs_inobt_rec_t *rp, int i); -#define XFS_INOBT_CLR_FREE(rp,i) xfs_inobt_clr_free(rp,i) -#else #define XFS_INOBT_CLR_FREE(rp,i) ((rp)->ir_free &= ~XFS_INOBT_MASK(i)) -#endif /* * Real block structures have a size equal to the disk block size. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_BLOCK_SIZE) -int xfs_inobt_block_size(int lev, struct xfs_btree_cur *cur); -#define XFS_INOBT_BLOCK_SIZE(lev,cur) xfs_inobt_block_size(lev,cur) -#else #define XFS_INOBT_BLOCK_SIZE(lev,cur) (1 << (cur)->bc_blocklog) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_BLOCK_MAXRECS) -int xfs_inobt_block_maxrecs(int lev, struct xfs_btree_cur *cur); -#define XFS_INOBT_BLOCK_MAXRECS(lev,cur) xfs_inobt_block_maxrecs(lev,cur) -#else -#define XFS_INOBT_BLOCK_MAXRECS(lev,cur) \ - ((cur)->bc_mp->m_inobt_mxr[lev != 0]) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_BLOCK_MINRECS) -int xfs_inobt_block_minrecs(int lev, struct xfs_btree_cur *cur); -#define XFS_INOBT_BLOCK_MINRECS(lev,cur) xfs_inobt_block_minrecs(lev,cur) -#else -#define XFS_INOBT_BLOCK_MINRECS(lev,cur) \ - ((cur)->bc_mp->m_inobt_mnr[lev != 0]) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_IS_LAST_REC) -int xfs_inobt_is_last_rec(struct xfs_btree_cur *cur); -#define XFS_INOBT_IS_LAST_REC(cur) xfs_inobt_is_last_rec(cur) -#else +#define XFS_INOBT_BLOCK_MAXRECS(lev,cur) ((cur)->bc_mp->m_inobt_mxr[lev != 0]) +#define XFS_INOBT_BLOCK_MINRECS(lev,cur) ((cur)->bc_mp->m_inobt_mnr[lev != 0]) #define XFS_INOBT_IS_LAST_REC(cur) \ - ((cur)->bc_ptrs[0] == \ - INT_GET(XFS_BUF_TO_INOBT_BLOCK((cur)->bc_bufs[0])->bb_numrecs, ARCH_CONVERT)) -#endif + ((cur)->bc_ptrs[0] == INT_GET(XFS_BUF_TO_INOBT_BLOCK((cur)->bc_bufs[0])->bb_numrecs, ARCH_CONVERT)) /* * Maximum number of inode btree levels. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IN_MAXLEVELS) -int xfs_in_maxlevels(struct xfs_mount *mp); -#define XFS_IN_MAXLEVELS(mp) xfs_in_maxlevels(mp) -#else #define XFS_IN_MAXLEVELS(mp) ((mp)->m_in_maxlevels) -#endif /* * block numbers in the AG. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IBT_BLOCK) -xfs_agblock_t xfs_ibt_block(struct xfs_mount *mp); -#define XFS_IBT_BLOCK(mp) xfs_ibt_block(mp) -#else -#define XFS_IBT_BLOCK(mp) ((xfs_agblock_t)(XFS_CNT_BLOCK(mp) + 1)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_PREALLOC_BLOCKS) -xfs_agblock_t xfs_prealloc_blocks(struct xfs_mount *mp); -#define XFS_PREALLOC_BLOCKS(mp) xfs_prealloc_blocks(mp) -#else -#define XFS_PREALLOC_BLOCKS(mp) ((xfs_agblock_t)(XFS_IBT_BLOCK(mp) + 1)) -#endif +#define XFS_IBT_BLOCK(mp) ((xfs_agblock_t)(XFS_CNT_BLOCK(mp) + 1)) +#define XFS_PREALLOC_BLOCKS(mp) ((xfs_agblock_t)(XFS_IBT_BLOCK(mp) + 1)) /* * Record, key, and pointer address macros for btree blocks. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_REC_ADDR) -xfs_inobt_rec_t * -xfs_inobt_rec_addr(xfs_inobt_block_t *bb, int i, struct xfs_btree_cur *cur); -#define XFS_INOBT_REC_ADDR(bb,i,cur) xfs_inobt_rec_addr(bb,i,cur) -#else -#define XFS_INOBT_REC_ADDR(bb,i,cur) \ - XFS_BTREE_REC_ADDR(XFS_INOBT_BLOCK_SIZE(0,cur), xfs_inobt, bb, i, \ - XFS_INOBT_BLOCK_MAXRECS(0, cur)) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_KEY_ADDR) -xfs_inobt_key_t * -xfs_inobt_key_addr(xfs_inobt_block_t *bb, int i, struct xfs_btree_cur *cur); -#define XFS_INOBT_KEY_ADDR(bb,i,cur) xfs_inobt_key_addr(bb,i,cur) -#else -#define XFS_INOBT_KEY_ADDR(bb,i,cur) \ - XFS_BTREE_KEY_ADDR(XFS_INOBT_BLOCK_SIZE(1,cur), xfs_inobt, bb, i, \ - XFS_INOBT_BLOCK_MAXRECS(1, cur)) -#endif +#define XFS_INOBT_REC_ADDR(bb,i,cur) \ + (XFS_BTREE_REC_ADDR(XFS_INOBT_BLOCK_SIZE(0,cur), xfs_inobt, bb, \ + i, XFS_INOBT_BLOCK_MAXRECS(0, cur))) +#define XFS_INOBT_KEY_ADDR(bb,i,cur) \ + (XFS_BTREE_KEY_ADDR(XFS_INOBT_BLOCK_SIZE(1,cur), xfs_inobt, bb, \ + i, XFS_INOBT_BLOCK_MAXRECS(1, cur))) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INOBT_PTR_ADDR) -xfs_inobt_ptr_t * -xfs_inobt_ptr_addr(xfs_inobt_block_t *bb, int i, struct xfs_btree_cur *cur); -#define XFS_INOBT_PTR_ADDR(bb,i,cur) xfs_inobt_ptr_addr(bb,i,cur) -#else -#define XFS_INOBT_PTR_ADDR(bb,i,cur) \ - XFS_BTREE_PTR_ADDR(XFS_INOBT_BLOCK_SIZE(1,cur), xfs_inobt, bb, i, \ - XFS_INOBT_BLOCK_MAXRECS(1, cur)) -#endif - -/* - * Prototypes for externally visible routines. - */ +#define XFS_INOBT_PTR_ADDR(bb,i,cur) \ + (XFS_BTREE_PTR_ADDR(XFS_INOBT_BLOCK_SIZE(1,cur), xfs_inobt, bb, \ + i, XFS_INOBT_BLOCK_MAXRECS(1, cur))) /* * Decrement cursor by one record at the level. * For nonzero levels the leaf-ward information is untouched. */ -int /* error */ -xfs_inobt_decrement( - struct xfs_btree_cur *cur, /* btree cursor */ - int level, /* level in btree, 0 is leaf */ - int *stat); /* success/failure */ +extern int xfs_inobt_decrement(struct xfs_btree_cur *cur, int level, int *stat); /* * Delete the record pointed to by cur. * The cursor refers to the place where the record was (could be inserted) * when the operation returns. */ -int /* error */ -xfs_inobt_delete( - struct xfs_btree_cur *cur, /* btree cursor */ - int *stat); /* success/failure */ +extern int xfs_inobt_delete(struct xfs_btree_cur *cur, int *stat); /* * Get the data from the pointed-to record. */ -int /* error */ -xfs_inobt_get_rec( - struct xfs_btree_cur *cur, /* btree cursor */ - xfs_agino_t *ino, /* output: starting inode of chunk */ - __int32_t *fcnt, /* output: number of free inodes */ - xfs_inofree_t *free, /* output: free inode mask */ - int *stat); /* output: success/failure */ +extern int xfs_inobt_get_rec(struct xfs_btree_cur *cur, xfs_agino_t *ino, + __int32_t *fcnt, xfs_inofree_t *free, int *stat); /* * Increment cursor by one record at the level. * For nonzero levels the leaf-ward information is untouched. */ -int /* error */ -xfs_inobt_increment( - struct xfs_btree_cur *cur, /* btree cursor */ - int level, /* level in btree, 0 is leaf */ - int *stat); /* success/failure */ +extern int xfs_inobt_increment(struct xfs_btree_cur *cur, int level, int *stat); /* * Insert the current record at the point referenced by cur. * The cursor may be inconsistent on return if splits have been done. */ -int /* error */ -xfs_inobt_insert( - struct xfs_btree_cur *cur, /* btree cursor */ - int *stat); /* success/failure */ +extern int xfs_inobt_insert(struct xfs_btree_cur *cur, int *stat); /* * Lookup the record equal to ino in the btree given by cur. */ -int /* error */ -xfs_inobt_lookup_eq( - struct xfs_btree_cur *cur, /* btree cursor */ - xfs_agino_t ino, /* starting inode of chunk */ - __int32_t fcnt, /* free inode count */ - xfs_inofree_t free, /* free inode mask */ - int *stat); /* success/failure */ +extern int xfs_inobt_lookup_eq(struct xfs_btree_cur *cur, xfs_agino_t ino, + __int32_t fcnt, xfs_inofree_t free, int *stat); /* * Lookup the first record greater than or equal to ino * in the btree given by cur. */ -int /* error */ -xfs_inobt_lookup_ge( - struct xfs_btree_cur *cur, /* btree cursor */ - xfs_agino_t ino, /* starting inode of chunk */ - __int32_t fcnt, /* free inode count */ - xfs_inofree_t free, /* free inode mask */ - int *stat); /* success/failure */ +extern int xfs_inobt_lookup_ge(struct xfs_btree_cur *cur, xfs_agino_t ino, + __int32_t fcnt, xfs_inofree_t free, int *stat); /* * Lookup the first record less than or equal to ino * in the btree given by cur. */ -int /* error */ -xfs_inobt_lookup_le( - struct xfs_btree_cur *cur, /* btree cursor */ - xfs_agino_t ino, /* starting inode of chunk */ - __int32_t fcnt, /* free inode count */ - xfs_inofree_t free, /* free inode mask */ - int *stat); /* success/failure */ +extern int xfs_inobt_lookup_le(struct xfs_btree_cur *cur, xfs_agino_t ino, + __int32_t fcnt, xfs_inofree_t free, int *stat); /* * Update the record referred to by cur, to the value given * by [ino, fcnt, free]. * This either works (return 0) or gets an EFSCORRUPTED error. */ -int /* error */ -xfs_inobt_update( - struct xfs_btree_cur *cur, /* btree cursor */ - xfs_agino_t ino, /* starting inode of chunk */ - __int32_t fcnt, /* free inode count */ - xfs_inofree_t free); /* free inode mask */ +extern int xfs_inobt_update(struct xfs_btree_cur *cur, xfs_agino_t ino, + __int32_t fcnt, xfs_inofree_t free); #endif /* __XFS_IALLOC_BTREE_H__ */ diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index 0d9ae8fb413..f925335e455 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c @@ -29,15 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -#include - #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -45,19 +42,18 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" #include "xfs_quota.h" #include "xfs_utils.h" -#include "xfs_bit.h" /* * Initialize the inode hash table for the newly mounted file system. diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index a648cc8ce96..edf50b5409f 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -29,12 +29,13 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" +#include "xfs_imap.h" #include "xfs_trans.h" #include "xfs_trans_priv.h" #include "xfs_sb.h" @@ -43,24 +44,22 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_imap.h" -#include "xfs_alloc.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" -#include "xfs_bmap.h" #include "xfs_buf_item.h" +#include "xfs_inode_item.h" +#include "xfs_btree.h" +#include "xfs_alloc.h" +#include "xfs_ialloc.h" +#include "xfs_bmap.h" #include "xfs_rw.h" #include "xfs_error.h" -#include "xfs_bit.h" #include "xfs_utils.h" #include "xfs_dir2_trace.h" #include "xfs_quota.h" diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 6ec8a0dd84a..11be922698a 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h @@ -32,6 +32,12 @@ #ifndef __XFS_INODE_H__ #define __XFS_INODE_H__ +/* + * Fork identifiers. + */ +#define XFS_DATA_FORK 0 +#define XFS_ATTR_FORK 1 + /* * File incore extent information, present for each of data & attr forks. */ @@ -311,60 +317,16 @@ typedef struct xfs_inode { /* * Fork handling. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IFORK_PTR) -xfs_ifork_t *xfs_ifork_ptr(xfs_inode_t *ip, int w); -#define XFS_IFORK_PTR(ip,w) xfs_ifork_ptr(ip,w) -#else -#define XFS_IFORK_PTR(ip,w) ((w) == XFS_DATA_FORK ? &(ip)->i_df : (ip)->i_afp) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IFORK_Q) -int xfs_ifork_q(xfs_inode_t *ip); -#define XFS_IFORK_Q(ip) xfs_ifork_q(ip) -#else +#define XFS_IFORK_PTR(ip,w) \ + ((w) == XFS_DATA_FORK ? &(ip)->i_df : (ip)->i_afp) #define XFS_IFORK_Q(ip) XFS_CFORK_Q(&(ip)->i_d) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IFORK_DSIZE) -int xfs_ifork_dsize(xfs_inode_t *ip); -#define XFS_IFORK_DSIZE(ip) xfs_ifork_dsize(ip) -#else #define XFS_IFORK_DSIZE(ip) XFS_CFORK_DSIZE(&ip->i_d, ip->i_mount) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IFORK_ASIZE) -int xfs_ifork_asize(xfs_inode_t *ip); -#define XFS_IFORK_ASIZE(ip) xfs_ifork_asize(ip) -#else #define XFS_IFORK_ASIZE(ip) XFS_CFORK_ASIZE(&ip->i_d, ip->i_mount) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IFORK_SIZE) -int xfs_ifork_size(xfs_inode_t *ip, int w); -#define XFS_IFORK_SIZE(ip,w) xfs_ifork_size(ip,w) -#else #define XFS_IFORK_SIZE(ip,w) XFS_CFORK_SIZE(&ip->i_d, ip->i_mount, w) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IFORK_FORMAT) -int xfs_ifork_format(xfs_inode_t *ip, int w); -#define XFS_IFORK_FORMAT(ip,w) xfs_ifork_format(ip,w) -#else #define XFS_IFORK_FORMAT(ip,w) XFS_CFORK_FORMAT(&ip->i_d, w) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IFORK_FMT_SET) -void xfs_ifork_fmt_set(xfs_inode_t *ip, int w, int n); -#define XFS_IFORK_FMT_SET(ip,w,n) xfs_ifork_fmt_set(ip,w,n) -#else #define XFS_IFORK_FMT_SET(ip,w,n) XFS_CFORK_FMT_SET(&ip->i_d, w, n) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IFORK_NEXTENTS) -int xfs_ifork_nextents(xfs_inode_t *ip, int w); -#define XFS_IFORK_NEXTENTS(ip,w) xfs_ifork_nextents(ip,w) -#else #define XFS_IFORK_NEXTENTS(ip,w) XFS_CFORK_NEXTENTS(&ip->i_d, w) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_IFORK_NEXT_SET) -void xfs_ifork_next_set(xfs_inode_t *ip, int w, int n); -#define XFS_IFORK_NEXT_SET(ip,w,n) xfs_ifork_next_set(ip,w,n) -#else #define XFS_IFORK_NEXT_SET(ip,w,n) XFS_CFORK_NEXT_SET(&ip->i_d, w, n) -#endif #ifdef __KERNEL__ @@ -418,28 +380,11 @@ void xfs_ifork_next_set(xfs_inode_t *ip, int w, int n); #define XFS_ITRUNC_DEFINITE 0x1 #define XFS_ITRUNC_MAYBE 0x2 -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ITOV) -struct vnode *xfs_itov(xfs_inode_t *ip); -#define XFS_ITOV(ip) xfs_itov(ip) -#else #define XFS_ITOV(ip) BHV_TO_VNODE(XFS_ITOBHV(ip)) -#endif #define XFS_ITOV_NULL(ip) BHV_TO_VNODE_NULL(XFS_ITOBHV(ip)) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ITOBHV) -struct bhv_desc *xfs_itobhv(xfs_inode_t *ip); -#define XFS_ITOBHV(ip) xfs_itobhv(ip) -#else #define XFS_ITOBHV(ip) ((struct bhv_desc *)(&((ip)->i_bhv_desc))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BHVTOI) -xfs_inode_t *xfs_bhvtoi(struct bhv_desc *bhvp); -#define XFS_BHVTOI(bhvp) xfs_bhvtoi(bhvp) -#else -#define XFS_BHVTOI(bhvp) \ - ((xfs_inode_t *)((char *)(bhvp) - \ - (char *)&(((xfs_inode_t *)0)->i_bhv_desc))) -#endif - +#define XFS_BHVTOI(bhvp) ((xfs_inode_t *)((char *)(bhvp) - \ + (char *)&(((xfs_inode_t *)0)->i_bhv_desc))) #define BHV_IS_XFS(bdp) (BHV_OPS(bdp) == &xfs_vnodeops) /* diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index 50e2cadf909..cebcc2781bb 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c @@ -29,38 +29,32 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * This file contains the implementation of the xfs_inode_log_item. - * It contains the item operations used to manipulate the inode log - * items as well as utility routines used by the inode specific - * transaction routines. - */ #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_buf_item.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_trans_priv.h" -#include "xfs_ag.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_inode_item.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" #include "xfs_rw.h" diff --git a/fs/xfs/xfs_inode_item.h b/fs/xfs/xfs_inode_item.h index d8775e0d629..61a806ba8fd 100644 --- a/fs/xfs/xfs_inode_item.h +++ b/fs/xfs/xfs_inode_item.h @@ -159,38 +159,33 @@ typedef struct xfs_inode_log_item { } xfs_inode_log_item_t; -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ILOG_FDATA) -int xfs_ilog_fdata(int w); #define XFS_ILOG_FDATA(w) xfs_ilog_fdata(w) -#else -#define XFS_ILOG_FDATA(w) \ - ((w) == XFS_DATA_FORK ? XFS_ILOG_DDATA : XFS_ILOG_ADATA) -#endif +static inline int xfs_ilog_fdata(int w) +{ + return (w == XFS_DATA_FORK ? XFS_ILOG_DDATA : XFS_ILOG_ADATA); +} #endif /* __KERNEL__ */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ILOG_FBROOT) -int xfs_ilog_fbroot(int w); #define XFS_ILOG_FBROOT(w) xfs_ilog_fbroot(w) -#else -#define XFS_ILOG_FBROOT(w) \ - ((w) == XFS_DATA_FORK ? XFS_ILOG_DBROOT : XFS_ILOG_ABROOT) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ILOG_FEXT) -int xfs_ilog_fext(int w); +static inline int xfs_ilog_fbroot(int w) +{ + return (w == XFS_DATA_FORK ? XFS_ILOG_DBROOT : XFS_ILOG_ABROOT); +} + #define XFS_ILOG_FEXT(w) xfs_ilog_fext(w) -#else -#define XFS_ILOG_FEXT(w) \ - ((w) == XFS_DATA_FORK ? XFS_ILOG_DEXT : XFS_ILOG_AEXT) -#endif +static inline int xfs_ilog_fext(int w) +{ + return (w == XFS_DATA_FORK ? XFS_ILOG_DEXT : XFS_ILOG_AEXT); +} #ifdef __KERNEL__ -void xfs_inode_item_init(struct xfs_inode *, struct xfs_mount *); -void xfs_inode_item_destroy(struct xfs_inode *); -void xfs_iflush_done(struct xfs_buf *, xfs_inode_log_item_t *); -void xfs_istale_done(struct xfs_buf *, xfs_inode_log_item_t *); -void xfs_iflush_abort(struct xfs_inode *); +extern void xfs_inode_item_init(struct xfs_inode *, struct xfs_mount *); +extern void xfs_inode_item_destroy(struct xfs_inode *); +extern void xfs_iflush_done(struct xfs_buf *, xfs_inode_log_item_t *); +extern void xfs_istale_done(struct xfs_buf *, xfs_inode_log_item_t *); +extern void xfs_iflush_abort(struct xfs_inode *); #endif /* __KERNEL__ */ diff --git a/fs/xfs/xfs_inum.h b/fs/xfs/xfs_inum.h index a3af2d5a6eb..8f70a12d56b 100644 --- a/fs/xfs/xfs_inum.h +++ b/fs/xfs/xfs_inum.h @@ -58,109 +58,31 @@ typedef __uint32_t xfs_intino_t; struct xfs_mount; -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INO_MASK) -__uint32_t xfs_ino_mask(int k); -#define XFS_INO_MASK(k) xfs_ino_mask(k) -#else -#define XFS_INO_MASK(k) ((__uint32_t)((1ULL << (k)) - 1)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INO_OFFSET_BITS) -int xfs_ino_offset_bits(struct xfs_mount *mp); -#define XFS_INO_OFFSET_BITS(mp) xfs_ino_offset_bits(mp) -#else -#define XFS_INO_OFFSET_BITS(mp) ((mp)->m_sb.sb_inopblog) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INO_AGBNO_BITS) -int xfs_ino_agbno_bits(struct xfs_mount *mp); -#define XFS_INO_AGBNO_BITS(mp) xfs_ino_agbno_bits(mp) -#else -#define XFS_INO_AGBNO_BITS(mp) ((mp)->m_sb.sb_agblklog) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INO_AGINO_BITS) -int xfs_ino_agino_bits(struct xfs_mount *mp); -#define XFS_INO_AGINO_BITS(mp) xfs_ino_agino_bits(mp) -#else -#define XFS_INO_AGINO_BITS(mp) ((mp)->m_agino_log) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INO_AGNO_BITS) -int xfs_ino_agno_bits(struct xfs_mount *mp); -#define XFS_INO_AGNO_BITS(mp) xfs_ino_agno_bits(mp) -#else -#define XFS_INO_AGNO_BITS(mp) ((mp)->m_agno_log) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INO_BITS) -int xfs_ino_bits(struct xfs_mount *mp); -#define XFS_INO_BITS(mp) xfs_ino_bits(mp) -#else -#define XFS_INO_BITS(mp) (XFS_INO_AGNO_BITS(mp) + XFS_INO_AGINO_BITS(mp)) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INO_TO_AGNO) -xfs_agnumber_t xfs_ino_to_agno(struct xfs_mount *mp, xfs_ino_t i); -#define XFS_INO_TO_AGNO(mp,i) xfs_ino_to_agno(mp,i) -#else -#define XFS_INO_TO_AGNO(mp,i) \ +#define XFS_INO_MASK(k) (__uint32_t)((1ULL << (k)) - 1) +#define XFS_INO_OFFSET_BITS(mp) (mp)->m_sb.sb_inopblog +#define XFS_INO_AGBNO_BITS(mp) (mp)->m_sb.sb_agblklog +#define XFS_INO_AGINO_BITS(mp) (mp)->m_agino_log +#define XFS_INO_AGNO_BITS(mp) (mp)->m_agno_log +#define XFS_INO_BITS(mp) \ + XFS_INO_AGNO_BITS(mp) + XFS_INO_AGINO_BITS(mp) +#define XFS_INO_TO_AGNO(mp,i) \ ((xfs_agnumber_t)((i) >> XFS_INO_AGINO_BITS(mp))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INO_TO_AGINO) -xfs_agino_t xfs_ino_to_agino(struct xfs_mount *mp, xfs_ino_t i); -#define XFS_INO_TO_AGINO(mp,i) xfs_ino_to_agino(mp,i) -#else -#define XFS_INO_TO_AGINO(mp,i) \ +#define XFS_INO_TO_AGINO(mp,i) \ ((xfs_agino_t)(i) & XFS_INO_MASK(XFS_INO_AGINO_BITS(mp))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INO_TO_AGBNO) -xfs_agblock_t xfs_ino_to_agbno(struct xfs_mount *mp, xfs_ino_t i); -#define XFS_INO_TO_AGBNO(mp,i) xfs_ino_to_agbno(mp,i) -#else -#define XFS_INO_TO_AGBNO(mp,i) \ +#define XFS_INO_TO_AGBNO(mp,i) \ (((xfs_agblock_t)(i) >> XFS_INO_OFFSET_BITS(mp)) & \ - XFS_INO_MASK(XFS_INO_AGBNO_BITS(mp))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INO_TO_OFFSET) -int xfs_ino_to_offset(struct xfs_mount *mp, xfs_ino_t i); -#define XFS_INO_TO_OFFSET(mp,i) xfs_ino_to_offset(mp,i) -#else -#define XFS_INO_TO_OFFSET(mp,i) \ + XFS_INO_MASK(XFS_INO_AGBNO_BITS(mp))) +#define XFS_INO_TO_OFFSET(mp,i) \ ((int)(i) & XFS_INO_MASK(XFS_INO_OFFSET_BITS(mp))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_INO_TO_FSB) -xfs_fsblock_t xfs_ino_to_fsb(struct xfs_mount *mp, xfs_ino_t i); -#define XFS_INO_TO_FSB(mp,i) xfs_ino_to_fsb(mp,i) -#else -#define XFS_INO_TO_FSB(mp,i) \ +#define XFS_INO_TO_FSB(mp,i) \ XFS_AGB_TO_FSB(mp, XFS_INO_TO_AGNO(mp,i), XFS_INO_TO_AGBNO(mp,i)) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AGINO_TO_INO) -xfs_ino_t -xfs_agino_to_ino(struct xfs_mount *mp, xfs_agnumber_t a, xfs_agino_t i); -#define XFS_AGINO_TO_INO(mp,a,i) xfs_agino_to_ino(mp,a,i) -#else #define XFS_AGINO_TO_INO(mp,a,i) \ (((xfs_ino_t)(a) << XFS_INO_AGINO_BITS(mp)) | (i)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AGINO_TO_AGBNO) -xfs_agblock_t xfs_agino_to_agbno(struct xfs_mount *mp, xfs_agino_t i); -#define XFS_AGINO_TO_AGBNO(mp,i) xfs_agino_to_agbno(mp,i) -#else #define XFS_AGINO_TO_AGBNO(mp,i) ((i) >> XFS_INO_OFFSET_BITS(mp)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_AGINO_TO_OFFSET) -int xfs_agino_to_offset(struct xfs_mount *mp, xfs_agino_t i); -#define XFS_AGINO_TO_OFFSET(mp,i) xfs_agino_to_offset(mp,i) -#else #define XFS_AGINO_TO_OFFSET(mp,i) \ ((i) & XFS_INO_MASK(XFS_INO_OFFSET_BITS(mp))) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_OFFBNO_TO_AGINO) -xfs_agino_t xfs_offbno_to_agino(struct xfs_mount *mp, xfs_agblock_t b, int o); -#define XFS_OFFBNO_TO_AGINO(mp,b,o) xfs_offbno_to_agino(mp,b,o) -#else #define XFS_OFFBNO_TO_AGINO(mp,b,o) \ ((xfs_agino_t)(((b) << XFS_INO_OFFSET_BITS(mp)) | (o))) -#endif #if XFS_BIG_INUMS #define XFS_MAXINUMBER ((xfs_ino_t)((1ULL << 56) - 1ULL)) diff --git a/fs/xfs/xfs_iocore.c b/fs/xfs/xfs_iocore.c index 414ec496845..6bdd0dcbe39 100644 --- a/fs/xfs/xfs_iocore.c +++ b/fs/xfs/xfs_iocore.c @@ -29,12 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -42,22 +42,21 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_itable.h" -#include "xfs_btree.h" -#include "xfs_alloc.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_inode_item.h" +#include "xfs_itable.h" +#include "xfs_btree.h" +#include "xfs_alloc.h" +#include "xfs_ialloc.h" #include "xfs_bmap.h" #include "xfs_error.h" -#include "xfs_bit.h" #include "xfs_rw.h" #include "xfs_quota.h" #include "xfs_trans_space.h" diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index d0f5be63cdd..1ba0d71349c 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -29,12 +29,11 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" - #include "xfs_fs.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -44,16 +43,16 @@ #include "xfs_dmapi.h" #include "xfs_quota.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_ialloc.h" +#include "xfs_btree.h" #include "xfs_bmap.h" #include "xfs_bit.h" #include "xfs_rtalloc.h" diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index 8fbc8d37818..abac0399ca4 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c @@ -29,31 +29,31 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_ag.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" #include "xfs_ialloc.h" #include "xfs_itable.h" #include "xfs_error.h" +#include "xfs_btree.h" #ifndef HAVE_USERACC #define useracc(ubuffer, size, flags, foo) (0) diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index fcde2a2fc45..97e2a3b0ca1 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -29,30 +29,33 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * High level interface routines for log manager - */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" -#include "xfs_ag.h" -#include "xfs_sb.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" +#include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" +#include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_error.h" #include "xfs_log_priv.h" #include "xfs_buf_item.h" +#include "xfs_bmap_btree.h" #include "xfs_alloc_btree.h" +#include "xfs_ialloc_btree.h" #include "xfs_log_recover.h" -#include "xfs_bit.h" -#include "xfs_rw.h" #include "xfs_trans_priv.h" +#include "xfs_dir_sf.h" +#include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" +#include "xfs_dinode.h" +#include "xfs_inode.h" +#include "xfs_rw.h" #define xlog_write_adv_cnt(ptr, len, off, bytes) \ diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index a884cea82fc..bec421a735f 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h @@ -35,6 +35,7 @@ struct xfs_buf; struct ktrace; struct log; +struct xlog_ticket; struct xfs_buf_cancel; struct xfs_mount; @@ -120,77 +121,6 @@ struct xfs_mount; ((i) >> 24) #endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XLOG_GRANT_SUB_SPACE) -void xlog_grant_sub_space(struct log *log, int bytes, int type); -#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \ - xlog_grant_sub_space(log,bytes,type) -#else -#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \ - { \ - if (type == 'w') { \ - (log)->l_grant_write_bytes -= (bytes); \ - if ((log)->l_grant_write_bytes < 0) { \ - (log)->l_grant_write_bytes += (log)->l_logsize; \ - (log)->l_grant_write_cycle--; \ - } \ - } else { \ - (log)->l_grant_reserve_bytes -= (bytes); \ - if ((log)->l_grant_reserve_bytes < 0) { \ - (log)->l_grant_reserve_bytes += (log)->l_logsize;\ - (log)->l_grant_reserve_cycle--; \ - } \ - } \ - } -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XLOG_GRANT_ADD_SPACE) -void xlog_grant_add_space(struct log *log, int bytes, int type); -#define XLOG_GRANT_ADD_SPACE(log,bytes,type) \ - xlog_grant_add_space(log,bytes,type) -#else -#define XLOG_GRANT_ADD_SPACE(log,bytes,type) \ - { \ - if (type == 'w') { \ - (log)->l_grant_write_bytes += (bytes); \ - if ((log)->l_grant_write_bytes > (log)->l_logsize) { \ - (log)->l_grant_write_bytes -= (log)->l_logsize; \ - (log)->l_grant_write_cycle++; \ - } \ - } else { \ - (log)->l_grant_reserve_bytes += (bytes); \ - if ((log)->l_grant_reserve_bytes > (log)->l_logsize) { \ - (log)->l_grant_reserve_bytes -= (log)->l_logsize;\ - (log)->l_grant_reserve_cycle++; \ - } \ - } \ - } -#endif -#define XLOG_INS_TICKETQ(q,tic) \ - { \ - if (q) { \ - (tic)->t_next = (q); \ - (tic)->t_prev = (q)->t_prev; \ - (q)->t_prev->t_next = (tic); \ - (q)->t_prev = (tic); \ - } else { \ - (tic)->t_prev = (tic)->t_next = (tic); \ - (q) = (tic); \ - } \ - (tic)->t_flags |= XLOG_TIC_IN_Q; \ - } -#define XLOG_DEL_TICKETQ(q,tic) \ - { \ - if ((tic) == (tic)->t_next) { \ - (q) = NULL; \ - } else { \ - (q) = (tic)->t_next; \ - (tic)->t_next->t_prev = (tic)->t_prev; \ - (tic)->t_prev->t_next = (tic)->t_next; \ - } \ - (tic)->t_next = (tic)->t_prev = NULL; \ - (tic)->t_flags &= ~XLOG_TIC_IN_Q; \ - } - - #define GRANT_LOCK(log) mutex_spinlock(&(log)->l_grant_lock) #define GRANT_UNLOCK(log, s) mutex_spinunlock(&(log)->l_grant_lock, s) #define LOG_LOCK(log) mutex_spinlock(&(log)->l_icloglock) @@ -576,6 +506,75 @@ typedef struct log { * alignment mask */ } xlog_t; +#define XLOG_GRANT_SUB_SPACE(log,bytes,type) \ + xlog_grant_sub_space(log,bytes,type) +static inline void xlog_grant_sub_space(struct log *log, int bytes, int type) +{ + if (type == 'w') { \ + (log)->l_grant_write_bytes -= (bytes); \ + if ((log)->l_grant_write_bytes < 0) { \ + (log)->l_grant_write_bytes += (log)->l_logsize; \ + (log)->l_grant_write_cycle--; \ + } \ + } else { \ + (log)->l_grant_reserve_bytes -= (bytes); \ + if ((log)->l_grant_reserve_bytes < 0) { \ + (log)->l_grant_reserve_bytes += (log)->l_logsize;\ + (log)->l_grant_reserve_cycle--; \ + } \ + } \ +} + +#define XLOG_GRANT_ADD_SPACE(log,bytes,type) \ + xlog_grant_add_space(log,bytes,type) +static inline void +xlog_grant_add_space(struct log *log, int bytes, int type) +{ + if (type == 'w') { \ + (log)->l_grant_write_bytes += (bytes); \ + if ((log)->l_grant_write_bytes > (log)->l_logsize) { \ + (log)->l_grant_write_bytes -= (log)->l_logsize; \ + (log)->l_grant_write_cycle++; \ + } \ + } else { \ + (log)->l_grant_reserve_bytes += (bytes); \ + if ((log)->l_grant_reserve_bytes > (log)->l_logsize) { \ + (log)->l_grant_reserve_bytes -= (log)->l_logsize;\ + (log)->l_grant_reserve_cycle++; \ + } \ + } \ +} + +#define XLOG_INS_TICKETQ(q, tic) xlog_ins_ticketq(q, tic) +static inline void +xlog_ins_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic) +{ \ + if (q) { \ + (tic)->t_next = (q); \ + (tic)->t_prev = (q)->t_prev; \ + (q)->t_prev->t_next = (tic); \ + (q)->t_prev = (tic); \ + } else { \ + (tic)->t_prev = (tic)->t_next = (tic); \ + (q) = (tic); \ + } \ + (tic)->t_flags |= XLOG_TIC_IN_Q; \ +} + +#define XLOG_DEL_TICKETQ(q, tic) xlog_del_ticketq(q, tic) +static inline void +xlog_del_ticketq(struct xlog_ticket *q, struct xlog_ticket *tic) +{ \ + if ((tic) == (tic)->t_next) { \ + (q) = NULL; \ + } else { \ + (q) = (tic)->t_next; \ + (tic)->t_next->t_prev = (tic)->t_prev; \ + (tic)->t_prev->t_next = (tic)->t_next; \ + } \ + (tic)->t_next = (tic)->t_prev = NULL; \ + (tic)->t_flags &= ~XLOG_TIC_IN_Q; \ +} /* common routines */ extern xfs_lsn_t xlog_assign_tail_lsn(struct xfs_mount *mp); diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 212c5411595..f61dcd1b8e3 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -29,38 +29,37 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" -#include "xfs_ag.h" -#include "xfs_sb.h" +#include "xfs_inum.h" #include "xfs_trans.h" +#include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_error.h" #include "xfs_bmap_btree.h" -#include "xfs_alloc.h" -#include "xfs_attr_sf.h" +#include "xfs_alloc_btree.h" +#include "xfs_ialloc_btree.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_imap.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" -#include "xfs_ialloc_btree.h" +#include "xfs_inode_item.h" +#include "xfs_imap.h" +#include "xfs_alloc.h" #include "xfs_ialloc.h" #include "xfs_log_priv.h" #include "xfs_buf_item.h" -#include "xfs_alloc_btree.h" #include "xfs_log_recover.h" #include "xfs_extfree_item.h" #include "xfs_trans_priv.h" -#include "xfs_bit.h" #include "xfs_quota.h" #include "xfs_rw.h" diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 4f26172a163..52542c5d7a3 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -29,12 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -42,21 +42,20 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" #include "xfs_alloc.h" #include "xfs_rtalloc.h" #include "xfs_bmap.h" #include "xfs_error.h" -#include "xfs_bit.h" #include "xfs_rw.h" #include "xfs_quota.h" #include "xfs_fsops.h" diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 7341f4984c0..0567ee2164f 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h @@ -80,6 +80,9 @@ struct xfs_iocore; struct xfs_bmbt_irec; struct xfs_bmap_free; +extern struct vfsops xfs_vfsops; +extern struct vnodeops xfs_vnodeops; + #define AIL_LOCK_T lock_t #define AIL_LOCKINIT(x,y) spinlock_init(x,y) #define AIL_LOCK_DESTROY(x) spinlock_destroy(x) @@ -503,57 +506,41 @@ xfs_preferred_iosize(xfs_mount_t *mp) /* * Macros for getting from mount to vfs and back. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_MTOVFS) -struct vfs *xfs_mtovfs(xfs_mount_t *mp); #define XFS_MTOVFS(mp) xfs_mtovfs(mp) -#else -#define XFS_MTOVFS(mp) (bhvtovfs(&(mp)->m_bhv)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BHVTOM) -xfs_mount_t *xfs_bhvtom(bhv_desc_t *bdp); -#define XFS_BHVTOM(bdp) xfs_bhvtom(bdp) -#else -#define XFS_BHVTOM(bdp) ((xfs_mount_t *)BHV_PDATA(bdp)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_VFSTOM) -xfs_mount_t *xfs_vfstom(vfs_t *vfs); -#define XFS_VFSTOM(vfs) xfs_vfstom(vfs) -#else -#define XFS_VFSTOM(vfs) \ - (XFS_BHVTOM(bhv_lookup(VFS_BHVHEAD(vfs), &xfs_vfsops))) -#endif +static inline struct vfs *xfs_mtovfs(xfs_mount_t *mp) +{ + return bhvtovfs(&mp->m_bhv); +} +#define XFS_BHVTOM(bdp) xfs_bhvtom(bdp) +static inline xfs_mount_t *xfs_bhvtom(bhv_desc_t *bdp) +{ + return (xfs_mount_t *)BHV_PDATA(bdp); +} -/* - * Moved here from xfs_ag.h to avoid reordering header files - */ +#define XFS_VFSTOM(vfs) xfs_vfstom(vfs) +static inline xfs_mount_t *xfs_vfstom(vfs_t *vfs) +{ + return XFS_BHVTOM(bhv_lookup(VFS_BHVHEAD(vfs), &xfs_vfsops)); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DADDR_TO_AGNO) -xfs_agnumber_t xfs_daddr_to_agno(struct xfs_mount *mp, xfs_daddr_t d); #define XFS_DADDR_TO_AGNO(mp,d) xfs_daddr_to_agno(mp,d) -#else - -static inline xfs_agnumber_t XFS_DADDR_TO_AGNO(xfs_mount_t *mp, xfs_daddr_t d) +static inline xfs_agnumber_t +xfs_daddr_to_agno(struct xfs_mount *mp, xfs_daddr_t d) { - d = XFS_BB_TO_FSBT(mp, d); - do_div(d, mp->m_sb.sb_agblocks); - return (xfs_agnumber_t) d; + xfs_daddr_t ld = XFS_BB_TO_FSBT(mp, d); + do_div(ld, mp->m_sb.sb_agblocks); + return (xfs_agnumber_t) ld; } -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DADDR_TO_AGBNO) -xfs_agblock_t xfs_daddr_to_agbno(struct xfs_mount *mp, xfs_daddr_t d); #define XFS_DADDR_TO_AGBNO(mp,d) xfs_daddr_to_agbno(mp,d) -#else - -static inline xfs_agblock_t XFS_DADDR_TO_AGBNO(xfs_mount_t *mp, xfs_daddr_t d) +static inline xfs_agblock_t +xfs_daddr_to_agbno(struct xfs_mount *mp, xfs_daddr_t d) { - d = XFS_BB_TO_FSBT(mp, d); - return (xfs_agblock_t) do_div(d, mp->m_sb.sb_agblocks); + xfs_daddr_t ld = XFS_BB_TO_FSBT(mp, d); + return (xfs_agblock_t) do_div(ld, mp->m_sb.sb_agblocks); } -#endif - /* * This structure is for use by the xfs_mod_incore_sb_batch() routine. */ @@ -589,9 +576,6 @@ extern int xfs_sync_inodes(xfs_mount_t *, int, int, int *); extern xfs_agnumber_t xfs_initialize_perag(xfs_mount_t *, xfs_agnumber_t); extern void xfs_xlatesb(void *, struct xfs_sb *, int, __int64_t); -extern struct vfsops xfs_vfsops; -extern struct vnodeops xfs_vnodeops; - extern struct xfs_dmops xfs_dmcore_stub; extern struct xfs_qmops xfs_qmcore_stub; extern struct xfs_ioops xfs_iocore_xfs; diff --git a/fs/xfs/xfs_qmops.c b/fs/xfs/xfs_qmops.c index a6cd6324e94..ac14d26fa9c 100644 --- a/fs/xfs/xfs_qmops.c +++ b/fs/xfs/xfs_qmops.c @@ -30,11 +30,10 @@ * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ #include "xfs.h" - -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c index 1c3599df0cc..13517241458 100644 --- a/fs/xfs/xfs_rename.c +++ b/fs/xfs/xfs_rename.c @@ -29,32 +29,31 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_error.h" #include "xfs_quota.h" #include "xfs_refcache.h" #include "xfs_utils.h" #include "xfs_trans_space.h" -#include "xfs_da_btree.h" #include "xfs_dir_leaf.h" diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 2c37822d101..145f916538a 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -29,16 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - -/* - * Free realtime space allocation for XFS. - */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -46,19 +42,18 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" #include "xfs_alloc.h" #include "xfs_bmap.h" -#include "xfs_bit.h" #include "xfs_rtalloc.h" #include "xfs_fsops.h" #include "xfs_error.h" diff --git a/fs/xfs/xfs_rw.c b/fs/xfs/xfs_rw.c index 31f68cc637b..075850c999f 100644 --- a/fs/xfs/xfs_rw.c +++ b/fs/xfs/xfs_rw.c @@ -29,12 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -42,20 +42,20 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" +#include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" +#include "xfs_dinode.h" +#include "xfs_inode.h" +#include "xfs_inode_item.h" #include "xfs_itable.h" #include "xfs_btree.h" #include "xfs_alloc.h" #include "xfs_ialloc.h" #include "xfs_attr.h" -#include "xfs_attr_sf.h" -#include "xfs_dir_sf.h" -#include "xfs_dir2_sf.h" -#include "xfs_dinode.h" -#include "xfs_inode_item.h" -#include "xfs_inode.h" #include "xfs_bmap.h" #include "xfs_acl.h" #include "xfs_mac.h" diff --git a/fs/xfs/xfs_rw.h b/fs/xfs/xfs_rw.h index c8b10bf8f53..90233037fab 100644 --- a/fs/xfs/xfs_rw.h +++ b/fs/xfs/xfs_rw.h @@ -68,87 +68,44 @@ struct xfs_mount; * file is a real time file or not, because the bmap code * does. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_FSB_TO_DB) -xfs_daddr_t xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb); #define XFS_FSB_TO_DB(ip,fsb) xfs_fsb_to_db(ip,fsb) -#else -#define XFS_FSB_TO_DB(ip,fsb) \ - (((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) ? \ +static inline xfs_daddr_t +xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb) +{ + return (((ip)->i_d.di_flags & XFS_DIFLAG_REALTIME) ? \ (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \ - XFS_FSB_TO_DADDR((ip)->i_mount, (fsb))) -#endif - -#define XFS_FSB_TO_DB_IO(io,fsb) \ - (((io)->io_flags & XFS_IOCORE_RT) ? \ + XFS_FSB_TO_DADDR((ip)->i_mount, (fsb))); +} +#define XFS_FSB_TO_DB_IO(io,fsb) xfs_fsb_to_db_io(io,fsb) +static inline xfs_daddr_t +xfs_fsb_to_db_io(struct xfs_iocore *io, xfs_fsblock_t fsb) +{ + return (((io)->io_flags & XFS_IOCORE_RT) ? \ XFS_FSB_TO_BB((io)->io_mount, (fsb)) : \ - XFS_FSB_TO_DADDR((io)->io_mount, (fsb))) + XFS_FSB_TO_DADDR((io)->io_mount, (fsb))); +} /* * Prototypes for functions in xfs_rw.c. */ - -int -xfs_write_clear_setuid( - struct xfs_inode *ip); - -int -xfs_bwrite( - struct xfs_mount *mp, - struct xfs_buf *bp); - -int -xfs_bioerror( - struct xfs_buf *b); - -int -xfs_bioerror_relse( - struct xfs_buf *b); - -int -xfs_read_buf( - struct xfs_mount *mp, - xfs_buftarg_t *target, - xfs_daddr_t blkno, - int len, - uint flags, - struct xfs_buf **bpp); - -void -xfs_ioerror_alert( - char *func, - struct xfs_mount *mp, - xfs_buf_t *bp, - xfs_daddr_t blkno); - +extern int xfs_write_clear_setuid(struct xfs_inode *ip); +extern int xfs_bwrite(struct xfs_mount *mp, struct xfs_buf *bp); +extern int xfs_bioerror(struct xfs_buf *bp); +extern int xfs_bioerror_relse(struct xfs_buf *bp); +extern int xfs_read_buf(struct xfs_mount *mp, xfs_buftarg_t *btp, + xfs_daddr_t blkno, int len, uint flags, + struct xfs_buf **bpp); +extern void xfs_ioerror_alert(char *func, struct xfs_mount *mp, + xfs_buf_t *bp, xfs_daddr_t blkno); /* * Prototypes for functions in xfs_vnodeops.c. */ - -int -xfs_rwlock( - bhv_desc_t *bdp, - vrwlock_t write_lock); - -void -xfs_rwunlock( - bhv_desc_t *bdp, - vrwlock_t write_lock); - -int -xfs_change_file_space( - bhv_desc_t *bdp, - int cmd, - xfs_flock64_t *bf, - xfs_off_t offset, - cred_t *credp, - int flags); - -int -xfs_set_dmattrs( - bhv_desc_t *bdp, - u_int evmask, - u_int16_t state, - cred_t *credp); +extern int xfs_rwlock(bhv_desc_t *bdp, vrwlock_t write_lock); +extern void xfs_rwunlock(bhv_desc_t *bdp, vrwlock_t write_lock); +extern int xfs_change_file_space(bhv_desc_t *bdp, int cmd, xfs_flock64_t *bf, + xfs_off_t offset, cred_t *credp, int flags); +extern int xfs_set_dmattrs(bhv_desc_t *bdp, u_int evmask, u_int16_t state, + cred_t *credp); #endif /* __XFS_RW_H__ */ diff --git a/fs/xfs/xfs_sb.h b/fs/xfs/xfs_sb.h index 01c5a5ff230..a7b2542fd7b 100644 --- a/fs/xfs/xfs_sb.h +++ b/fs/xfs/xfs_sb.h @@ -241,42 +241,33 @@ typedef enum { */ #define XFS_SB_MAX_SHARED_VN 0 -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_NUM) -int xfs_sb_version_num(xfs_sb_t *sbp); -#define XFS_SB_VERSION_NUM(sbp) xfs_sb_version_num(sbp) -#else #define XFS_SB_VERSION_NUM(sbp) ((sbp)->sb_versionnum & XFS_SB_VERSION_NUMBITS) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_GOOD_VERSION) -int xfs_sb_good_version(xfs_sb_t *sbp); #define XFS_SB_GOOD_VERSION(sbp) xfs_sb_good_version(sbp) -#else -#define XFS_SB_GOOD_VERSION_INT(sbp) \ - ((((sbp)->sb_versionnum >= XFS_SB_VERSION_1) && \ - ((sbp)->sb_versionnum <= XFS_SB_VERSION_3)) || \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - !(((sbp)->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS) || \ - (((sbp)->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) && \ - ((sbp)->sb_features2 & ~XFS_SB_VERSION2_OKREALBITS))) - #ifdef __KERNEL__ -#define XFS_SB_GOOD_VERSION(sbp) \ - (XFS_SB_GOOD_VERSION_INT(sbp) && \ - (sbp)->sb_shared_vn <= XFS_SB_MAX_SHARED_VN) )) -#else -/* - * extra 2 paren's here (( to unconfuse paren-matching editors - * like vi because XFS_SB_GOOD_VERSION_INT is a partial expression - * and the two XFS_SB_GOOD_VERSION's each 2 more close paren's to - * complete the expression. - */ -#define XFS_SB_GOOD_VERSION(sbp) \ - (XFS_SB_GOOD_VERSION_INT(sbp) && \ - (!((sbp)->sb_versionnum & XFS_SB_VERSION_SHAREDBIT) || \ - (sbp)->sb_shared_vn <= XFS_SB_MAX_SHARED_VN)) )) +static inline int xfs_sb_good_version(xfs_sb_t *sbp) +{ + return (((sbp->sb_versionnum >= XFS_SB_VERSION_1) && \ + (sbp->sb_versionnum <= XFS_SB_VERSION_3)) || \ + ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + !((sbp->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS) || \ + ((sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) && \ + (sbp->sb_features2 & ~XFS_SB_VERSION2_OKREALBITS))) && \ + (sbp->sb_shared_vn <= XFS_SB_MAX_SHARED_VN))); +} +#else +static inline int xfs_sb_good_version(xfs_sb_t *sbp) +{ + return (((sbp->sb_versionnum >= XFS_SB_VERSION_1) && \ + (sbp->sb_versionnum <= XFS_SB_VERSION_3)) || \ + ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + !((sbp->sb_versionnum & ~XFS_SB_VERSION_OKREALBITS) || \ + ((sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) && \ + (sbp->sb_features2 & ~XFS_SB_VERSION2_OKREALBITS))) && \ + (!(sbp->sb_versionnum & XFS_SB_VERSION_SHAREDBIT) || \ + (sbp->sb_shared_vn <= XFS_SB_MAX_SHARED_VN)))); +} #endif /* __KERNEL__ */ -#endif #define XFS_SB_GOOD_SASH_VERSION(sbp) \ ((((sbp)->sb_versionnum >= XFS_SB_VERSION_1) && \ @@ -284,224 +275,178 @@ int xfs_sb_good_version(xfs_sb_t *sbp); ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ !((sbp)->sb_versionnum & ~XFS_SB_VERSION_OKSASHBITS))) -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_TONEW) -unsigned xfs_sb_version_tonew(unsigned v); #define XFS_SB_VERSION_TONEW(v) xfs_sb_version_tonew(v) -#else -#define XFS_SB_VERSION_TONEW(v) \ - ((((v) == XFS_SB_VERSION_1) ? \ +static inline unsigned xfs_sb_version_tonew(unsigned v) +{ + return ((((v) == XFS_SB_VERSION_1) ? \ 0 : \ (((v) == XFS_SB_VERSION_2) ? \ XFS_SB_VERSION_ATTRBIT : \ (XFS_SB_VERSION_ATTRBIT | XFS_SB_VERSION_NLINKBIT))) | \ - XFS_SB_VERSION_4) -#endif + XFS_SB_VERSION_4); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_TOOLD) -unsigned xfs_sb_version_toold(unsigned v); #define XFS_SB_VERSION_TOOLD(v) xfs_sb_version_toold(v) -#else -#define XFS_SB_VERSION_TOOLD(v) \ - (((v) & (XFS_SB_VERSION_QUOTABIT | XFS_SB_VERSION_ALIGNBIT)) ? \ +static inline unsigned xfs_sb_version_toold(unsigned v) +{ + return (((v) & (XFS_SB_VERSION_QUOTABIT | XFS_SB_VERSION_ALIGNBIT)) ? \ 0 : \ (((v) & XFS_SB_VERSION_NLINKBIT) ? \ XFS_SB_VERSION_3 : \ (((v) & XFS_SB_VERSION_ATTRBIT) ? \ XFS_SB_VERSION_2 : \ - XFS_SB_VERSION_1))) -#endif + XFS_SB_VERSION_1))); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_HASATTR) -int xfs_sb_version_hasattr(xfs_sb_t *sbp); #define XFS_SB_VERSION_HASATTR(sbp) xfs_sb_version_hasattr(sbp) -#else -#define XFS_SB_VERSION_HASATTR(sbp) \ - (((sbp)->sb_versionnum == XFS_SB_VERSION_2) || \ - ((sbp)->sb_versionnum == XFS_SB_VERSION_3) || \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_ATTRBIT))) -#endif +static inline int xfs_sb_version_hasattr(xfs_sb_t *sbp) +{ + return ((sbp)->sb_versionnum == XFS_SB_VERSION_2) || \ + ((sbp)->sb_versionnum == XFS_SB_VERSION_3) || \ + ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + ((sbp)->sb_versionnum & XFS_SB_VERSION_ATTRBIT)); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_ADDATTR) -void xfs_sb_version_addattr(xfs_sb_t *sbp); #define XFS_SB_VERSION_ADDATTR(sbp) xfs_sb_version_addattr(sbp) -#else -#define XFS_SB_VERSION_ADDATTR(sbp) \ - ((sbp)->sb_versionnum = \ - (((sbp)->sb_versionnum == XFS_SB_VERSION_1) ? \ +static inline void xfs_sb_version_addattr(xfs_sb_t *sbp) +{ + (sbp)->sb_versionnum = (((sbp)->sb_versionnum == XFS_SB_VERSION_1) ? \ XFS_SB_VERSION_2 : \ ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) ? \ ((sbp)->sb_versionnum | XFS_SB_VERSION_ATTRBIT) : \ - (XFS_SB_VERSION_4 | XFS_SB_VERSION_ATTRBIT)))) -#endif + (XFS_SB_VERSION_4 | XFS_SB_VERSION_ATTRBIT))); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_HASNLINK) -int xfs_sb_version_hasnlink(xfs_sb_t *sbp); #define XFS_SB_VERSION_HASNLINK(sbp) xfs_sb_version_hasnlink(sbp) -#else -#define XFS_SB_VERSION_HASNLINK(sbp) \ - (((sbp)->sb_versionnum == XFS_SB_VERSION_3) || \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_NLINKBIT))) -#endif +static inline int xfs_sb_version_hasnlink(xfs_sb_t *sbp) +{ + return ((sbp)->sb_versionnum == XFS_SB_VERSION_3) || \ + ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + ((sbp)->sb_versionnum & XFS_SB_VERSION_NLINKBIT)); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_ADDNLINK) -void xfs_sb_version_addnlink(xfs_sb_t *sbp); #define XFS_SB_VERSION_ADDNLINK(sbp) xfs_sb_version_addnlink(sbp) -#else -#define XFS_SB_VERSION_ADDNLINK(sbp) \ - ((sbp)->sb_versionnum = \ - ((sbp)->sb_versionnum <= XFS_SB_VERSION_2 ? \ +static inline void xfs_sb_version_addnlink(xfs_sb_t *sbp) +{ + (sbp)->sb_versionnum = ((sbp)->sb_versionnum <= XFS_SB_VERSION_2 ? \ XFS_SB_VERSION_3 : \ - ((sbp)->sb_versionnum | XFS_SB_VERSION_NLINKBIT))) -#endif + ((sbp)->sb_versionnum | XFS_SB_VERSION_NLINKBIT)); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_HASQUOTA) -int xfs_sb_version_hasquota(xfs_sb_t *sbp); #define XFS_SB_VERSION_HASQUOTA(sbp) xfs_sb_version_hasquota(sbp) -#else -#define XFS_SB_VERSION_HASQUOTA(sbp) \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_QUOTABIT)) -#endif +static inline int xfs_sb_version_hasquota(xfs_sb_t *sbp) +{ + return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + ((sbp)->sb_versionnum & XFS_SB_VERSION_QUOTABIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_ADDQUOTA) -void xfs_sb_version_addquota(xfs_sb_t *sbp); #define XFS_SB_VERSION_ADDQUOTA(sbp) xfs_sb_version_addquota(sbp) -#else -#define XFS_SB_VERSION_ADDQUOTA(sbp) \ - ((sbp)->sb_versionnum = \ - (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 ? \ - ((sbp)->sb_versionnum | XFS_SB_VERSION_QUOTABIT) : \ - (XFS_SB_VERSION_TONEW((sbp)->sb_versionnum) | \ - XFS_SB_VERSION_QUOTABIT))) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_HASALIGN) -int xfs_sb_version_hasalign(xfs_sb_t *sbp); +static inline void xfs_sb_version_addquota(xfs_sb_t *sbp) +{ + (sbp)->sb_versionnum = \ + (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4 ? \ + ((sbp)->sb_versionnum | XFS_SB_VERSION_QUOTABIT) : \ + (XFS_SB_VERSION_TONEW((sbp)->sb_versionnum) | \ + XFS_SB_VERSION_QUOTABIT)); +} + #define XFS_SB_VERSION_HASALIGN(sbp) xfs_sb_version_hasalign(sbp) -#else -#define XFS_SB_VERSION_HASALIGN(sbp) \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_ALIGNBIT)) -#endif +static inline int xfs_sb_version_hasalign(xfs_sb_t *sbp) +{ + return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + ((sbp)->sb_versionnum & XFS_SB_VERSION_ALIGNBIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_SUBALIGN) -void xfs_sb_version_subalign(xfs_sb_t *sbp); #define XFS_SB_VERSION_SUBALIGN(sbp) xfs_sb_version_subalign(sbp) -#else -#define XFS_SB_VERSION_SUBALIGN(sbp) \ - ((sbp)->sb_versionnum = \ - XFS_SB_VERSION_TOOLD((sbp)->sb_versionnum & ~XFS_SB_VERSION_ALIGNBIT)) -#endif +static inline void xfs_sb_version_subalign(xfs_sb_t *sbp) +{ + (sbp)->sb_versionnum = \ + XFS_SB_VERSION_TOOLD((sbp)->sb_versionnum & ~XFS_SB_VERSION_ALIGNBIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_HASDALIGN) -int xfs_sb_version_hasdalign(xfs_sb_t *sbp); #define XFS_SB_VERSION_HASDALIGN(sbp) xfs_sb_version_hasdalign(sbp) -#else -#define XFS_SB_VERSION_HASDALIGN(sbp) \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_DALIGNBIT)) -#endif +static inline int xfs_sb_version_hasdalign(xfs_sb_t *sbp) +{ + return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + ((sbp)->sb_versionnum & XFS_SB_VERSION_DALIGNBIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_ADDDALIGN) -int xfs_sb_version_adddalign(xfs_sb_t *sbp); #define XFS_SB_VERSION_ADDDALIGN(sbp) xfs_sb_version_adddalign(sbp) -#else -#define XFS_SB_VERSION_ADDDALIGN(sbp) \ - ((sbp)->sb_versionnum = \ - ((sbp)->sb_versionnum | XFS_SB_VERSION_DALIGNBIT)) -#endif +static inline int xfs_sb_version_adddalign(xfs_sb_t *sbp) +{ + return (sbp)->sb_versionnum = \ + ((sbp)->sb_versionnum | XFS_SB_VERSION_DALIGNBIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_HASSHARED) -int xfs_sb_version_hasshared(xfs_sb_t *sbp); #define XFS_SB_VERSION_HASSHARED(sbp) xfs_sb_version_hasshared(sbp) -#else -#define XFS_SB_VERSION_HASSHARED(sbp) \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_SHAREDBIT)) -#endif +static inline int xfs_sb_version_hasshared(xfs_sb_t *sbp) +{ + return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + ((sbp)->sb_versionnum & XFS_SB_VERSION_SHAREDBIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_ADDSHARED) -int xfs_sb_version_addshared(xfs_sb_t *sbp); #define XFS_SB_VERSION_ADDSHARED(sbp) xfs_sb_version_addshared(sbp) -#else -#define XFS_SB_VERSION_ADDSHARED(sbp) \ - ((sbp)->sb_versionnum = \ - ((sbp)->sb_versionnum | XFS_SB_VERSION_SHAREDBIT)) -#endif +static inline int xfs_sb_version_addshared(xfs_sb_t *sbp) +{ + return (sbp)->sb_versionnum = \ + ((sbp)->sb_versionnum | XFS_SB_VERSION_SHAREDBIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_SUBSHARED) -int xfs_sb_version_subshared(xfs_sb_t *sbp); #define XFS_SB_VERSION_SUBSHARED(sbp) xfs_sb_version_subshared(sbp) -#else -#define XFS_SB_VERSION_SUBSHARED(sbp) \ - ((sbp)->sb_versionnum = \ - ((sbp)->sb_versionnum & ~XFS_SB_VERSION_SHAREDBIT)) -#endif +static inline int xfs_sb_version_subshared(xfs_sb_t *sbp) +{ + return (sbp)->sb_versionnum = \ + ((sbp)->sb_versionnum & ~XFS_SB_VERSION_SHAREDBIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_HASDIRV2) -int xfs_sb_version_hasdirv2(xfs_sb_t *sbp); #define XFS_SB_VERSION_HASDIRV2(sbp) xfs_sb_version_hasdirv2(sbp) -#else -#define XFS_SB_VERSION_HASDIRV2(sbp) \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_DIRV2BIT)) -#endif +static inline int xfs_sb_version_hasdirv2(xfs_sb_t *sbp) +{ + return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + ((sbp)->sb_versionnum & XFS_SB_VERSION_DIRV2BIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_HASLOGV2) -int xfs_sb_version_haslogv2(xfs_sb_t *sbp); #define XFS_SB_VERSION_HASLOGV2(sbp) xfs_sb_version_haslogv2(sbp) -#else -#define XFS_SB_VERSION_HASLOGV2(sbp) \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_LOGV2BIT)) -#endif +static inline int xfs_sb_version_haslogv2(xfs_sb_t *sbp) +{ + return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + ((sbp)->sb_versionnum & XFS_SB_VERSION_LOGV2BIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_HASEXTFLGBIT) -int xfs_sb_version_hasextflgbit(xfs_sb_t *sbp); #define XFS_SB_VERSION_HASEXTFLGBIT(sbp) xfs_sb_version_hasextflgbit(sbp) -#else -#define XFS_SB_VERSION_HASEXTFLGBIT(sbp) \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_EXTFLGBIT)) -#endif +static inline int xfs_sb_version_hasextflgbit(xfs_sb_t *sbp) +{ + return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + ((sbp)->sb_versionnum & XFS_SB_VERSION_EXTFLGBIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_ADDEXTFLGBIT) -int xfs_sb_version_addextflgbit(xfs_sb_t *sbp); #define XFS_SB_VERSION_ADDEXTFLGBIT(sbp) xfs_sb_version_addextflgbit(sbp) -#else -#define XFS_SB_VERSION_ADDEXTFLGBIT(sbp) \ - ((sbp)->sb_versionnum = \ - ((sbp)->sb_versionnum | XFS_SB_VERSION_EXTFLGBIT)) -#endif +static inline int xfs_sb_version_addextflgbit(xfs_sb_t *sbp) +{ + return (sbp)->sb_versionnum = \ + ((sbp)->sb_versionnum | XFS_SB_VERSION_EXTFLGBIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_SUBEXTFLGBIT) -int xfs_sb_version_subextflgbit(xfs_sb_t *sbp); #define XFS_SB_VERSION_SUBEXTFLGBIT(sbp) xfs_sb_version_subextflgbit(sbp) -#else -#define XFS_SB_VERSION_SUBEXTFLGBIT(sbp) \ - ((sbp)->sb_versionnum = \ - ((sbp)->sb_versionnum & ~XFS_SB_VERSION_EXTFLGBIT)) -#endif +static inline int xfs_sb_version_subextflgbit(xfs_sb_t *sbp) +{ + return (sbp)->sb_versionnum = \ + ((sbp)->sb_versionnum & ~XFS_SB_VERSION_EXTFLGBIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_HASSECTOR) -int xfs_sb_version_hassector(xfs_sb_t *sbp); #define XFS_SB_VERSION_HASSECTOR(sbp) xfs_sb_version_hassector(sbp) -#else -#define XFS_SB_VERSION_HASSECTOR(sbp) \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_SECTORBIT)) -#endif +static inline int xfs_sb_version_hassector(xfs_sb_t *sbp) +{ + return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + ((sbp)->sb_versionnum & XFS_SB_VERSION_SECTORBIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_HASMOREBITSBIT) -int xfs_sb_version_hasmorebits(xfs_sb_t *sbp); #define XFS_SB_VERSION_HASMOREBITS(sbp) xfs_sb_version_hasmorebits(sbp) -#else -#define XFS_SB_VERSION_HASMOREBITS(sbp) \ - ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ - ((sbp)->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT)) -#endif +static inline int xfs_sb_version_hasmorebits(xfs_sb_t *sbp) +{ + return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \ + ((sbp)->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT); +} /* * sb_features2 bit version macros. @@ -512,65 +457,36 @@ int xfs_sb_version_hasmorebits(xfs_sb_t *sbp); * ((XFS_SB_VERSION_HASMOREBITS(sbp) && * ((sbp)->sb_features2 & XFS_SB_VERSION2_FUNBIT) */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_HASATTR2) -int xfs_sb_version_hasattr2(xfs_sb_t *sbp); + #define XFS_SB_VERSION_HASATTR2(sbp) xfs_sb_version_hasattr2(sbp) -#else -#define XFS_SB_VERSION_HASATTR2(sbp) \ - ((XFS_SB_VERSION_HASMOREBITS(sbp)) && \ - ((sbp)->sb_features2 & XFS_SB_VERSION2_ATTR2BIT)) -#endif +static inline int xfs_sb_version_hasattr2(xfs_sb_t *sbp) +{ + return (XFS_SB_VERSION_HASMOREBITS(sbp)) && \ + ((sbp)->sb_features2 & XFS_SB_VERSION2_ATTR2BIT); +} -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_VERSION_ADDATTR2) -void xfs_sb_version_addattr2(xfs_sb_t *sbp); #define XFS_SB_VERSION_ADDATTR2(sbp) xfs_sb_version_addattr2(sbp) -#else -#define XFS_SB_VERSION_ADDATTR2(sbp) \ +static inline void xfs_sb_version_addattr2(xfs_sb_t *sbp) +{ ((sbp)->sb_versionnum = \ ((sbp)->sb_versionnum | XFS_SB_VERSION_MOREBITSBIT), \ ((sbp)->sb_features2 = \ - ((sbp)->sb_features2 | XFS_SB_VERSION2_ATTR2BIT))) -#endif + ((sbp)->sb_features2 | XFS_SB_VERSION2_ATTR2BIT))); +} + /* * end of superblock version macros */ -#define XFS_SB_DADDR ((xfs_daddr_t)0) /* daddr in filesystem/ag */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_SB_BLOCK) -xfs_agblock_t xfs_sb_block(struct xfs_mount *mp); -#define XFS_SB_BLOCK(mp) xfs_sb_block(mp) -#else +#define XFS_SB_DADDR ((xfs_daddr_t)0) /* daddr in filesystem/ag */ #define XFS_SB_BLOCK(mp) XFS_HDR_BLOCK(mp, XFS_SB_DADDR) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_HDR_BLOCK) -xfs_agblock_t xfs_hdr_block(struct xfs_mount *mp, xfs_daddr_t d); -#define XFS_HDR_BLOCK(mp,d) xfs_hdr_block(mp,d) -#else -#define XFS_HDR_BLOCK(mp,d) ((xfs_agblock_t)(XFS_BB_TO_FSBT(mp,d))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_DADDR_TO_FSB) -xfs_fsblock_t xfs_daddr_to_fsb(struct xfs_mount *mp, xfs_daddr_t d); -#define XFS_DADDR_TO_FSB(mp,d) xfs_daddr_to_fsb(mp,d) -#else -#define XFS_DADDR_TO_FSB(mp,d) \ - XFS_AGB_TO_FSB(mp, XFS_DADDR_TO_AGNO(mp,d), XFS_DADDR_TO_AGBNO(mp,d)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_FSB_TO_DADDR) -xfs_daddr_t xfs_fsb_to_daddr(struct xfs_mount *mp, xfs_fsblock_t fsbno); -#define XFS_FSB_TO_DADDR(mp,fsbno) xfs_fsb_to_daddr(mp,fsbno) -#else -#define XFS_FSB_TO_DADDR(mp,fsbno) \ - XFS_AGB_TO_DADDR(mp, XFS_FSB_TO_AGNO(mp,fsbno), \ - XFS_FSB_TO_AGBNO(mp,fsbno)) -#endif - -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_BUF_TO_SBP) -xfs_sb_t *xfs_buf_to_sbp(struct xfs_buf *bp); -#define XFS_BUF_TO_SBP(bp) xfs_buf_to_sbp(bp) -#else #define XFS_BUF_TO_SBP(bp) ((xfs_sb_t *)XFS_BUF_PTR(bp)) -#endif + +#define XFS_HDR_BLOCK(mp,d) ((xfs_agblock_t)XFS_BB_TO_FSBT(mp,d)) +#define XFS_DADDR_TO_FSB(mp,d) XFS_AGB_TO_FSB(mp, \ + XFS_DADDR_TO_AGNO(mp,d), XFS_DADDR_TO_AGBNO(mp,d)) +#define XFS_FSB_TO_DADDR(mp,fsbno) XFS_AGB_TO_DADDR(mp, \ + XFS_FSB_TO_AGNO(mp,fsbno), XFS_FSB_TO_AGBNO(mp,fsbno)) /* * File system sector to basic block conversions. diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index 5e33891b804..d14adef65a2 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c @@ -29,12 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -43,21 +43,21 @@ #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_error.h" -#include "xfs_trans_priv.h" -#include "xfs_alloc_btree.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_alloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" #include "xfs_inode.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" +#include "xfs_alloc.h" #include "xfs_bmap.h" -#include "xfs_da_btree.h" #include "xfs_quota.h" +#include "xfs_trans_priv.h" #include "xfs_trans_space.h" diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h index 0f333fba187..6381669a34a 100644 --- a/fs/xfs/xfs_trans.h +++ b/fs/xfs/xfs_trans.h @@ -234,68 +234,67 @@ typedef struct xfs_log_item_chunk { * lic_unused to the right value (0 matches all free). The * lic_descs.lid_index values are set up as each desc is allocated. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LIC_INIT) -void xfs_lic_init(xfs_log_item_chunk_t *cp); #define XFS_LIC_INIT(cp) xfs_lic_init(cp) -#else -#define XFS_LIC_INIT(cp) ((cp)->lic_free = XFS_LIC_FREEMASK) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LIC_INIT_SLOT) -void xfs_lic_init_slot(xfs_log_item_chunk_t *cp, int slot); +static inline void xfs_lic_init(xfs_log_item_chunk_t *cp) +{ + cp->lic_free = XFS_LIC_FREEMASK; +} + #define XFS_LIC_INIT_SLOT(cp,slot) xfs_lic_init_slot(cp, slot) -#else -#define XFS_LIC_INIT_SLOT(cp,slot) \ - ((cp)->lic_descs[slot].lid_index = (unsigned char)(slot)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LIC_VACANCY) -int xfs_lic_vacancy(xfs_log_item_chunk_t *cp); +static inline void xfs_lic_init_slot(xfs_log_item_chunk_t *cp, int slot) +{ + cp->lic_descs[slot].lid_index = (unsigned char)(slot); +} + #define XFS_LIC_VACANCY(cp) xfs_lic_vacancy(cp) -#else -#define XFS_LIC_VACANCY(cp) (((cp)->lic_free) & XFS_LIC_FREEMASK) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LIC_ALL_FREE) -void xfs_lic_all_free(xfs_log_item_chunk_t *cp); +static inline int xfs_lic_vacancy(xfs_log_item_chunk_t *cp) +{ + return cp->lic_free & XFS_LIC_FREEMASK; +} + #define XFS_LIC_ALL_FREE(cp) xfs_lic_all_free(cp) -#else -#define XFS_LIC_ALL_FREE(cp) ((cp)->lic_free = XFS_LIC_FREEMASK) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LIC_ARE_ALL_FREE) -int xfs_lic_are_all_free(xfs_log_item_chunk_t *cp); +static inline void xfs_lic_all_free(xfs_log_item_chunk_t *cp) +{ + cp->lic_free = XFS_LIC_FREEMASK; +} + #define XFS_LIC_ARE_ALL_FREE(cp) xfs_lic_are_all_free(cp) -#else -#define XFS_LIC_ARE_ALL_FREE(cp) (((cp)->lic_free & XFS_LIC_FREEMASK) ==\ - XFS_LIC_FREEMASK) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LIC_ISFREE) -int xfs_lic_isfree(xfs_log_item_chunk_t *cp, int slot); +static inline int xfs_lic_are_all_free(xfs_log_item_chunk_t *cp) +{ + return ((cp->lic_free & XFS_LIC_FREEMASK) == XFS_LIC_FREEMASK); +} + #define XFS_LIC_ISFREE(cp,slot) xfs_lic_isfree(cp,slot) -#else -#define XFS_LIC_ISFREE(cp,slot) ((cp)->lic_free & (1 << (slot))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LIC_CLAIM) -void xfs_lic_claim(xfs_log_item_chunk_t *cp, int slot); +static inline int xfs_lic_isfree(xfs_log_item_chunk_t *cp, int slot) +{ + return (cp->lic_free & (1 << slot)); +} + #define XFS_LIC_CLAIM(cp,slot) xfs_lic_claim(cp,slot) -#else -#define XFS_LIC_CLAIM(cp,slot) ((cp)->lic_free &= ~(1 << (slot))) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LIC_RELSE) -void xfs_lic_relse(xfs_log_item_chunk_t *cp, int slot); +static inline void xfs_lic_claim(xfs_log_item_chunk_t *cp, int slot) +{ + cp->lic_free &= ~(1 << slot); +} + #define XFS_LIC_RELSE(cp,slot) xfs_lic_relse(cp,slot) -#else -#define XFS_LIC_RELSE(cp,slot) ((cp)->lic_free |= 1 << (slot)) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LIC_SLOT) -xfs_log_item_desc_t *xfs_lic_slot(xfs_log_item_chunk_t *cp, int slot); +static inline void xfs_lic_relse(xfs_log_item_chunk_t *cp, int slot) +{ + cp->lic_free |= 1 << slot; +} + #define XFS_LIC_SLOT(cp,slot) xfs_lic_slot(cp,slot) -#else -#define XFS_LIC_SLOT(cp,slot) (&((cp)->lic_descs[slot])) -#endif -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LIC_DESC_TO_SLOT) -int xfs_lic_desc_to_slot(xfs_log_item_desc_t *dp); +static inline xfs_log_item_desc_t * +xfs_lic_slot(xfs_log_item_chunk_t *cp, int slot) +{ + return &(cp->lic_descs[slot]); +} + #define XFS_LIC_DESC_TO_SLOT(dp) xfs_lic_desc_to_slot(dp) -#else -#define XFS_LIC_DESC_TO_SLOT(dp) ((uint)((dp)->lid_index)) -#endif +static inline int xfs_lic_desc_to_slot(xfs_log_item_desc_t *dp) +{ + return (uint)dp->lid_index; +} + /* * Calculate the address of a chunk given a descriptor pointer: * dp - dp->lid_index give the address of the start of the lic_descs array. @@ -303,15 +302,14 @@ int xfs_lic_desc_to_slot(xfs_log_item_desc_t *dp); * All of this yields the address of the chunk, which is * cast to a chunk pointer. */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_LIC_DESC_TO_CHUNK) -xfs_log_item_chunk_t *xfs_lic_desc_to_chunk(xfs_log_item_desc_t *dp); #define XFS_LIC_DESC_TO_CHUNK(dp) xfs_lic_desc_to_chunk(dp) -#else -#define XFS_LIC_DESC_TO_CHUNK(dp) ((xfs_log_item_chunk_t*) \ - (((xfs_caddr_t)((dp) - (dp)->lid_index)) -\ - (xfs_caddr_t)(((xfs_log_item_chunk_t*) \ - 0)->lic_descs))) -#endif +static inline xfs_log_item_chunk_t * +xfs_lic_desc_to_chunk(xfs_log_item_desc_t *dp) +{ + return (xfs_log_item_chunk_t*) \ + (((xfs_caddr_t)((dp) - (dp)->lid_index)) - \ + (xfs_caddr_t)(((xfs_log_item_chunk_t*)0)->lic_descs)); +} #ifdef __KERNEL__ /* @@ -328,7 +326,7 @@ typedef struct xfs_log_busy_slot { #define XFS_LBC_NUM_SLOTS 31 typedef struct xfs_log_busy_chunk { struct xfs_log_busy_chunk *lbc_next; - uint lbc_free; /* bitmask of free slots */ + uint lbc_free; /* free slots bitmask */ ushort lbc_unused; /* first unused */ xfs_log_busy_slot_t lbc_busy[XFS_LBC_NUM_SLOTS]; } xfs_log_busy_chunk_t; diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c index 2a71b4f91bf..f248cb60ff7 100644 --- a/fs/xfs/xfs_trans_ail.c +++ b/fs/xfs/xfs_trans_ail.c @@ -29,12 +29,11 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_dir.h" diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index e733293dd7f..24630da76a2 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/xfs/xfs_trans_buf.c @@ -29,19 +29,28 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" -#include "xfs_buf_item.h" #include "xfs_sb.h" #include "xfs_ag.h" #include "xfs_dir.h" +#include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" +#include "xfs_ialloc_btree.h" +#include "xfs_dir_sf.h" +#include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" +#include "xfs_dinode.h" +#include "xfs_inode.h" +#include "xfs_buf_item.h" #include "xfs_trans_priv.h" #include "xfs_error.h" #include "xfs_rw.h" diff --git a/fs/xfs/xfs_trans_extfree.c b/fs/xfs/xfs_trans_extfree.c index 93259a15f98..1f6b17777f2 100644 --- a/fs/xfs/xfs_trans_extfree.c +++ b/fs/xfs/xfs_trans_extfree.c @@ -29,12 +29,11 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_dir.h" diff --git a/fs/xfs/xfs_trans_inode.c b/fs/xfs/xfs_trans_inode.c index 7e7631ca497..060b1a72eef 100644 --- a/fs/xfs/xfs_trans_inode.c +++ b/fs/xfs/xfs_trans_inode.c @@ -29,12 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -42,18 +42,18 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_trans_priv.h" -#include "xfs_alloc_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" +#include "xfs_trans_priv.h" +#include "xfs_inode_item.h" #ifdef XFS_TRANS_DEBUG STATIC void diff --git a/fs/xfs/xfs_trans_item.c b/fs/xfs/xfs_trans_item.c index 1b8a756d80e..8edfb151df1 100644 --- a/fs/xfs/xfs_trans_item.c +++ b/fs/xfs/xfs_trans_item.c @@ -29,12 +29,11 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" STATIC int xfs_trans_unlock_chunk(xfs_log_item_chunk_t *, diff --git a/fs/xfs/xfs_utils.c b/fs/xfs/xfs_utils.c index 11351f08d43..c6459514fad 100644 --- a/fs/xfs/xfs_utils.c +++ b/fs/xfs/xfs_utils.c @@ -29,25 +29,26 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" #include "xfs_bmap_btree.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_inode_item.h" #include "xfs_bmap.h" #include "xfs_error.h" #include "xfs_quota.h" diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 200e0c50acf..9ea201762a9 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c @@ -1,6 +1,4 @@ /* - * XFS filesystem operations. - * * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it @@ -31,44 +29,44 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" +#include "xfs_ag.h" #include "xfs_dir.h" #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" #include "xfs_ialloc_btree.h" #include "xfs_alloc_btree.h" -#include "xfs_btree.h" -#include "xfs_alloc.h" -#include "xfs_ialloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" -#include "xfs_ag.h" +#include "xfs_inode_item.h" +#include "xfs_btree.h" +#include "xfs_alloc.h" +#include "xfs_ialloc.h" +#include "xfs_quota.h" #include "xfs_error.h" #include "xfs_bmap.h" -#include "xfs_da_btree.h" #include "xfs_rw.h" #include "xfs_refcache.h" #include "xfs_buf_item.h" -#include "xfs_extfree_item.h" -#include "xfs_quota.h" +#include "xfs_log_priv.h" #include "xfs_dir2_trace.h" +#include "xfs_extfree_item.h" #include "xfs_acl.h" #include "xfs_attr.h" #include "xfs_clnt.h" -#include "xfs_log_priv.h" STATIC int xfs_sync(bhv_desc_t *, int, cred_t *); diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 8221b11a48c..443ec6a0b2b 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c @@ -29,12 +29,12 @@ * * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ */ - #include "xfs.h" -#include "xfs_macros.h" +#include "xfs_fs.h" #include "xfs_types.h" -#include "xfs_inum.h" +#include "xfs_bit.h" #include "xfs_log.h" +#include "xfs_inum.h" #include "xfs_trans.h" #include "xfs_sb.h" #include "xfs_ag.h" @@ -42,33 +42,32 @@ #include "xfs_dir2.h" #include "xfs_dmapi.h" #include "xfs_mount.h" -#include "xfs_alloc_btree.h" +#include "xfs_da_btree.h" #include "xfs_bmap_btree.h" +#include "xfs_alloc_btree.h" #include "xfs_ialloc_btree.h" -#include "xfs_itable.h" -#include "xfs_btree.h" -#include "xfs_ialloc.h" -#include "xfs_alloc.h" -#include "xfs_attr_sf.h" #include "xfs_dir_sf.h" #include "xfs_dir2_sf.h" +#include "xfs_attr_sf.h" #include "xfs_dinode.h" -#include "xfs_inode_item.h" #include "xfs_inode.h" +#include "xfs_inode_item.h" +#include "xfs_dir_leaf.h" +#include "xfs_itable.h" +#include "xfs_btree.h" +#include "xfs_ialloc.h" +#include "xfs_alloc.h" #include "xfs_bmap.h" -#include "xfs_da_btree.h" #include "xfs_attr.h" #include "xfs_rw.h" -#include "xfs_refcache.h" #include "xfs_error.h" -#include "xfs_bit.h" -#include "xfs_rtalloc.h" #include "xfs_quota.h" #include "xfs_utils.h" +#include "xfs_rtalloc.h" +#include "xfs_refcache.h" #include "xfs_trans_space.h" -#include "xfs_dir_leaf.h" -#include "xfs_mac.h" #include "xfs_log_priv.h" +#include "xfs_mac.h" /* -- cgit v1.2.3-70-g09d2 From 7b71876980d87c8f237b94d8529ee7fcc05ec2d9 Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Wed, 2 Nov 2005 14:58:39 +1100 Subject: [XFS] Update license/copyright notices to match the prefered SGI boilerplate. SGI-PV: 913862 SGI-Modid: xfs-linux:xfs-kern:23903a Signed-off-by: Nathan Scott --- fs/xfs/linux-2.6/kmem.c | 38 ++++++--------------- fs/xfs/linux-2.6/kmem.h | 36 ++++++-------------- fs/xfs/linux-2.6/mrlock.h | 36 ++++++-------------- fs/xfs/linux-2.6/mutex.h | 36 ++++++-------------- fs/xfs/linux-2.6/sema.h | 36 ++++++-------------- fs/xfs/linux-2.6/spin.h | 36 ++++++-------------- fs/xfs/linux-2.6/sv.h | 36 ++++++-------------- fs/xfs/linux-2.6/time.h | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_aops.c | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_aops.h | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_buf.c | 62 ++++++---------------------------- fs/xfs/linux-2.6/xfs_buf.h | 41 ++++++----------------- fs/xfs/linux-2.6/xfs_cred.h | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_export.c | 44 ++++++++---------------- fs/xfs/linux-2.6/xfs_export.h | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_file.c | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_fs_subr.c | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_fs_subr.h | 57 +++++++++++-------------------- fs/xfs/linux-2.6/xfs_globals.c | 42 ++++++----------------- fs/xfs/linux-2.6/xfs_globals.h | 41 ++++++----------------- fs/xfs/linux-2.6/xfs_ioctl.c | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_ioctl32.c | 38 ++++++--------------- fs/xfs/linux-2.6/xfs_ioctl32.h | 44 ++++++++++-------------- fs/xfs/linux-2.6/xfs_iops.c | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_iops.h | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_linux.h | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_lrw.c | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_lrw.h | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_stats.c | 37 ++++++--------------- fs/xfs/linux-2.6/xfs_stats.h | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_super.c | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_super.h | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_sysctl.c | 38 ++++++--------------- fs/xfs/linux-2.6/xfs_sysctl.h | 37 ++++++--------------- fs/xfs/linux-2.6/xfs_version.h | 41 ++++++++--------------- fs/xfs/linux-2.6/xfs_vfs.c | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_vfs.h | 36 ++++++-------------- fs/xfs/linux-2.6/xfs_vnode.c | 39 ++++++---------------- fs/xfs/linux-2.6/xfs_vnode.h | 36 ++++++-------------- fs/xfs/quota/Makefile-linux-2.6 | 36 ++++++-------------- fs/xfs/support/debug.c | 38 ++++++--------------- fs/xfs/support/debug.h | 36 ++++++-------------- fs/xfs/support/ktrace.c | 37 ++++++--------------- fs/xfs/support/ktrace.h | 36 ++++++-------------- fs/xfs/support/move.c | 37 ++++++--------------- fs/xfs/support/move.h | 36 ++++++-------------- fs/xfs/support/qsort.c | 1 - fs/xfs/support/qsort.h | 49 +++++++++------------------ fs/xfs/support/uuid.c | 37 ++++++--------------- fs/xfs/support/uuid.h | 52 +++++++++++------------------ fs/xfs/xfs.h | 41 +++++++++-------------- fs/xfs/xfs_acl.c | 36 ++++++-------------- fs/xfs/xfs_acl.h | 36 ++++++-------------- fs/xfs/xfs_ag.h | 36 ++++++-------------- fs/xfs/xfs_alloc.c | 36 ++++++-------------- fs/xfs/xfs_alloc.h | 36 ++++++-------------- fs/xfs/xfs_alloc_btree.c | 36 ++++++-------------- fs/xfs/xfs_alloc_btree.h | 36 ++++++-------------- fs/xfs/xfs_arch.h | 36 ++++++-------------- fs/xfs/xfs_attr.c | 37 ++++++--------------- fs/xfs/xfs_attr.h | 36 ++++++-------------- fs/xfs/xfs_attr_leaf.c | 36 ++++++-------------- fs/xfs/xfs_attr_leaf.h | 35 ++++++------------- fs/xfs/xfs_attr_sf.h | 36 ++++++-------------- fs/xfs/xfs_behavior.c | 37 ++++++--------------- fs/xfs/xfs_behavior.h | 36 ++++++-------------- fs/xfs/xfs_bit.c | 44 ++++++++---------------- fs/xfs/xfs_bit.h | 36 ++++++-------------- fs/xfs/xfs_bmap.c | 36 ++++++-------------- fs/xfs/xfs_bmap.h | 36 ++++++-------------- fs/xfs/xfs_bmap_btree.c | 36 ++++++-------------- fs/xfs/xfs_bmap_btree.h | 36 ++++++-------------- fs/xfs/xfs_btree.c | 36 ++++++-------------- fs/xfs/xfs_btree.h | 36 ++++++-------------- fs/xfs/xfs_buf_item.c | 36 ++++++-------------- fs/xfs/xfs_buf_item.h | 36 ++++++-------------- fs/xfs/xfs_cap.h | 36 ++++++-------------- fs/xfs/xfs_clnt.h | 36 ++++++-------------- fs/xfs/xfs_da_btree.c | 36 ++++++-------------- fs/xfs/xfs_da_btree.h | 36 ++++++-------------- fs/xfs/xfs_dfrag.c | 36 ++++++-------------- fs/xfs/xfs_dfrag.h | 36 ++++++-------------- fs/xfs/xfs_dinode.h | 36 ++++++-------------- fs/xfs/xfs_dir.c | 36 ++++++-------------- fs/xfs/xfs_dir.h | 36 ++++++-------------- fs/xfs/xfs_dir2.c | 36 ++++++-------------- fs/xfs/xfs_dir2.h | 36 ++++++-------------- fs/xfs/xfs_dir2_block.c | 36 ++++++-------------- fs/xfs/xfs_dir2_block.h | 36 ++++++-------------- fs/xfs/xfs_dir2_data.c | 36 ++++++-------------- fs/xfs/xfs_dir2_data.h | 36 ++++++-------------- fs/xfs/xfs_dir2_leaf.c | 36 ++++++-------------- fs/xfs/xfs_dir2_leaf.h | 40 ++++++---------------- fs/xfs/xfs_dir2_node.c | 36 ++++++-------------- fs/xfs/xfs_dir2_node.h | 36 ++++++-------------- fs/xfs/xfs_dir2_sf.c | 36 ++++++-------------- fs/xfs/xfs_dir2_sf.h | 36 ++++++-------------- fs/xfs/xfs_dir2_trace.c | 36 ++++++-------------- fs/xfs/xfs_dir2_trace.h | 36 ++++++-------------- fs/xfs/xfs_dir_leaf.c | 36 ++++++-------------- fs/xfs/xfs_dir_leaf.h | 36 ++++++-------------- fs/xfs/xfs_dir_sf.h | 36 ++++++-------------- fs/xfs/xfs_dmapi.h | 36 ++++++-------------- fs/xfs/xfs_dmops.c | 36 ++++++-------------- fs/xfs/xfs_error.c | 36 ++++++-------------- fs/xfs/xfs_error.h | 38 +++++++-------------- fs/xfs/xfs_extfree_item.c | 36 ++++++-------------- fs/xfs/xfs_extfree_item.h | 36 ++++++-------------- fs/xfs/xfs_fs.h | 39 +++++++--------------- fs/xfs/xfs_fsops.c | 36 ++++++-------------- fs/xfs/xfs_fsops.h | 74 ++++++++++------------------------------- fs/xfs/xfs_ialloc.c | 36 ++++++-------------- fs/xfs/xfs_ialloc.h | 36 ++++++-------------- fs/xfs/xfs_ialloc_btree.c | 48 ++++++-------------------- fs/xfs/xfs_ialloc_btree.h | 36 ++++++-------------- fs/xfs/xfs_iget.c | 36 ++++++-------------- fs/xfs/xfs_imap.h | 36 ++++++-------------- fs/xfs/xfs_inode.c | 36 ++++++-------------- fs/xfs/xfs_inode.h | 36 ++++++-------------- fs/xfs/xfs_inode_item.c | 36 ++++++-------------- fs/xfs/xfs_inode_item.h | 36 ++++++-------------- fs/xfs/xfs_inum.h | 36 ++++++-------------- fs/xfs/xfs_iocore.c | 36 ++++++-------------- fs/xfs/xfs_iomap.c | 36 ++++++-------------- fs/xfs/xfs_iomap.h | 36 ++++++-------------- fs/xfs/xfs_itable.c | 36 ++++++-------------- fs/xfs/xfs_itable.h | 33 +++++------------- fs/xfs/xfs_log.c | 36 ++++++-------------- fs/xfs/xfs_log.h | 36 ++++++-------------- fs/xfs/xfs_log_priv.h | 36 ++++++-------------- fs/xfs/xfs_log_recover.c | 36 ++++++-------------- fs/xfs/xfs_log_recover.h | 36 ++++++-------------- fs/xfs/xfs_mac.h | 36 ++++++-------------- fs/xfs/xfs_mount.c | 36 ++++++-------------- fs/xfs/xfs_mount.h | 38 ++++++--------------- fs/xfs/xfs_qmops.c | 36 ++++++-------------- fs/xfs/xfs_quota.h | 36 ++++++-------------- fs/xfs/xfs_rename.c | 36 ++++++-------------- fs/xfs/xfs_rtalloc.c | 36 ++++++-------------- fs/xfs/xfs_rtalloc.h | 36 ++++++-------------- fs/xfs/xfs_rw.c | 36 ++++++-------------- fs/xfs/xfs_rw.h | 36 ++++++-------------- fs/xfs/xfs_sb.h | 36 ++++++-------------- fs/xfs/xfs_trans.c | 36 ++++++-------------- fs/xfs/xfs_trans.h | 36 ++++++-------------- fs/xfs/xfs_trans_ail.c | 36 ++++++-------------- fs/xfs/xfs_trans_buf.c | 36 ++++++-------------- fs/xfs/xfs_trans_extfree.c | 36 ++++++-------------- fs/xfs/xfs_trans_inode.c | 36 ++++++-------------- fs/xfs/xfs_trans_item.c | 36 ++++++-------------- fs/xfs/xfs_trans_priv.h | 36 ++++++-------------- fs/xfs/xfs_trans_space.h | 36 ++++++-------------- fs/xfs/xfs_types.h | 36 ++++++-------------- fs/xfs/xfs_utils.c | 36 ++++++-------------- fs/xfs/xfs_utils.h | 36 ++++++-------------- fs/xfs/xfs_vfsops.c | 36 ++++++-------------- fs/xfs/xfs_vnodeops.c | 36 ++++++-------------- 157 files changed, 1762 insertions(+), 4056 deletions(-) (limited to 'fs/xfs/xfs_ialloc.c') diff --git a/fs/xfs/linux-2.6/kmem.c b/fs/xfs/linux-2.6/kmem.c index 3c92162dc72..1b4b91cb696 100644 --- a/fs/xfs/linux-2.6/kmem.c +++ b/fs/xfs/linux-2.6/kmem.c @@ -1,42 +1,26 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include #include #include #include #include #include - #include "time.h" #include "kmem.h" diff --git a/fs/xfs/linux-2.6/kmem.h b/fs/xfs/linux-2.6/kmem.h index f4bb78c268c..de4a60d9676 100644 --- a/fs/xfs/linux-2.6/kmem.h +++ b/fs/xfs/linux-2.6/kmem.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_SUPPORT_KMEM_H__ #define __XFS_SUPPORT_KMEM_H__ diff --git a/fs/xfs/linux-2.6/mrlock.h b/fs/xfs/linux-2.6/mrlock.h index d2c11a098ff..16b44c3c236 100644 --- a/fs/xfs/linux-2.6/mrlock.h +++ b/fs/xfs/linux-2.6/mrlock.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_SUPPORT_MRLOCK_H__ #define __XFS_SUPPORT_MRLOCK_H__ diff --git a/fs/xfs/linux-2.6/mutex.h b/fs/xfs/linux-2.6/mutex.h index 0b296bb944c..ce773d89a92 100644 --- a/fs/xfs/linux-2.6/mutex.h +++ b/fs/xfs/linux-2.6/mutex.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_SUPPORT_MUTEX_H__ #define __XFS_SUPPORT_MUTEX_H__ diff --git a/fs/xfs/linux-2.6/sema.h b/fs/xfs/linux-2.6/sema.h index 30b67b4e1cb..194a84490bd 100644 --- a/fs/xfs/linux-2.6/sema.h +++ b/fs/xfs/linux-2.6/sema.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_SUPPORT_SEMA_H__ #define __XFS_SUPPORT_SEMA_H__ diff --git a/fs/xfs/linux-2.6/spin.h b/fs/xfs/linux-2.6/spin.h index 0039504069a..50a6191178f 100644 --- a/fs/xfs/linux-2.6/spin.h +++ b/fs/xfs/linux-2.6/spin.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_SUPPORT_SPIN_H__ #define __XFS_SUPPORT_SPIN_H__ diff --git a/fs/xfs/linux-2.6/sv.h b/fs/xfs/linux-2.6/sv.h index 821d3167e05..9a8ad481b00 100644 --- a/fs/xfs/linux-2.6/sv.h +++ b/fs/xfs/linux-2.6/sv.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_SUPPORT_SV_H__ #define __XFS_SUPPORT_SV_H__ diff --git a/fs/xfs/linux-2.6/time.h b/fs/xfs/linux-2.6/time.h index b0d2873ab27..387e695a184 100644 --- a/fs/xfs/linux-2.6/time.h +++ b/fs/xfs/linux-2.6/time.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_SUPPORT_TIME_H__ #define __XFS_SUPPORT_TIME_H__ diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 8c05c3c3074..26c346d9de5 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_bit.h" diff --git a/fs/xfs/linux-2.6/xfs_aops.h b/fs/xfs/linux-2.6/xfs_aops.h index 2fa62974a04..4720758a9ad 100644 --- a/fs/xfs/linux-2.6/xfs_aops.h +++ b/fs/xfs/linux-2.6/xfs_aops.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_AOPS_H__ #define __XFS_AOPS_H__ diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 660c24acb64..e22cce1a9d5 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c @@ -1,46 +1,20 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - -/* - * The xfs_buf.c code provides an abstract buffer cache model on top - * of the Linux page cache. Cached metadata blocks for a file system - * are hashed to the inode for the block device. xfs_buf.c assembles - * buffers (xfs_buf_t) on demand to aggregate such cached pages for I/O. - * - * Written by Steve Lord, Jim Mostek, Russell Cattelan - * and Rajagopal Ananthanarayanan ("ananth") at SGI. - * - */ - #include #include #include @@ -55,13 +29,8 @@ #include #include #include - #include "xfs_linux.h" -/* - * File wide globals - */ - STATIC kmem_cache_t *pagebuf_zone; STATIC kmem_shaker_t pagebuf_shake; STATIC int xfsbufd_wakeup(int, gfp_t); @@ -70,10 +39,6 @@ STATIC void pagebuf_delwri_queue(xfs_buf_t *, int); STATIC struct workqueue_struct *xfslogd_workqueue; struct workqueue_struct *xfsdatad_workqueue; -/* - * Pagebuf debugging - */ - #ifdef PAGEBUF_TRACE void pagebuf_trace( @@ -112,10 +77,6 @@ ktrace_t *pagebuf_trace_buf; # define PB_GET_OWNER(pb) do { } while (0) #endif -/* - * Pagebuf allocation / freeing. - */ - #define pb_to_gfp(flags) \ ((((flags) & PBF_READ_AHEAD) ? __GFP_NORETRY : \ ((flags) & PBF_DONT_BLOCK) ? GFP_NOFS : GFP_KERNEL) | __GFP_NOWARN) @@ -123,7 +84,6 @@ ktrace_t *pagebuf_trace_buf; #define pb_to_km(flags) \ (((flags) & PBF_DONT_BLOCK) ? KM_NOFS : KM_SLEEP) - #define pagebuf_allocate(flags) \ kmem_zone_alloc(pagebuf_zone, pb_to_km(flags)) #define pagebuf_deallocate(pb) \ diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index 882901ca7ee..237a35b915d 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h @@ -1,39 +1,20 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - -/* - * Written by Steve Lord, Jim Mostek, Russell Cattelan at SGI - */ - #ifndef __XFS_BUF_H__ #define __XFS_BUF_H__ diff --git a/fs/xfs/linux-2.6/xfs_cred.h b/fs/xfs/linux-2.6/xfs_cred.h index 00c45849d41..4af49102472 100644 --- a/fs/xfs/linux-2.6/xfs_cred.h +++ b/fs/xfs/linux-2.6/xfs_cred.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_CRED_H__ #define __XFS_CRED_H__ diff --git a/fs/xfs/linux-2.6/xfs_export.c b/fs/xfs/linux-2.6/xfs_export.c index f372a1a5e16..3e97076437b 100644 --- a/fs/xfs/linux-2.6/xfs_export.c +++ b/fs/xfs/linux-2.6/xfs_export.c @@ -1,35 +1,20 @@ /* - * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2004-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include "xfs.h" #include "xfs_types.h" #include "xfs_dmapi.h" @@ -41,7 +26,7 @@ #include "xfs_export.h" /* - * XFS encode and decodes the fileid portion of NFS filehandles + * XFS encodes and decodes the fileid portion of NFS filehandles * itself instead of letting the generic NFS code do it. This * allows filesystems with 64 bit inode numbers to be exported. * @@ -51,7 +36,6 @@ * remains in that code. */ - STATIC struct dentry * linvfs_decode_fh( struct super_block *sb, @@ -92,7 +76,7 @@ linvfs_decode_fh( p = xfs_fileid_decode_fid2(p, &pfid, is64); parent = &pfid; } - + fh = (__u32 *)&ifid; return find_exported_dentry(sb, fh, parent, acceptable, context); } @@ -113,7 +97,7 @@ linvfs_encode_fh( #if XFS_BIG_INUMS vfs_t *vfs = LINVFS_GET_VFS(inode->i_sb); xfs_mount_t *mp = XFS_VFSTOM(vfs); - + if (!(mp->m_flags & XFS_MOUNT_32BITINOOPT)) { /* filesystem may contain 64bit inode numbers */ is64 = XFS_FILEID_TYPE_64FLAG; diff --git a/fs/xfs/linux-2.6/xfs_export.h b/fs/xfs/linux-2.6/xfs_export.h index 60b2abac1c1..e5b0559700a 100644 --- a/fs/xfs/linux-2.6/xfs_export.h +++ b/fs/xfs/linux-2.6/xfs_export.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_EXPORT_H__ #define __XFS_EXPORT_H__ diff --git a/fs/xfs/linux-2.6/xfs_file.c b/fs/xfs/linux-2.6/xfs_file.c index b0c00eaa79e..06111d0bbae 100644 --- a/fs/xfs/linux-2.6/xfs_file.c +++ b/fs/xfs/linux-2.6/xfs_file.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_bit.h" diff --git a/fs/xfs/linux-2.6/xfs_fs_subr.c b/fs/xfs/linux-2.6/xfs_fs_subr.c index 88134cba5cb..f89340c61bf 100644 --- a/fs/xfs/linux-2.6/xfs_fs_subr.c +++ b/fs/xfs/linux-2.6/xfs_fs_subr.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" diff --git a/fs/xfs/linux-2.6/xfs_fs_subr.h b/fs/xfs/linux-2.6/xfs_fs_subr.h index 2db9ddbd456..aee9ccdd18f 100644 --- a/fs/xfs/linux-2.6/xfs_fs_subr.h +++ b/fs/xfs/linux-2.6/xfs_fs_subr.h @@ -1,48 +1,29 @@ /* - * Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ - */ -#ifndef __XFS_SUBR_H__ -#define __XFS_SUBR_H__ - -/* - * Utilities shared among file system implementations. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef __XFS_FS_SUBR_H__ +#define __XFS_FS_SUBR_H__ struct cred; - -extern int fs_noerr(void); -extern int fs_nosys(void); -extern void fs_noval(void); -extern void fs_tosspages(bhv_desc_t *, xfs_off_t, xfs_off_t, int); -extern void fs_flushinval_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, int); -extern int fs_flush_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, uint64_t, int); +extern int fs_noerr(void); +extern int fs_nosys(void); +extern void fs_noval(void); +extern void fs_tosspages(bhv_desc_t *, xfs_off_t, xfs_off_t, int); +extern void fs_flushinval_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, int); +extern int fs_flush_pages(bhv_desc_t *, xfs_off_t, xfs_off_t, uint64_t, int); #endif /* __XFS_FS_SUBR_H__ */ diff --git a/fs/xfs/linux-2.6/xfs_globals.c b/fs/xfs/linux-2.6/xfs_globals.c index a6da5b4fd24..6e8085f3463 100644 --- a/fs/xfs/linux-2.6/xfs_globals.c +++ b/fs/xfs/linux-2.6/xfs_globals.c @@ -1,40 +1,20 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - -/* - * This file contains globals needed by XFS that were normally defined - * somewhere else in IRIX. - */ - #include "xfs.h" #include "xfs_cred.h" #include "xfs_sysctl.h" diff --git a/fs/xfs/linux-2.6/xfs_globals.h b/fs/xfs/linux-2.6/xfs_globals.h index e81e2f38a85..e1a22bfcf86 100644 --- a/fs/xfs/linux-2.6/xfs_globals.h +++ b/fs/xfs/linux-2.6/xfs_globals.h @@ -1,42 +1,23 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_GLOBALS_H__ #define __XFS_GLOBALS_H__ -/* - * This file declares globals needed by XFS that were normally defined - * somewhere else in IRIX. - */ - extern uint64_t xfs_panic_mask; /* set to cause more panics */ extern unsigned long xfs_physmem; extern struct cred *sys_cred; diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index d880e9c65fc..b78b5eb9e96 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c index 4636b7f86f1..c83ae15bb0e 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.c +++ b/fs/xfs/linux-2.6/xfs_ioctl32.c @@ -1,35 +1,20 @@ /* - * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2004-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include #include #include @@ -39,7 +24,6 @@ #include #include #include - #include "xfs.h" #include "xfs_types.h" #include "xfs_fs.h" diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.h b/fs/xfs/linux-2.6/xfs_ioctl32.h index c874793a1dc..011c273bec5 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.h +++ b/fs/xfs/linux-2.6/xfs_ioctl32.h @@ -1,34 +1,24 @@ /* - * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2004-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef __XFS_IOCTL32_H__ +#define __XFS_IOCTL32_H__ + +extern long linvfs_compat_ioctl(struct file *, unsigned, unsigned long); +extern long linvfs_compat_invis_ioctl(struct file *f, unsigned, unsigned long); -long linvfs_compat_ioctl(struct file *f, unsigned cmd, unsigned long arg); -long linvfs_compat_invis_ioctl(struct file *f, unsigned cmd, unsigned long arg); +#endif /* __XFS_IOCTL32_H__ */ diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 12d2a702c6c..14215a7db59 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/linux-2.6/xfs_iops.h b/fs/xfs/linux-2.6/xfs_iops.h index 415de44b6ae..ee784b63acb 100644 --- a/fs/xfs/linux-2.6/xfs_iops.h +++ b/fs/xfs/linux-2.6/xfs_iops.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_IOPS_H__ #define __XFS_IOPS_H__ diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h index 29a9f1536fb..52b24053953 100644 --- a/fs/xfs/linux-2.6/xfs_linux.h +++ b/fs/xfs/linux-2.6/xfs_linux.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_LINUX__ #define __XFS_LINUX__ diff --git a/fs/xfs/linux-2.6/xfs_lrw.c b/fs/xfs/linux-2.6/xfs_lrw.c index 36dc8b0368b..279e9bc92ab 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.c +++ b/fs/xfs/linux-2.6/xfs_lrw.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/linux-2.6/xfs_lrw.h b/fs/xfs/linux-2.6/xfs_lrw.h index 0647e48a8a1..38864a88d42 100644 --- a/fs/xfs/linux-2.6/xfs_lrw.h +++ b/fs/xfs/linux-2.6/xfs_lrw.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_LRW_H__ #define __XFS_LRW_H__ diff --git a/fs/xfs/linux-2.6/xfs_stats.c b/fs/xfs/linux-2.6/xfs_stats.c index aaf5ddba47f..6c40a74be7c 100644 --- a/fs/xfs/linux-2.6/xfs_stats.c +++ b/fs/xfs/linux-2.6/xfs_stats.c @@ -1,35 +1,20 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include "xfs.h" #include diff --git a/fs/xfs/linux-2.6/xfs_stats.h b/fs/xfs/linux-2.6/xfs_stats.h index 3f756a6c3eb..50027c4a561 100644 --- a/fs/xfs/linux-2.6/xfs_stats.h +++ b/fs/xfs/linux-2.6/xfs_stats.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_STATS_H__ #define __XFS_STATS_H__ diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index fac4862d09a..6116b5bf433 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_bit.h" diff --git a/fs/xfs/linux-2.6/xfs_super.h b/fs/xfs/linux-2.6/xfs_super.h index ad77e3743e0..df59408dca0 100644 --- a/fs/xfs/linux-2.6/xfs_super.h +++ b/fs/xfs/linux-2.6/xfs_super.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_SUPER_H__ #define __XFS_SUPER_H__ diff --git a/fs/xfs/linux-2.6/xfs_sysctl.c b/fs/xfs/linux-2.6/xfs_sysctl.c index 3dbd57fda2d..a0256497242 100644 --- a/fs/xfs/linux-2.6/xfs_sysctl.c +++ b/fs/xfs/linux-2.6/xfs_sysctl.c @@ -1,42 +1,26 @@ /* - * Copyright (c) 2001-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2001-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include #include - static struct ctl_table_header *xfs_table_header; - #ifdef CONFIG_PROC_FS STATIC int xfs_stats_clear_proc_handler( diff --git a/fs/xfs/linux-2.6/xfs_sysctl.h b/fs/xfs/linux-2.6/xfs_sysctl.h index a39a95020a5..bc8c11f1372 100644 --- a/fs/xfs/linux-2.6/xfs_sysctl.h +++ b/fs/xfs/linux-2.6/xfs_sysctl.h @@ -1,35 +1,20 @@ /* - * Copyright (c) 2001-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2001-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #ifndef __XFS_SYSCTL_H__ #define __XFS_SYSCTL_H__ diff --git a/fs/xfs/linux-2.6/xfs_version.h b/fs/xfs/linux-2.6/xfs_version.h index 96f96394417..f8d279d7563 100644 --- a/fs/xfs/linux-2.6/xfs_version.h +++ b/fs/xfs/linux-2.6/xfs_version.h @@ -1,34 +1,22 @@ /* - * Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2001-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef __XFS_VERSION_H__ +#define __XFS_VERSION_H__ /* * Dummy file that can contain a timestamp to put into the @@ -36,9 +24,6 @@ * running */ -#ifndef __XFS_VERSION_H__ -#define __XFS_VERSION_H__ - #define XFS_VERSION_STRING "SGI XFS" #endif /* __XFS_VERSION_H__ */ diff --git a/fs/xfs/linux-2.6/xfs_vfs.c b/fs/xfs/linux-2.6/xfs_vfs.c index 1a08a1d8425..c855d62e534 100644 --- a/fs/xfs/linux-2.6/xfs_vfs.c +++ b/fs/xfs/linux-2.6/xfs_vfs.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/linux-2.6/xfs_vfs.h b/fs/xfs/linux-2.6/xfs_vfs.h index f0ab574fb47..d5fb28f7d32 100644 --- a/fs/xfs/linux-2.6/xfs_vfs.h +++ b/fs/xfs/linux-2.6/xfs_vfs.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_VFS_H__ #define __XFS_VFS_H__ diff --git a/fs/xfs/linux-2.6/xfs_vnode.c b/fs/xfs/linux-2.6/xfs_vnode.c index 61999649ece..e9bbcb4d624 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.c +++ b/fs/xfs/linux-2.6/xfs_vnode.c @@ -1,38 +1,22 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include "xfs.h" - uint64_t vn_generation; /* vnode generation number */ DEFINE_SPINLOCK(vnumber_lock); @@ -44,7 +28,6 @@ DEFINE_SPINLOCK(vnumber_lock); #define vptosync(v) (&vsync[((unsigned long)v) % NVSYNC]) STATIC wait_queue_head_t vsync[NVSYNC]; - void vn_init(void) { diff --git a/fs/xfs/linux-2.6/xfs_vnode.h b/fs/xfs/linux-2.6/xfs_vnode.h index ef1c65f42fe..407fbe05e3f 100644 --- a/fs/xfs/linux-2.6/xfs_vnode.h +++ b/fs/xfs/linux-2.6/xfs_vnode.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * Portions Copyright (c) 1989, 1993 * The Regents of the University of California. All rights reserved. diff --git a/fs/xfs/quota/Makefile-linux-2.6 b/fs/xfs/quota/Makefile-linux-2.6 index 93e60e83935..bd62dca8515 100644 --- a/fs/xfs/quota/Makefile-linux-2.6 +++ b/fs/xfs/quota/Makefile-linux-2.6 @@ -1,33 +1,19 @@ # -# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. +# Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. +# All Rights Reserved. # -# This program is free software; you can redistribute it and/or modify it -# under the terms of version 2 of the GNU General Public License as +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as # published by the Free Software Foundation. # -# This program is distributed in the hope that it would be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# This program is distributed in the hope that it would be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# Further, this software is distributed without any warranty that it is -# free of the rightful claim of any third person regarding infringement -# or the like. Any license provided herein, whether implied or -# otherwise, applies only to this software file. Patent licenses, if -# any, provided herein do not apply to combinations of this program with -# other software, or any other product whatsoever. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write the Free Software Foundation, Inc., 59 -# Temple Place - Suite 330, Boston MA 02111-1307, USA. -# -# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, -# Mountain View, CA 94043, or: -# -# http://www.sgi.com -# -# For further information regarding this notice, see: -# -# http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ +# You should have received a copy of the GNU General Public License +# along with this program; if not, write the Free Software Foundation, +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # EXTRA_CFLAGS += -I $(TOPDIR)/fs/xfs -I $(TOPDIR)/fs/xfs/linux-2.6 diff --git a/fs/xfs/support/debug.c b/fs/xfs/support/debug.c index 4e1a5ec22fa..bb6dc91ea26 100644 --- a/fs/xfs/support/debug.c +++ b/fs/xfs/support/debug.c @@ -1,38 +1,22 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include "debug.h" #include "spin.h" - #include #include #include diff --git a/fs/xfs/support/debug.h b/fs/xfs/support/debug.h index 4fbf5fa4d28..aff558664c3 100644 --- a/fs/xfs/support/debug.h +++ b/fs/xfs/support/debug.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_SUPPORT_DEBUG_H__ #define __XFS_SUPPORT_DEBUG_H__ diff --git a/fs/xfs/support/ktrace.c b/fs/xfs/support/ktrace.c index fa8394f9437..0ebb872d7da 100644 --- a/fs/xfs/support/ktrace.c +++ b/fs/xfs/support/ktrace.c @@ -1,35 +1,20 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include static kmem_zone_t *ktrace_hdr_zone; diff --git a/fs/xfs/support/ktrace.h b/fs/xfs/support/ktrace.h index 92d1a1a5d04..4c5259a8afb 100644 --- a/fs/xfs/support/ktrace.h +++ b/fs/xfs/support/ktrace.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_SUPPORT_KTRACE_H__ #define __XFS_SUPPORT_KTRACE_H__ diff --git a/fs/xfs/support/move.c b/fs/xfs/support/move.c index 15b5194f16b..caefa17b80f 100644 --- a/fs/xfs/support/move.c +++ b/fs/xfs/support/move.c @@ -1,35 +1,20 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include /* Read from kernel buffer at src to user/kernel buffer defined diff --git a/fs/xfs/support/move.h b/fs/xfs/support/move.h index 3d406dc1c89..97a2498d2da 100644 --- a/fs/xfs/support/move.h +++ b/fs/xfs/support/move.h @@ -1,34 +1,20 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ - * * Portions Copyright (c) 1982, 1986, 1993, 1994 * The Regents of the University of California. All rights reserved. * diff --git a/fs/xfs/support/qsort.c b/fs/xfs/support/qsort.c index 1ec824140cf..2cb05c7569d 100644 --- a/fs/xfs/support/qsort.c +++ b/fs/xfs/support/qsort.c @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ - #include #include diff --git a/fs/xfs/support/qsort.h b/fs/xfs/support/qsort.h index 94263106d71..bce5a78da9a 100644 --- a/fs/xfs/support/qsort.h +++ b/fs/xfs/support/qsort.h @@ -1,41 +1,24 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef __XFS_SUPPORT_QSORT_H__ +#define __XFS_SUPPORT_QSORT_H__ -#ifndef QSORT_H -#define QSORT_H - -extern void qsort (void *const pbase, - size_t total_elems, - size_t size, - int (*cmp)(const void *, const void *)); +extern void qsort(void *const pbase, size_t total_elems, size_t size, + int (*cmp)(const void *, const void *)); -#endif +#endif /* __XFS_SUPPORT_QSORT_H__ */ diff --git a/fs/xfs/support/uuid.c b/fs/xfs/support/uuid.c index 81f40cfcb26..70ce40914c8 100644 --- a/fs/xfs/support/uuid.c +++ b/fs/xfs/support/uuid.c @@ -1,35 +1,20 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include static mutex_t uuid_monitor; diff --git a/fs/xfs/support/uuid.h b/fs/xfs/support/uuid.h index 5220ea58ba2..b6f5922199b 100644 --- a/fs/xfs/support/uuid.h +++ b/fs/xfs/support/uuid.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_SUPPORT_UUID_H__ #define __XFS_SUPPORT_UUID_H__ @@ -36,13 +22,13 @@ typedef struct { unsigned char __u_bits[16]; } uuid_t; -void uuid_init(void); -void uuid_create_nil(uuid_t *uuid); -int uuid_is_nil(uuid_t *uuid); -int uuid_equal(uuid_t *uuid1, uuid_t *uuid2); -void uuid_getnodeuniq(uuid_t *uuid, int fsid [2]); -__uint64_t uuid_hash64(uuid_t *uuid); -int uuid_table_insert(uuid_t *uuid); -void uuid_table_remove(uuid_t *uuid); +extern void uuid_init(void); +extern void uuid_create_nil(uuid_t *uuid); +extern int uuid_is_nil(uuid_t *uuid); +extern int uuid_equal(uuid_t *uuid1, uuid_t *uuid2); +extern void uuid_getnodeuniq(uuid_t *uuid, int fsid [2]); +extern __uint64_t uuid_hash64(uuid_t *uuid); +extern int uuid_table_insert(uuid_t *uuid); +extern void uuid_table_remove(uuid_t *uuid); #endif /* __XFS_SUPPORT_UUID_H__ */ diff --git a/fs/xfs/xfs.h b/fs/xfs/xfs.h index 30c4ab4f9c4..99b50d2bda9 100644 --- a/fs/xfs/xfs.h +++ b/fs/xfs/xfs.h @@ -1,37 +1,28 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_H__ #define __XFS_H__ +#include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #include +#else +#include +#endif #endif /* __XFS_H__ */ diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c index 33c5f402b4e..571bb3205d5 100644 --- a/fs/xfs/xfs_acl.c +++ b/fs/xfs/xfs_acl.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2001-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_acl.h b/fs/xfs/xfs_acl.h index 0363eb46d35..f9315bc960c 100644 --- a/fs/xfs/xfs_acl.h +++ b/fs/xfs/xfs_acl.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2001-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2001-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_ACL_H__ #define __XFS_ACL_H__ diff --git a/fs/xfs/xfs_ag.h b/fs/xfs/xfs_ag.h index 7d15ef341a9..8d055593fee 100644 --- a/fs/xfs/xfs_ag.h +++ b/fs/xfs/xfs_ag.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_AG_H__ #define __XFS_AG_H__ diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index c3a30e14bd1..a439e07253a 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_alloc.h b/fs/xfs/xfs_alloc.h index 72329c86351..3546dea27b7 100644 --- a/fs/xfs/xfs_alloc.h +++ b/fs/xfs/xfs_alloc.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_ALLOC_H__ #define __XFS_ALLOC_H__ diff --git a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c index ccc421b438f..1a34b7d99bc 100644 --- a/fs/xfs/xfs_alloc_btree.c +++ b/fs/xfs/xfs_alloc_btree.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_alloc_btree.h b/fs/xfs/xfs_alloc_btree.h index f857b0f248d..5615ebba6a3 100644 --- a/fs/xfs/xfs_alloc_btree.h +++ b/fs/xfs/xfs_alloc_btree.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_ALLOC_BTREE_H__ #define __XFS_ALLOC_BTREE_H__ diff --git a/fs/xfs/xfs_arch.h b/fs/xfs/xfs_arch.h index 5ab0dd885b1..3191dc60d8d 100644 --- a/fs/xfs/xfs_arch.h +++ b/fs/xfs/xfs_arch.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_ARCH_H__ #define __XFS_ARCH_H__ diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index 7db18e9649d..5484eeb460c 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c @@ -1,35 +1,20 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - #include "xfs.h" #include "xfs_fs.h" #include "xfs_types.h" diff --git a/fs/xfs/xfs_attr.h b/fs/xfs/xfs_attr.h index 42648b4f75b..b2c7b9fcded 100644 --- a/fs/xfs/xfs_attr.h +++ b/fs/xfs/xfs_attr.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000, 2002-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2002-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_ATTR_H__ #define __XFS_ATTR_H__ diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c index be82014b952..52a847e6abf 100644 --- a/fs/xfs/xfs_attr_leaf.c +++ b/fs/xfs/xfs_attr_leaf.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_attr_leaf.h b/fs/xfs/xfs_attr_leaf.h index ef5f5eaa60d..f6143ff251a 100644 --- a/fs/xfs/xfs_attr_leaf.h +++ b/fs/xfs/xfs_attr_leaf.h @@ -1,34 +1,19 @@ /* - * Copyright (c) 2000, 2002-2003, 2005 Silicon Graphics, Inc. + * Copyright (c) 2000,2002-2003,2005 Silicon Graphics, Inc. * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_ATTR_LEAF_H__ #define __XFS_ATTR_LEAF_H__ diff --git a/fs/xfs/xfs_attr_sf.h b/fs/xfs/xfs_attr_sf.h index c8001929dea..ffed6ca81a5 100644 --- a/fs/xfs/xfs_attr_sf.h +++ b/fs/xfs/xfs_attr_sf.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_ATTR_SF_H__ #define __XFS_ATTR_SF_H__ diff --git a/fs/xfs/xfs_behavior.c b/fs/xfs/xfs_behavior.c index 16088e175ec..9880adae393 100644 --- a/fs/xfs/xfs_behavior.c +++ b/fs/xfs/xfs_behavior.c @@ -1,34 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" diff --git a/fs/xfs/xfs_behavior.h b/fs/xfs/xfs_behavior.h index d5ed5a84392..2cd89bb5ab1 100644 --- a/fs/xfs/xfs_behavior.h +++ b/fs/xfs/xfs_behavior.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_BEHAVIOR_H__ #define __XFS_BEHAVIOR_H__ diff --git a/fs/xfs/xfs_bit.c b/fs/xfs/xfs_bit.c index 76c9ad3875e..43be6a7e47c 100644 --- a/fs/xfs/xfs_bit.c +++ b/fs/xfs/xfs_bit.c @@ -1,45 +1,29 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - -/* - * XFS bit manipulation routines, used in non-realtime code. - */ - #include "xfs.h" #include "xfs_bit.h" #include "xfs_log.h" #include "xfs_trans.h" #include "xfs_buf_item.h" +/* + * XFS bit manipulation routines, used in non-realtime code. + */ #ifndef HAVE_ARCH_HIGHBIT /* diff --git a/fs/xfs/xfs_bit.h b/fs/xfs/xfs_bit.h index 041e8248506..0bbe5681754 100644 --- a/fs/xfs/xfs_bit.h +++ b/fs/xfs/xfs_bit.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_BIT_H__ #define __XFS_BIT_H__ diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index f8e3357c1e8..82496d901d2 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h index 51a9c82f0f6..2e0717a0130 100644 --- a/fs/xfs/xfs_bmap.h +++ b/fs/xfs/xfs_bmap.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_BMAP_H__ #define __XFS_BMAP_H__ diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c index cc72f77f982..3bf70eca163 100644 --- a/fs/xfs/xfs_bmap_btree.c +++ b/fs/xfs/xfs_bmap_btree.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_bmap_btree.h b/fs/xfs/xfs_bmap_btree.h index ff0102d1491..7478b1b1aa2 100644 --- a/fs/xfs/xfs_bmap_btree.h +++ b/fs/xfs/xfs_bmap_btree.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000,2002-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2002-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_BMAP_BTREE_H__ #define __XFS_BMAP_BTREE_H__ diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c index 4d63f1c490f..9de5a1f312c 100644 --- a/fs/xfs/xfs_btree.c +++ b/fs/xfs/xfs_btree.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h index 30ee83712c7..e6b2a09401c 100644 --- a/fs/xfs/xfs_btree.h +++ b/fs/xfs/xfs_btree.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_BTREE_H__ #define __XFS_BTREE_H__ diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index a37ffc38bb1..07e2324152b 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_buf_item.h b/fs/xfs/xfs_buf_item.h index 01aed5f2d57..07c708c2b52 100644 --- a/fs/xfs/xfs_buf_item.h +++ b/fs/xfs/xfs_buf_item.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_BUF_ITEM_H__ #define __XFS_BUF_ITEM_H__ diff --git a/fs/xfs/xfs_cap.h b/fs/xfs/xfs_cap.h index 2deac730375..433ec537f9b 100644 --- a/fs/xfs/xfs_cap.h +++ b/fs/xfs/xfs_cap.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_CAP_H__ #define __XFS_CAP_H__ diff --git a/fs/xfs/xfs_clnt.h b/fs/xfs/xfs_clnt.h index 6483c73b11b..1fbe2bf1f3e 100644 --- a/fs/xfs/xfs_clnt.h +++ b/fs/xfs/xfs_clnt.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_CLNT_H__ #define __XFS_CLNT_H__ diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c index b4075ec7545..c352d0633c3 100644 --- a/fs/xfs/xfs_da_btree.c +++ b/fs/xfs/xfs_da_btree.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_da_btree.h b/fs/xfs/xfs_da_btree.h index 654956e9787..41352113721 100644 --- a/fs/xfs/xfs_da_btree.h +++ b/fs/xfs/xfs_da_btree.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DA_BTREE_H__ #define __XFS_DA_BTREE_H__ diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c index 925b0a22c66..070259a4254 100644 --- a/fs/xfs/xfs_dfrag.c +++ b/fs/xfs/xfs_dfrag.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_dfrag.h b/fs/xfs/xfs_dfrag.h index 904860594b8..f678559abc4 100644 --- a/fs/xfs/xfs_dfrag.h +++ b/fs/xfs/xfs_dfrag.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DFRAG_H__ #define __XFS_DFRAG_H__ diff --git a/fs/xfs/xfs_dinode.h b/fs/xfs/xfs_dinode.h index 9e1fd232325..c5a0e537ff1 100644 --- a/fs/xfs/xfs_dinode.h +++ b/fs/xfs/xfs_dinode.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DINODE_H__ #define __XFS_DINODE_H__ diff --git a/fs/xfs/xfs_dir.c b/fs/xfs/xfs_dir.c index d32824e8d86..3dd30391f55 100644 --- a/fs/xfs/xfs_dir.c +++ b/fs/xfs/xfs_dir.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_dir.h b/fs/xfs/xfs_dir.h index 4dbc9f54cca..488defe86ba 100644 --- a/fs/xfs/xfs_dir.h +++ b/fs/xfs/xfs_dir.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DIR_H__ #define __XFS_DIR_H__ diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c index 40a741c7e5c..022c8398ab6 100644 --- a/fs/xfs/xfs_dir2.c +++ b/fs/xfs/xfs_dir2.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_dir2.h b/fs/xfs/xfs_dir2.h index 8f4fc7f23bc..7e24ffeda9e 100644 --- a/fs/xfs/xfs_dir2.h +++ b/fs/xfs/xfs_dir2.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DIR2_H__ #define __XFS_DIR2_H__ diff --git a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c index 47b5d2c4b93..31bc99faa70 100644 --- a/fs/xfs/xfs_dir2_block.c +++ b/fs/xfs/xfs_dir2_block.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_dir2_block.h b/fs/xfs/xfs_dir2_block.h index 70dcbe8976f..a2e5cb98a83 100644 --- a/fs/xfs/xfs_dir2_block.h +++ b/fs/xfs/xfs_dir2_block.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DIR2_BLOCK_H__ #define __XFS_DIR2_BLOCK_H__ diff --git a/fs/xfs/xfs_dir2_data.c b/fs/xfs/xfs_dir2_data.c index 4b25f7e7c81..5b7c47e2f14 100644 --- a/fs/xfs/xfs_dir2_data.c +++ b/fs/xfs/xfs_dir2_data.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_dir2_data.h b/fs/xfs/xfs_dir2_data.h index eeff8557072..5e3a7f9ec73 100644 --- a/fs/xfs/xfs_dir2_data.h +++ b/fs/xfs/xfs_dir2_data.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DIR2_DATA_H__ #define __XFS_DIR2_DATA_H__ diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c index 89e48877e0e..d342b6b5523 100644 --- a/fs/xfs/xfs_dir2_leaf.c +++ b/fs/xfs/xfs_dir2_leaf.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_dir2_leaf.h b/fs/xfs/xfs_dir2_leaf.h index 43f0ec2131a..1393993d61e 100644 --- a/fs/xfs/xfs_dir2_leaf.h +++ b/fs/xfs/xfs_dir2_leaf.h @@ -1,41 +1,23 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DIR2_LEAF_H__ #define __XFS_DIR2_LEAF_H__ -/* - * Directory version 2, leaf block structures. - */ - struct uio; struct xfs_dabuf; struct xfs_da_args; diff --git a/fs/xfs/xfs_dir2_node.c b/fs/xfs/xfs_dir2_node.c index 2517460430d..641f8633d25 100644 --- a/fs/xfs/xfs_dir2_node.c +++ b/fs/xfs/xfs_dir2_node.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_dir2_node.h b/fs/xfs/xfs_dir2_node.h index 70fa0797c20..0ab8fbd5951 100644 --- a/fs/xfs/xfs_dir2_node.h +++ b/fs/xfs/xfs_dir2_node.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DIR2_NODE_H__ #define __XFS_DIR2_NODE_H__ diff --git a/fs/xfs/xfs_dir2_sf.c b/fs/xfs/xfs_dir2_sf.c index 95e703d5bc0..6504afc54a5 100644 --- a/fs/xfs/xfs_dir2_sf.c +++ b/fs/xfs/xfs_dir2_sf.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_dir2_sf.h b/fs/xfs/xfs_dir2_sf.h index 133464935ef..42f015b7001 100644 --- a/fs/xfs/xfs_dir2_sf.h +++ b/fs/xfs/xfs_dir2_sf.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DIR2_SF_H__ #define __XFS_DIR2_SF_H__ diff --git a/fs/xfs/xfs_dir2_trace.c b/fs/xfs/xfs_dir2_trace.c index 34e5138c670..c626943b411 100644 --- a/fs/xfs/xfs_dir2_trace.c +++ b/fs/xfs/xfs_dir2_trace.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_dir2_trace.h b/fs/xfs/xfs_dir2_trace.h index 0a178bffa80..ca3c754f482 100644 --- a/fs/xfs/xfs_dir2_trace.h +++ b/fs/xfs/xfs_dir2_trace.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DIR2_TRACE_H__ #define __XFS_DIR2_TRACE_H__ diff --git a/fs/xfs/xfs_dir_leaf.c b/fs/xfs/xfs_dir_leaf.c index 22997d314cf..f0c603a78fc 100644 --- a/fs/xfs/xfs_dir_leaf.c +++ b/fs/xfs/xfs_dir_leaf.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_dir_leaf.h b/fs/xfs/xfs_dir_leaf.h index 216d62693b7..ab6b09eef9a 100644 --- a/fs/xfs/xfs_dir_leaf.h +++ b/fs/xfs/xfs_dir_leaf.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DIR_LEAF_H__ #define __XFS_DIR_LEAF_H__ diff --git a/fs/xfs/xfs_dir_sf.h b/fs/xfs/xfs_dir_sf.h index 2b75b767e15..fe44c6f4d56 100644 --- a/fs/xfs/xfs_dir_sf.h +++ b/fs/xfs/xfs_dir_sf.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DIR_SF_H__ #define __XFS_DIR_SF_H__ diff --git a/fs/xfs/xfs_dmapi.h b/fs/xfs/xfs_dmapi.h index 19e872856f6..5a5c7a63e80 100644 --- a/fs/xfs/xfs_dmapi.h +++ b/fs/xfs/xfs_dmapi.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_DMAPI_H__ #define __XFS_DMAPI_H__ diff --git a/fs/xfs/xfs_dmops.c b/fs/xfs/xfs_dmops.c index 1b99c4dfbab..629795b3b3d 100644 --- a/fs/xfs/xfs_dmops.c +++ b/fs/xfs/xfs_dmops.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_error.c b/fs/xfs/xfs_error.c index 5da2738b453..d7b6b5d1670 100644 --- a/fs/xfs/xfs_error.c +++ b/fs/xfs/xfs_error.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_error.h b/fs/xfs/xfs_error.h index 66eef1beb0e..06d8a8426c1 100644 --- a/fs/xfs/xfs_error.h +++ b/fs/xfs/xfs_error.h @@ -1,39 +1,25 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_ERROR_H__ #define __XFS_ERROR_H__ #define prdev(fmt,targ,args...) \ - printk("XFS: device %s- " fmt "\n", XFS_BUFTARG_NAME(targ), ## args) + printk("XFS: device %s - " fmt "\n", XFS_BUFTARG_NAME(targ), ## args) #define XFS_ERECOVER 1 /* Failure to recover log */ #define XFS_ELOGSTAT 2 /* Failure to stat log in user space */ diff --git a/fs/xfs/xfs_extfree_item.c b/fs/xfs/xfs_extfree_item.c index f48cc9a7cd5..f19282ec854 100644 --- a/fs/xfs/xfs_extfree_item.c +++ b/fs/xfs/xfs_extfree_item.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_extfree_item.h b/fs/xfs/xfs_extfree_item.h index d433bac9f59..5bf681708fe 100644 --- a/fs/xfs/xfs_extfree_item.h +++ b/fs/xfs/xfs_extfree_item.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_EXTFREE_ITEM_H__ #define __XFS_EXTFREE_ITEM_H__ diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h index 7bf2e92b8c0..ba096f80f48 100644 --- a/fs/xfs/xfs_fs.h +++ b/fs/xfs/xfs_fs.h @@ -1,34 +1,19 @@ /* - * Copyright (c) 1995-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 1995-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2.1 of the GNU Lesser General Public License - * as published by the Free Software Foundation. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, - * USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_FS_H__ #define __XFS_FS_H__ diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 411081c0fd7..239e701e982 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_fsops.h b/fs/xfs/xfs_fsops.h index b61486173a6..f32713f14f9 100644 --- a/fs/xfs/xfs_fsops.h +++ b/fs/xfs/xfs_fsops.h @@ -1,67 +1,29 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_FSOPS_H__ #define __XFS_FSOPS_H__ -int -xfs_fs_geometry( - xfs_mount_t *mp, - xfs_fsop_geom_t *geo, - int new_version); - -int -xfs_growfs_data( - xfs_mount_t *mp, - xfs_growfs_data_t *in); - -int -xfs_growfs_log( - xfs_mount_t *mp, - xfs_growfs_log_t *in); - -int -xfs_fs_counts( - xfs_mount_t *mp, - xfs_fsop_counts_t *cnt); - -int -xfs_reserve_blocks( - xfs_mount_t *mp, - __uint64_t *inval, - xfs_fsop_resblks_t *outval); - -int -xfs_fs_goingdown( - xfs_mount_t *mp, - __uint32_t inflags); +extern int xfs_fs_geometry(xfs_mount_t *mp, xfs_fsop_geom_t *geo, int nversion); +extern int xfs_growfs_data(xfs_mount_t *mp, xfs_growfs_data_t *in); +extern int xfs_growfs_log(xfs_mount_t *mp, xfs_growfs_log_t *in); +extern int xfs_fs_counts(xfs_mount_t *mp, xfs_fsop_counts_t *cnt); +extern int xfs_reserve_blocks(xfs_mount_t *mp, __uint64_t *inval, + xfs_fsop_resblks_t *outval); +extern int xfs_fs_goingdown(xfs_mount_t *mp, __uint32_t inflags); #endif /* __XFS_FSOPS_H__ */ diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 4fc0e73fd18..d8ceb3d1865 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_ialloc.h b/fs/xfs/xfs_ialloc.h index fab660dd6d1..7f5debe1acb 100644 --- a/fs/xfs/xfs_ialloc.h +++ b/fs/xfs/xfs_ialloc.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_IALLOC_H__ #define __XFS_IALLOC_H__ diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c index a49958d21e8..e5c23445d38 100644 --- a/fs/xfs/xfs_ialloc_btree.c +++ b/fs/xfs/xfs_ialloc_btree.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" @@ -55,14 +41,6 @@ #include "xfs_alloc.h" #include "xfs_error.h" -/* - * Inode allocation management for XFS. - */ - -/* - * Prototypes for internal functions. - */ - STATIC void xfs_inobt_log_block(xfs_trans_t *, xfs_buf_t *, int); STATIC void xfs_inobt_log_keys(xfs_btree_cur_t *, xfs_buf_t *, int, int); STATIC void xfs_inobt_log_ptrs(xfs_btree_cur_t *, xfs_buf_t *, int, int); @@ -74,10 +52,6 @@ STATIC int xfs_inobt_split(xfs_btree_cur_t *, int, xfs_agblock_t *, xfs_inobt_key_t *, xfs_btree_cur_t **, int *); STATIC int xfs_inobt_updkey(xfs_btree_cur_t *, xfs_inobt_key_t *, int); -/* - * Internal functions. - */ - /* * Single level of the xfs_inobt_delete record deletion routine. * Delete record pointed to by cur/level. diff --git a/fs/xfs/xfs_ialloc_btree.h b/fs/xfs/xfs_ialloc_btree.h index b8c7e72ed83..86ed749d4cc 100644 --- a/fs/xfs/xfs_ialloc_btree.h +++ b/fs/xfs/xfs_ialloc_btree.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_IALLOC_BTREE_H__ #define __XFS_IALLOC_BTREE_H__ diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index f925335e455..fc19eedbd11 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_imap.h b/fs/xfs/xfs_imap.h index e385064a066..d3645000398 100644 --- a/fs/xfs/xfs_imap.h +++ b/fs/xfs/xfs_imap.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_IMAP_H__ #define __XFS_IMAP_H__ diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index edf50b5409f..281cbd45b3d 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index 11be922698a..d9e9cbaee28 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_INODE_H__ #define __XFS_INODE_H__ diff --git a/fs/xfs/xfs_inode_item.c b/fs/xfs/xfs_inode_item.c index cebcc2781bb..7f3363c621e 100644 --- a/fs/xfs/xfs_inode_item.c +++ b/fs/xfs/xfs_inode_item.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_inode_item.h b/fs/xfs/xfs_inode_item.h index 61a806ba8fd..c5dbf93b666 100644 --- a/fs/xfs/xfs_inode_item.h +++ b/fs/xfs/xfs_inode_item.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_INODE_ITEM_H__ #define __XFS_INODE_ITEM_H__ diff --git a/fs/xfs/xfs_inum.h b/fs/xfs/xfs_inum.h index 8f70a12d56b..7a28191cb0d 100644 --- a/fs/xfs/xfs_inum.h +++ b/fs/xfs/xfs_inum.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_INUM_H__ #define __XFS_INUM_H__ diff --git a/fs/xfs/xfs_iocore.c b/fs/xfs/xfs_iocore.c index 6bdd0dcbe39..a07815661a8 100644 --- a/fs/xfs/xfs_iocore.c +++ b/fs/xfs/xfs_iocore.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index 1ba0d71349c..113c647a9f6 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_iomap.h b/fs/xfs/xfs_iomap.h index 4daaa521210..fcd6d63bb68 100644 --- a/fs/xfs/xfs_iomap.h +++ b/fs/xfs/xfs_iomap.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2003-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2003-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_IOMAP_H__ #define __XFS_IOMAP_H__ diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index abac0399ca4..a4d186d2db4 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_itable.h b/fs/xfs/xfs_itable.h index 2be9d1805ab..047d834ed21 100644 --- a/fs/xfs/xfs_itable.h +++ b/fs/xfs/xfs_itable.h @@ -1,33 +1,18 @@ /* * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_ITABLE_H__ #define __XFS_ITABLE_H__ diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 97e2a3b0ca1..a9e0c38d18a 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_log.h b/fs/xfs/xfs_log.h index dc920f83412..158829ca56f 100644 --- a/fs/xfs/xfs_log.h +++ b/fs/xfs/xfs_log.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_LOG_H__ #define __XFS_LOG_H__ diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index bec421a735f..758e4eb67c0 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_LOG_PRIV_H__ #define __XFS_LOG_PRIV_H__ diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index f61dcd1b8e3..b628c9eca42 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_log_recover.h b/fs/xfs/xfs_log_recover.h index 42158b442b5..b2254555530 100644 --- a/fs/xfs/xfs_log_recover.h +++ b/fs/xfs/xfs_log_recover.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_LOG_RECOVER_H__ #define __XFS_LOG_RECOVER_H__ diff --git a/fs/xfs/xfs_mac.h b/fs/xfs/xfs_mac.h index 8d59aaffeb8..18e0e98e03d 100644 --- a/fs/xfs/xfs_mac.h +++ b/fs/xfs/xfs_mac.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2001-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_MAC_H__ #define __XFS_MAC_H__ diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 52542c5d7a3..9e861d0d3ee 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h index 0567ee2164f..04f8e37cb26 100644 --- a/fs/xfs/xfs_mount.h +++ b/fs/xfs/xfs_mount.h @@ -1,38 +1,23 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_MOUNT_H__ #define __XFS_MOUNT_H__ - typedef struct xfs_trans_reservations { uint tr_write; /* extent alloc trans */ uint tr_itruncate; /* truncate trans */ @@ -57,7 +42,6 @@ typedef struct xfs_trans_reservations { uint tr_growrtfree; /* grow realtime freeing */ } xfs_trans_reservations_t; - #ifndef __KERNEL__ /* * Moved here from xfs_ag.h to avoid reordering header files diff --git a/fs/xfs/xfs_qmops.c b/fs/xfs/xfs_qmops.c index ac14d26fa9c..1408a32eef8 100644 --- a/fs/xfs/xfs_qmops.c +++ b/fs/xfs/xfs_qmops.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_quota.h b/fs/xfs/xfs_quota.h index ed965883f70..fc763a8334a 100644 --- a/fs/xfs/xfs_quota.h +++ b/fs/xfs/xfs_quota.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_QUOTA_H__ #define __XFS_QUOTA_H__ diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c index 13517241458..4d4e8f4e768 100644 --- a/fs/xfs/xfs_rename.c +++ b/fs/xfs/xfs_rename.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 145f916538a..06fc061c50f 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_rtalloc.h b/fs/xfs/xfs_rtalloc.h index e2710264c05..0e0b4d2ec20 100644 --- a/fs/xfs/xfs_rtalloc.h +++ b/fs/xfs/xfs_rtalloc.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_RTALLOC_H__ #define __XFS_RTALLOC_H__ diff --git a/fs/xfs/xfs_rw.c b/fs/xfs/xfs_rw.c index 075850c999f..c4b20872f07 100644 --- a/fs/xfs/xfs_rw.c +++ b/fs/xfs/xfs_rw.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_rw.h b/fs/xfs/xfs_rw.h index 90233037fab..de85eefb796 100644 --- a/fs/xfs/xfs_rw.h +++ b/fs/xfs/xfs_rw.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_RW_H__ #define __XFS_RW_H__ diff --git a/fs/xfs/xfs_sb.h b/fs/xfs/xfs_sb.h index a7b2542fd7b..4a17d335f89 100644 --- a/fs/xfs/xfs_sb.h +++ b/fs/xfs/xfs_sb.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_SB_H__ #define __XFS_SB_H__ diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index d14adef65a2..de3abf868ee 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h index 6381669a34a..a889963fdd1 100644 --- a/fs/xfs/xfs_trans.h +++ b/fs/xfs/xfs_trans.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_TRANS_H__ #define __XFS_TRANS_H__ diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c index f248cb60ff7..19ab24af1c1 100644 --- a/fs/xfs/xfs_trans_ail.c +++ b/fs/xfs/xfs_trans_ail.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index 24630da76a2..c74c31ebc81 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/xfs/xfs_trans_buf.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_trans_extfree.c b/fs/xfs/xfs_trans_extfree.c index 1f6b17777f2..7d7d627f25d 100644 --- a/fs/xfs/xfs_trans_extfree.c +++ b/fs/xfs/xfs_trans_extfree.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_trans_inode.c b/fs/xfs/xfs_trans_inode.c index 060b1a72eef..e341409172d 100644 --- a/fs/xfs/xfs_trans_inode.c +++ b/fs/xfs/xfs_trans_inode.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_trans_item.c b/fs/xfs/xfs_trans_item.c index 8edfb151df1..486147ef0e3 100644 --- a/fs/xfs/xfs_trans_item.c +++ b/fs/xfs/xfs_trans_item.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_trans_priv.h b/fs/xfs/xfs_trans_priv.h index d4dae7d06af..13edab8a9e9 100644 --- a/fs/xfs/xfs_trans_priv.h +++ b/fs/xfs/xfs_trans_priv.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_TRANS_PRIV_H__ #define __XFS_TRANS_PRIV_H__ diff --git a/fs/xfs/xfs_trans_space.h b/fs/xfs/xfs_trans_space.h index e91d173f4ed..7fe3792b18d 100644 --- a/fs/xfs/xfs_trans_space.h +++ b/fs/xfs/xfs_trans_space.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_TRANS_SPACE_H__ #define __XFS_TRANS_SPACE_H__ diff --git a/fs/xfs/xfs_types.h b/fs/xfs/xfs_types.h index 33a888e6b3f..104f64a9879 100644 --- a/fs/xfs/xfs_types.h +++ b/fs/xfs/xfs_types.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_TYPES_H__ #define __XFS_TYPES_H__ diff --git a/fs/xfs/xfs_utils.c b/fs/xfs/xfs_utils.c index c6459514fad..fefe1d60377 100644 --- a/fs/xfs/xfs_utils.c +++ b/fs/xfs/xfs_utils.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_utils.h b/fs/xfs/xfs_utils.h index 01d98b4b7af..472661a3b6d 100644 --- a/fs/xfs/xfs_utils.h +++ b/fs/xfs/xfs_utils.h @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XFS_UTILS_H__ #define __XFS_UTILS_H__ diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index 9ea201762a9..4b8b54dfe87 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 443ec6a0b2b..5bf9b2a0b57 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c @@ -1,33 +1,19 @@ /* - * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2005 Silicon Graphics, Inc. + * All Rights Reserved. * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it would be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * You should have received a copy of the GNU General Public License + * along with this program; if not, write the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "xfs.h" #include "xfs_fs.h" -- cgit v1.2.3-70-g09d2 From 16259e7d952e26e949cc2c8c68b74f34b293935d Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 2 Nov 2005 15:11:25 +1100 Subject: [XFS] Endianess annotations for various allocator data structures SGI-PV: 943272 SGI-Modid: xfs-linux:xfs-kern:201006a Signed-off-by: Christoph Hellwig Signed-off-by: Nathan Scott --- fs/xfs/xfs_ag.h | 58 ++++--- fs/xfs/xfs_alloc.c | 146 ++++++++-------- fs/xfs/xfs_alloc_btree.c | 413 +++++++++++++++++++++++----------------------- fs/xfs/xfs_alloc_btree.h | 15 +- fs/xfs/xfs_bmap.c | 62 +++---- fs/xfs/xfs_bmap_btree.c | 230 +++++++++++++------------- fs/xfs/xfs_bmap_btree.h | 44 +++-- fs/xfs/xfs_btree.c | 104 ++++++------ fs/xfs/xfs_btree.h | 55 +++--- fs/xfs/xfs_fsops.c | 94 +++++------ fs/xfs/xfs_ialloc.c | 74 ++++----- fs/xfs/xfs_ialloc_btree.c | 236 +++++++++++++------------- fs/xfs/xfs_ialloc_btree.h | 8 +- fs/xfs/xfs_inode.c | 22 +-- fs/xfs/xfs_itable.c | 2 +- fs/xfs/xfs_log_recover.c | 42 ++--- 16 files changed, 794 insertions(+), 811 deletions(-) (limited to 'fs/xfs/xfs_ialloc.c') diff --git a/fs/xfs/xfs_ag.h b/fs/xfs/xfs_ag.h index 8d055593fee..a96e2ffce0c 100644 --- a/fs/xfs/xfs_ag.h +++ b/fs/xfs/xfs_ag.h @@ -48,27 +48,26 @@ struct xfs_trans; * are > 64k, our value cannot be confused for an EFS superblock's. */ -typedef struct xfs_agf -{ +typedef struct xfs_agf { /* * Common allocation group header information */ - __uint32_t agf_magicnum; /* magic number == XFS_AGF_MAGIC */ - __uint32_t agf_versionnum; /* header version == XFS_AGF_VERSION */ - xfs_agnumber_t agf_seqno; /* sequence # starting from 0 */ - xfs_agblock_t agf_length; /* size in blocks of a.g. */ + __be32 agf_magicnum; /* magic number == XFS_AGF_MAGIC */ + __be32 agf_versionnum; /* header version == XFS_AGF_VERSION */ + __be32 agf_seqno; /* sequence # starting from 0 */ + __be32 agf_length; /* size in blocks of a.g. */ /* * Freespace information */ - xfs_agblock_t agf_roots[XFS_BTNUM_AGF]; /* root blocks */ - __uint32_t agf_spare0; /* spare field */ - __uint32_t agf_levels[XFS_BTNUM_AGF]; /* btree levels */ - __uint32_t agf_spare1; /* spare field */ - __uint32_t agf_flfirst; /* first freelist block's index */ - __uint32_t agf_fllast; /* last freelist block's index */ - __uint32_t agf_flcount; /* count of blocks in freelist */ - xfs_extlen_t agf_freeblks; /* total free blocks */ - xfs_extlen_t agf_longest; /* longest free space */ + __be32 agf_roots[XFS_BTNUM_AGF]; /* root blocks */ + __be32 agf_spare0; /* spare field */ + __be32 agf_levels[XFS_BTNUM_AGF]; /* btree levels */ + __be32 agf_spare1; /* spare field */ + __be32 agf_flfirst; /* first freelist block's index */ + __be32 agf_fllast; /* last freelist block's index */ + __be32 agf_flcount; /* count of blocks in freelist */ + __be32 agf_freeblks; /* total free blocks */ + __be32 agf_longest; /* longest free space */ } xfs_agf_t; #define XFS_AGF_MAGICNUM 0x00000001 @@ -96,31 +95,30 @@ typedef struct xfs_agf */ #define XFS_AGI_UNLINKED_BUCKETS 64 -typedef struct xfs_agi -{ +typedef struct xfs_agi { /* * Common allocation group header information */ - __uint32_t agi_magicnum; /* magic number == XFS_AGI_MAGIC */ - __uint32_t agi_versionnum; /* header version == XFS_AGI_VERSION */ - xfs_agnumber_t agi_seqno; /* sequence # starting from 0 */ - xfs_agblock_t agi_length; /* size in blocks of a.g. */ + __be32 agi_magicnum; /* magic number == XFS_AGI_MAGIC */ + __be32 agi_versionnum; /* header version == XFS_AGI_VERSION */ + __be32 agi_seqno; /* sequence # starting from 0 */ + __be32 agi_length; /* size in blocks of a.g. */ /* * Inode information * Inodes are mapped by interpreting the inode number, so no * mapping data is needed here. */ - xfs_agino_t agi_count; /* count of allocated inodes */ - xfs_agblock_t agi_root; /* root of inode btree */ - __uint32_t agi_level; /* levels in inode btree */ - xfs_agino_t agi_freecount; /* number of free inodes */ - xfs_agino_t agi_newino; /* new inode just allocated */ - xfs_agino_t agi_dirino; /* last directory inode chunk */ + __be32 agi_count; /* count of allocated inodes */ + __be32 agi_root; /* root of inode btree */ + __be32 agi_level; /* levels in inode btree */ + __be32 agi_freecount; /* number of free inodes */ + __be32 agi_newino; /* new inode just allocated */ + __be32 agi_dirino; /* last directory inode chunk */ /* * Hash table of inodes which have been unlinked but are * still being referenced. */ - xfs_agino_t agi_unlinked[XFS_AGI_UNLINKED_BUCKETS]; + __be32 agi_unlinked[XFS_AGI_UNLINKED_BUCKETS]; } xfs_agi_t; #define XFS_AGI_MAGICNUM 0x00000001 @@ -201,8 +199,8 @@ typedef struct xfs_perag (MIN(bl + 1, XFS_AG_MAXLEVELS(mp)) + MIN(cl + 1, XFS_AG_MAXLEVELS(mp))) #define XFS_MIN_FREELIST(a,mp) \ (XFS_MIN_FREELIST_RAW( \ - INT_GET((a)->agf_levels[XFS_BTNUM_BNOi], ARCH_CONVERT), \ - INT_GET((a)->agf_levels[XFS_BTNUM_CNTi], ARCH_CONVERT), mp)) + be32_to_cpu((a)->agf_levels[XFS_BTNUM_BNOi]), \ + be32_to_cpu((a)->agf_levels[XFS_BTNUM_CNTi]), mp)) #define XFS_MIN_FREELIST_PAG(pag,mp) \ (XFS_MIN_FREELIST_RAW( \ (uint_t)(pag)->pagf_levels[XFS_BTNUM_BNOi], \ diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index a439e07253a..f4328e1e2a7 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c @@ -231,8 +231,8 @@ xfs_alloc_fix_minleft( if (args->minleft == 0) return 1; agf = XFS_BUF_TO_AGF(args->agbp); - diff = INT_GET(agf->agf_freeblks, ARCH_CONVERT) - + INT_GET(agf->agf_flcount, ARCH_CONVERT) + diff = be32_to_cpu(agf->agf_freeblks) + + be32_to_cpu(agf->agf_flcount) - args->len - args->minleft; if (diff >= 0) return 1; @@ -307,7 +307,8 @@ xfs_alloc_fixup_trees( bnoblock = XFS_BUF_TO_ALLOC_BLOCK(bno_cur->bc_bufs[0]); cntblock = XFS_BUF_TO_ALLOC_BLOCK(cnt_cur->bc_bufs[0]); XFS_WANT_CORRUPTED_RETURN( - INT_GET(bnoblock->bb_numrecs, ARCH_CONVERT) == INT_GET(cntblock->bb_numrecs, ARCH_CONVERT)); + be16_to_cpu(bnoblock->bb_numrecs) == + be16_to_cpu(cntblock->bb_numrecs)); } } #endif @@ -493,21 +494,17 @@ xfs_alloc_trace_modagf( (void *)str, (void *)mp, (void *)(__psint_t)flags, - (void *)(__psunsigned_t)INT_GET(agf->agf_seqno, ARCH_CONVERT), - (void *)(__psunsigned_t)INT_GET(agf->agf_length, ARCH_CONVERT), - (void *)(__psunsigned_t)INT_GET(agf->agf_roots[XFS_BTNUM_BNO], - ARCH_CONVERT), - (void *)(__psunsigned_t)INT_GET(agf->agf_roots[XFS_BTNUM_CNT], - ARCH_CONVERT), - (void *)(__psunsigned_t)INT_GET(agf->agf_levels[XFS_BTNUM_BNO], - ARCH_CONVERT), - (void *)(__psunsigned_t)INT_GET(agf->agf_levels[XFS_BTNUM_CNT], - ARCH_CONVERT), - (void *)(__psunsigned_t)INT_GET(agf->agf_flfirst, ARCH_CONVERT), - (void *)(__psunsigned_t)INT_GET(agf->agf_fllast, ARCH_CONVERT), - (void *)(__psunsigned_t)INT_GET(agf->agf_flcount, ARCH_CONVERT), - (void *)(__psunsigned_t)INT_GET(agf->agf_freeblks, ARCH_CONVERT), - (void *)(__psunsigned_t)INT_GET(agf->agf_longest, ARCH_CONVERT)); + (void *)(__psunsigned_t)be32_to_cpu(agf->agf_seqno), + (void *)(__psunsigned_t)be32_to_cpu(agf->agf_length), + (void *)(__psunsigned_t)be32_to_cpu(agf->agf_roots[XFS_BTNUM_BNO]), + (void *)(__psunsigned_t)be32_to_cpu(agf->agf_roots[XFS_BTNUM_CNT]), + (void *)(__psunsigned_t)be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNO]), + (void *)(__psunsigned_t)be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNT]), + (void *)(__psunsigned_t)be32_to_cpu(agf->agf_flfirst), + (void *)(__psunsigned_t)be32_to_cpu(agf->agf_fllast), + (void *)(__psunsigned_t)be32_to_cpu(agf->agf_flcount), + (void *)(__psunsigned_t)be32_to_cpu(agf->agf_freeblks), + (void *)(__psunsigned_t)be32_to_cpu(agf->agf_longest)); } STATIC void @@ -600,12 +597,12 @@ xfs_alloc_ag_vextent( if (!(args->wasfromfl)) { agf = XFS_BUF_TO_AGF(args->agbp); - INT_MOD(agf->agf_freeblks, ARCH_CONVERT, -(args->len)); + be32_add(&agf->agf_freeblks, -(args->len)); xfs_trans_agblocks_delta(args->tp, -((long)(args->len))); args->pag->pagf_freeblks -= args->len; - ASSERT(INT_GET(agf->agf_freeblks, ARCH_CONVERT) - <= INT_GET(agf->agf_length, ARCH_CONVERT)); + ASSERT(be32_to_cpu(agf->agf_freeblks) <= + be32_to_cpu(agf->agf_length)); TRACE_MODAGF(NULL, agf, XFS_AGF_FREEBLKS); xfs_alloc_log_agf(args->tp, args->agbp, XFS_AGF_FREEBLKS); @@ -711,8 +708,7 @@ xfs_alloc_ag_vextent_exact( cnt_cur = xfs_btree_init_cursor(args->mp, args->tp, args->agbp, args->agno, XFS_BTNUM_CNT, NULL, 0); ASSERT(args->agbno + args->len <= - INT_GET(XFS_BUF_TO_AGF(args->agbp)->agf_length, - ARCH_CONVERT)); + be32_to_cpu(XFS_BUF_TO_AGF(args->agbp)->agf_length)); if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur, fbno, flen, args->agbno, args->len, XFSA_FIXUP_BNO_OK))) { xfs_btree_del_cursor(cnt_cur, XFS_BTREE_ERROR); @@ -885,8 +881,7 @@ xfs_alloc_ag_vextent_near( goto error0; XFS_WANT_CORRUPTED_GOTO(i == 1, error0); ltend = ltbno + ltlen; - ASSERT(ltend <= INT_GET(XFS_BUF_TO_AGF(args->agbp)->agf_length, - ARCH_CONVERT)); + ASSERT(ltend <= be32_to_cpu(XFS_BUF_TO_AGF(args->agbp)->agf_length)); args->len = blen; if (!xfs_alloc_fix_minleft(args)) { xfs_btree_del_cursor(cnt_cur, XFS_BTREE_NOERROR); @@ -1241,8 +1236,7 @@ xfs_alloc_ag_vextent_near( ltlen, <new); ASSERT(ltnew >= ltbno); ASSERT(ltnew + rlen <= ltend); - ASSERT(ltnew + rlen <= INT_GET(XFS_BUF_TO_AGF(args->agbp)->agf_length, - ARCH_CONVERT)); + ASSERT(ltnew + rlen <= be32_to_cpu(XFS_BUF_TO_AGF(args->agbp)->agf_length)); args->agbno = ltnew; if ((error = xfs_alloc_fixup_trees(cnt_cur, bno_cur_lt, ltbno, ltlen, ltnew, rlen, XFSA_FIXUP_BNO_OK))) @@ -1405,8 +1399,7 @@ xfs_alloc_ag_vextent_size( args->agbno = rbno; XFS_WANT_CORRUPTED_GOTO( args->agbno + args->len <= - INT_GET(XFS_BUF_TO_AGF(args->agbp)->agf_length, - ARCH_CONVERT), + be32_to_cpu(XFS_BUF_TO_AGF(args->agbp)->agf_length), error0); TRACE_ALLOC("normal", args); return 0; @@ -1454,8 +1447,8 @@ xfs_alloc_ag_vextent_small( * freelist. */ else if (args->minlen == 1 && args->alignment == 1 && !args->isfl && - (INT_GET(XFS_BUF_TO_AGF(args->agbp)->agf_flcount, - ARCH_CONVERT) > args->minleft)) { + (be32_to_cpu(XFS_BUF_TO_AGF(args->agbp)->agf_flcount) + > args->minleft)) { if ((error = xfs_alloc_get_freelist(args->tp, args->agbp, &fbno))) goto error0; if (fbno != NULLAGBLOCK) { @@ -1470,8 +1463,7 @@ xfs_alloc_ag_vextent_small( args->agbno = fbno; XFS_WANT_CORRUPTED_GOTO( args->agbno + args->len <= - INT_GET(XFS_BUF_TO_AGF(args->agbp)->agf_length, - ARCH_CONVERT), + be32_to_cpu(XFS_BUF_TO_AGF(args->agbp)->agf_length), error0); args->wasfromfl = 1; TRACE_ALLOC("freelist", args); @@ -1745,12 +1737,12 @@ xfs_free_ag_extent( agf = XFS_BUF_TO_AGF(agbp); pag = &mp->m_perag[agno]; - INT_MOD(agf->agf_freeblks, ARCH_CONVERT, len); + be32_add(&agf->agf_freeblks, len); xfs_trans_agblocks_delta(tp, len); pag->pagf_freeblks += len; XFS_WANT_CORRUPTED_GOTO( - INT_GET(agf->agf_freeblks, ARCH_CONVERT) - <= INT_GET(agf->agf_length, ARCH_CONVERT), + be32_to_cpu(agf->agf_freeblks) <= + be32_to_cpu(agf->agf_length), error0); TRACE_MODAGF(NULL, agf, XFS_AGF_FREEBLKS); xfs_alloc_log_agf(tp, agbp, XFS_AGF_FREEBLKS); @@ -1897,18 +1889,18 @@ xfs_alloc_fix_freelist( */ agf = XFS_BUF_TO_AGF(agbp); need = XFS_MIN_FREELIST(agf, mp); - delta = need > INT_GET(agf->agf_flcount, ARCH_CONVERT) ? - (need - INT_GET(agf->agf_flcount, ARCH_CONVERT)) : 0; + delta = need > be32_to_cpu(agf->agf_flcount) ? + (need - be32_to_cpu(agf->agf_flcount)) : 0; /* * If there isn't enough total or single-extent, reject it. */ - longest = INT_GET(agf->agf_longest, ARCH_CONVERT); + longest = be32_to_cpu(agf->agf_longest); longest = (longest > delta) ? (longest - delta) : - (INT_GET(agf->agf_flcount, ARCH_CONVERT) > 0 || longest > 0); + (be32_to_cpu(agf->agf_flcount) > 0 || longest > 0); if (args->minlen + args->alignment + args->minalignslop - 1 > longest || (args->minleft && - (int)(INT_GET(agf->agf_freeblks, ARCH_CONVERT) + - INT_GET(agf->agf_flcount, ARCH_CONVERT) - need - args->total) < + (int)(be32_to_cpu(agf->agf_freeblks) + + be32_to_cpu(agf->agf_flcount) - need - args->total) < (int)args->minleft)) { xfs_trans_brelse(tp, agbp); args->agbp = NULL; @@ -1917,7 +1909,7 @@ xfs_alloc_fix_freelist( /* * Make the freelist shorter if it's too long. */ - while (INT_GET(agf->agf_flcount, ARCH_CONVERT) > need) { + while (be32_to_cpu(agf->agf_flcount) > need) { xfs_buf_t *bp; if ((error = xfs_alloc_get_freelist(tp, agbp, &bno))) @@ -1944,9 +1936,9 @@ xfs_alloc_fix_freelist( /* * Make the freelist longer if it's too short. */ - while (INT_GET(agf->agf_flcount, ARCH_CONVERT) < need) { + while (be32_to_cpu(agf->agf_flcount) < need) { targs.agbno = 0; - targs.maxlen = need - INT_GET(agf->agf_flcount, ARCH_CONVERT); + targs.maxlen = need - be32_to_cpu(agf->agf_flcount); /* * Allocate as many blocks as possible at once. */ @@ -2006,19 +1998,19 @@ xfs_alloc_get_freelist( */ mp = tp->t_mountp; if ((error = xfs_alloc_read_agfl(mp, tp, - INT_GET(agf->agf_seqno, ARCH_CONVERT), &agflbp))) + be32_to_cpu(agf->agf_seqno), &agflbp))) return error; agfl = XFS_BUF_TO_AGFL(agflbp); /* * Get the block number and update the data structures. */ - bno = INT_GET(agfl->agfl_bno[INT_GET(agf->agf_flfirst, ARCH_CONVERT)], ARCH_CONVERT); - INT_MOD(agf->agf_flfirst, ARCH_CONVERT, 1); + bno = INT_GET(agfl->agfl_bno[be32_to_cpu(agf->agf_flfirst)], ARCH_CONVERT); + be32_add(&agf->agf_flfirst, 1); xfs_trans_brelse(tp, agflbp); - if (INT_GET(agf->agf_flfirst, ARCH_CONVERT) == XFS_AGFL_SIZE(mp)) + if (be32_to_cpu(agf->agf_flfirst) == XFS_AGFL_SIZE(mp)) agf->agf_flfirst = 0; - pag = &mp->m_perag[INT_GET(agf->agf_seqno, ARCH_CONVERT)]; - INT_MOD(agf->agf_flcount, ARCH_CONVERT, -1); + pag = &mp->m_perag[be32_to_cpu(agf->agf_seqno)]; + be32_add(&agf->agf_flcount, -1); xfs_trans_agflist_delta(tp, -1); pag->pagf_flcount--; TRACE_MODAGF(NULL, agf, XFS_AGF_FLFIRST | XFS_AGF_FLCOUNT); @@ -2033,7 +2025,7 @@ xfs_alloc_get_freelist( * the freeing transaction must be pushed to disk NOW by forcing * to disk all iclogs up that transaction's LSN. */ - xfs_alloc_search_busy(tp, INT_GET(agf->agf_seqno, ARCH_CONVERT), bno, 1); + xfs_alloc_search_busy(tp, be32_to_cpu(agf->agf_seqno), bno, 1); return 0; } @@ -2111,18 +2103,18 @@ xfs_alloc_put_freelist( mp = tp->t_mountp; if (!agflbp && (error = xfs_alloc_read_agfl(mp, tp, - INT_GET(agf->agf_seqno, ARCH_CONVERT), &agflbp))) + be32_to_cpu(agf->agf_seqno), &agflbp))) return error; agfl = XFS_BUF_TO_AGFL(agflbp); - INT_MOD(agf->agf_fllast, ARCH_CONVERT, 1); - if (INT_GET(agf->agf_fllast, ARCH_CONVERT) == XFS_AGFL_SIZE(mp)) + be32_add(&agf->agf_fllast, 1); + if (be32_to_cpu(agf->agf_fllast) == XFS_AGFL_SIZE(mp)) agf->agf_fllast = 0; - pag = &mp->m_perag[INT_GET(agf->agf_seqno, ARCH_CONVERT)]; - INT_MOD(agf->agf_flcount, ARCH_CONVERT, 1); + pag = &mp->m_perag[be32_to_cpu(agf->agf_seqno)]; + be32_add(&agf->agf_flcount, 1); xfs_trans_agflist_delta(tp, 1); pag->pagf_flcount++; - ASSERT(INT_GET(agf->agf_flcount, ARCH_CONVERT) <= XFS_AGFL_SIZE(mp)); - blockp = &agfl->agfl_bno[INT_GET(agf->agf_fllast, ARCH_CONVERT)]; + ASSERT(be32_to_cpu(agf->agf_flcount) <= XFS_AGFL_SIZE(mp)); + blockp = &agfl->agfl_bno[be32_to_cpu(agf->agf_fllast)]; INT_SET(*blockp, ARCH_CONVERT, bno); TRACE_MODAGF(NULL, agf, XFS_AGF_FLLAST | XFS_AGF_FLCOUNT); xfs_alloc_log_agf(tp, agbp, XFS_AGF_FLLAST | XFS_AGF_FLCOUNT); @@ -2169,14 +2161,12 @@ xfs_alloc_read_agf( */ agf = XFS_BUF_TO_AGF(bp); agf_ok = - INT_GET(agf->agf_magicnum, ARCH_CONVERT) == XFS_AGF_MAGIC && - XFS_AGF_GOOD_VERSION( - INT_GET(agf->agf_versionnum, ARCH_CONVERT)) && - INT_GET(agf->agf_freeblks, ARCH_CONVERT) <= - INT_GET(agf->agf_length, ARCH_CONVERT) && - INT_GET(agf->agf_flfirst, ARCH_CONVERT) < XFS_AGFL_SIZE(mp) && - INT_GET(agf->agf_fllast, ARCH_CONVERT) < XFS_AGFL_SIZE(mp) && - INT_GET(agf->agf_flcount, ARCH_CONVERT) <= XFS_AGFL_SIZE(mp); + be32_to_cpu(agf->agf_magicnum) == XFS_AGF_MAGIC && + XFS_AGF_GOOD_VERSION(be32_to_cpu(agf->agf_versionnum)) && + be32_to_cpu(agf->agf_freeblks) <= be32_to_cpu(agf->agf_length) && + be32_to_cpu(agf->agf_flfirst) < XFS_AGFL_SIZE(mp) && + be32_to_cpu(agf->agf_fllast) < XFS_AGFL_SIZE(mp) && + be32_to_cpu(agf->agf_flcount) <= XFS_AGFL_SIZE(mp); if (unlikely(XFS_TEST_ERROR(!agf_ok, mp, XFS_ERRTAG_ALLOC_READ_AGF, XFS_RANDOM_ALLOC_READ_AGF))) { XFS_CORRUPTION_ERROR("xfs_alloc_read_agf", @@ -2186,13 +2176,13 @@ xfs_alloc_read_agf( } pag = &mp->m_perag[agno]; if (!pag->pagf_init) { - pag->pagf_freeblks = INT_GET(agf->agf_freeblks, ARCH_CONVERT); - pag->pagf_flcount = INT_GET(agf->agf_flcount, ARCH_CONVERT); - pag->pagf_longest = INT_GET(agf->agf_longest, ARCH_CONVERT); + pag->pagf_freeblks = be32_to_cpu(agf->agf_freeblks); + pag->pagf_flcount = be32_to_cpu(agf->agf_flcount); + pag->pagf_longest = be32_to_cpu(agf->agf_longest); pag->pagf_levels[XFS_BTNUM_BNOi] = - INT_GET(agf->agf_levels[XFS_BTNUM_BNOi], ARCH_CONVERT); + be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNOi]); pag->pagf_levels[XFS_BTNUM_CNTi] = - INT_GET(agf->agf_levels[XFS_BTNUM_CNTi], ARCH_CONVERT); + be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNTi]); spinlock_init(&pag->pagb_lock, "xfspagb"); pag->pagb_list = kmem_zalloc(XFS_PAGB_NUM_SLOTS * sizeof(xfs_perag_busy_t), KM_SLEEP); @@ -2200,13 +2190,13 @@ xfs_alloc_read_agf( } #ifdef DEBUG else if (!XFS_FORCED_SHUTDOWN(mp)) { - ASSERT(pag->pagf_freeblks == INT_GET(agf->agf_freeblks, ARCH_CONVERT)); - ASSERT(pag->pagf_flcount == INT_GET(agf->agf_flcount, ARCH_CONVERT)); - ASSERT(pag->pagf_longest == INT_GET(agf->agf_longest, ARCH_CONVERT)); + ASSERT(pag->pagf_freeblks == be32_to_cpu(agf->agf_freeblks)); + ASSERT(pag->pagf_flcount == be32_to_cpu(agf->agf_flcount)); + ASSERT(pag->pagf_longest == be32_to_cpu(agf->agf_longest)); ASSERT(pag->pagf_levels[XFS_BTNUM_BNOi] == - INT_GET(agf->agf_levels[XFS_BTNUM_BNOi], ARCH_CONVERT)); + be32_to_cpu(agf->agf_levels[XFS_BTNUM_BNOi])); ASSERT(pag->pagf_levels[XFS_BTNUM_CNTi] == - INT_GET(agf->agf_levels[XFS_BTNUM_CNTi], ARCH_CONVERT)); + be32_to_cpu(agf->agf_levels[XFS_BTNUM_CNTi])); } #endif XFS_BUF_SET_VTYPE_REF(bp, B_FS_AGF, XFS_AGF_REF); @@ -2455,7 +2445,7 @@ xfs_free_extent( #ifdef DEBUG ASSERT(args.agbp != NULL); agf = XFS_BUF_TO_AGF(args.agbp); - ASSERT(args.agbno + len <= INT_GET(agf->agf_length, ARCH_CONVERT)); + ASSERT(args.agbno + len <= be32_to_cpu(agf->agf_length)); #endif error = xfs_free_ag_extent(tp, args.agbp, args.agno, args.agbno, len, 0); diff --git a/fs/xfs/xfs_alloc_btree.c b/fs/xfs/xfs_alloc_btree.c index 7ecc8c0611d..a1d92da86cc 100644 --- a/fs/xfs/xfs_alloc_btree.c +++ b/fs/xfs/xfs_alloc_btree.c @@ -117,7 +117,7 @@ xfs_alloc_delrec( /* * Fail if we're off the end of the block. */ - if (ptr > INT_GET(block->bb_numrecs, ARCH_CONVERT)) { + if (ptr > be16_to_cpu(block->bb_numrecs)) { *stat = 0; return 0; } @@ -131,18 +131,18 @@ xfs_alloc_delrec( lkp = XFS_ALLOC_KEY_ADDR(block, 1, cur); lpp = XFS_ALLOC_PTR_ADDR(block, 1, cur); #ifdef DEBUG - for (i = ptr; i < INT_GET(block->bb_numrecs, ARCH_CONVERT); i++) { - if ((error = xfs_btree_check_sptr(cur, INT_GET(lpp[i], ARCH_CONVERT), level))) + for (i = ptr; i < be16_to_cpu(block->bb_numrecs); i++) { + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(lpp[i]), level))) return error; } #endif - if (ptr < INT_GET(block->bb_numrecs, ARCH_CONVERT)) { + if (ptr < be16_to_cpu(block->bb_numrecs)) { memmove(&lkp[ptr - 1], &lkp[ptr], - (INT_GET(block->bb_numrecs, ARCH_CONVERT) - ptr) * sizeof(*lkp)); /* INT_: mem copy */ + (be16_to_cpu(block->bb_numrecs) - ptr) * sizeof(*lkp)); memmove(&lpp[ptr - 1], &lpp[ptr], - (INT_GET(block->bb_numrecs, ARCH_CONVERT) - ptr) * sizeof(*lpp)); /* INT_: mem copy */ - xfs_alloc_log_ptrs(cur, bp, ptr, INT_GET(block->bb_numrecs, ARCH_CONVERT) - 1); - xfs_alloc_log_keys(cur, bp, ptr, INT_GET(block->bb_numrecs, ARCH_CONVERT) - 1); + (be16_to_cpu(block->bb_numrecs) - ptr) * sizeof(*lpp)); + xfs_alloc_log_ptrs(cur, bp, ptr, be16_to_cpu(block->bb_numrecs) - 1); + xfs_alloc_log_keys(cur, bp, ptr, be16_to_cpu(block->bb_numrecs) - 1); } } /* @@ -151,25 +151,25 @@ xfs_alloc_delrec( */ else { lrp = XFS_ALLOC_REC_ADDR(block, 1, cur); - if (ptr < INT_GET(block->bb_numrecs, ARCH_CONVERT)) { + if (ptr < be16_to_cpu(block->bb_numrecs)) { memmove(&lrp[ptr - 1], &lrp[ptr], - (INT_GET(block->bb_numrecs, ARCH_CONVERT) - ptr) * sizeof(*lrp)); - xfs_alloc_log_recs(cur, bp, ptr, INT_GET(block->bb_numrecs, ARCH_CONVERT) - 1); + (be16_to_cpu(block->bb_numrecs) - ptr) * sizeof(*lrp)); + xfs_alloc_log_recs(cur, bp, ptr, be16_to_cpu(block->bb_numrecs) - 1); } /* * If it's the first record in the block, we'll need a key * structure to pass up to the next level (updkey). */ if (ptr == 1) { - key.ar_startblock = lrp->ar_startblock; /* INT_: direct copy */ - key.ar_blockcount = lrp->ar_blockcount; /* INT_: direct copy */ + key.ar_startblock = lrp->ar_startblock; + key.ar_blockcount = lrp->ar_blockcount; lkp = &key; } } /* * Decrement and log the number of entries in the block. */ - INT_MOD(block->bb_numrecs, ARCH_CONVERT, -1); + be16_add(&block->bb_numrecs, -1); xfs_alloc_log_block(cur->bc_tp, bp, XFS_BB_NUMRECS); /* * See if the longest free extent in the allocation group was @@ -182,24 +182,24 @@ xfs_alloc_delrec( if (level == 0 && cur->bc_btnum == XFS_BTNUM_CNT && - INT_GET(block->bb_rightsib, ARCH_CONVERT) == NULLAGBLOCK && - ptr > INT_GET(block->bb_numrecs, ARCH_CONVERT)) { - ASSERT(ptr == INT_GET(block->bb_numrecs, ARCH_CONVERT) + 1); + be32_to_cpu(block->bb_rightsib) == NULLAGBLOCK && + ptr > be16_to_cpu(block->bb_numrecs)) { + ASSERT(ptr == be16_to_cpu(block->bb_numrecs) + 1); /* * There are still records in the block. Grab the size * from the last one. */ - if (INT_GET(block->bb_numrecs, ARCH_CONVERT)) { - rrp = XFS_ALLOC_REC_ADDR(block, INT_GET(block->bb_numrecs, ARCH_CONVERT), cur); - INT_COPY(agf->agf_longest, rrp->ar_blockcount, ARCH_CONVERT); + if (be16_to_cpu(block->bb_numrecs)) { + rrp = XFS_ALLOC_REC_ADDR(block, be16_to_cpu(block->bb_numrecs), cur); + agf->agf_longest = rrp->ar_blockcount; } /* * No free extents left. */ else agf->agf_longest = 0; - mp->m_perag[INT_GET(agf->agf_seqno, ARCH_CONVERT)].pagf_longest = - INT_GET(agf->agf_longest, ARCH_CONVERT); + mp->m_perag[be32_to_cpu(agf->agf_seqno)].pagf_longest = + be32_to_cpu(agf->agf_longest); xfs_alloc_log_agf(cur->bc_tp, cur->bc_private.a.agbp, XFS_AGF_LONGEST); } @@ -213,15 +213,15 @@ xfs_alloc_delrec( * and it's NOT the leaf level, * then we can get rid of this level. */ - if (INT_GET(block->bb_numrecs, ARCH_CONVERT) == 1 && level > 0) { + if (be16_to_cpu(block->bb_numrecs) == 1 && level > 0) { /* * lpp is still set to the first pointer in the block. * Make it the new root of the btree. */ - bno = INT_GET(agf->agf_roots[cur->bc_btnum], ARCH_CONVERT); - INT_COPY(agf->agf_roots[cur->bc_btnum], *lpp, ARCH_CONVERT); - INT_MOD(agf->agf_levels[cur->bc_btnum], ARCH_CONVERT, -1); - mp->m_perag[INT_GET(agf->agf_seqno, ARCH_CONVERT)].pagf_levels[cur->bc_btnum]--; + bno = be32_to_cpu(agf->agf_roots[cur->bc_btnum]); + agf->agf_roots[cur->bc_btnum] = *lpp; + be32_add(&agf->agf_levels[cur->bc_btnum], -1); + mp->m_perag[be32_to_cpu(agf->agf_seqno)].pagf_levels[cur->bc_btnum]--; /* * Put this buffer/block on the ag's freelist. */ @@ -243,7 +243,7 @@ xfs_alloc_delrec( * that freed the block. */ xfs_alloc_mark_busy(cur->bc_tp, - INT_GET(agf->agf_seqno, ARCH_CONVERT), bno, 1); + be32_to_cpu(agf->agf_seqno), bno, 1); xfs_trans_agbtree_delta(cur->bc_tp, -1); xfs_alloc_log_agf(cur->bc_tp, cur->bc_private.a.agbp, @@ -269,7 +269,7 @@ xfs_alloc_delrec( * If the number of records remaining in the block is at least * the minimum, we're done. */ - if (INT_GET(block->bb_numrecs, ARCH_CONVERT) >= XFS_ALLOC_BLOCK_MINRECS(level, cur)) { + if (be16_to_cpu(block->bb_numrecs) >= XFS_ALLOC_BLOCK_MINRECS(level, cur)) { if (level > 0 && (error = xfs_alloc_decrement(cur, level, &i))) return error; *stat = 1; @@ -280,8 +280,8 @@ xfs_alloc_delrec( * tree balanced. Look at the left and right sibling blocks to * see if we can re-balance by moving only one record. */ - rbno = INT_GET(block->bb_rightsib, ARCH_CONVERT); - lbno = INT_GET(block->bb_leftsib, ARCH_CONVERT); + rbno = be32_to_cpu(block->bb_rightsib); + lbno = be32_to_cpu(block->bb_leftsib); bno = NULLAGBLOCK; ASSERT(rbno != NULLAGBLOCK || lbno != NULLAGBLOCK); /* @@ -318,18 +318,18 @@ xfs_alloc_delrec( /* * Grab the current block number, for future use. */ - bno = INT_GET(right->bb_leftsib, ARCH_CONVERT); + bno = be32_to_cpu(right->bb_leftsib); /* * If right block is full enough so that removing one entry * won't make it too empty, and left-shifting an entry out * of right to us works, we're done. */ - if (INT_GET(right->bb_numrecs, ARCH_CONVERT) - 1 >= + if (be16_to_cpu(right->bb_numrecs) - 1 >= XFS_ALLOC_BLOCK_MINRECS(level, cur)) { if ((error = xfs_alloc_lshift(tcur, level, &i))) goto error0; if (i) { - ASSERT(INT_GET(block->bb_numrecs, ARCH_CONVERT) >= + ASSERT(be16_to_cpu(block->bb_numrecs) >= XFS_ALLOC_BLOCK_MINRECS(level, cur)); xfs_btree_del_cursor(tcur, XFS_BTREE_NOERROR); @@ -346,7 +346,7 @@ xfs_alloc_delrec( * future reference, and fix up the temp cursor to point * to our block again (last record). */ - rrecs = INT_GET(right->bb_numrecs, ARCH_CONVERT); + rrecs = be16_to_cpu(right->bb_numrecs); if (lbno != NULLAGBLOCK) { i = xfs_btree_firstrec(tcur, level); XFS_WANT_CORRUPTED_GOTO(i == 1, error0); @@ -382,18 +382,18 @@ xfs_alloc_delrec( /* * Grab the current block number, for future use. */ - bno = INT_GET(left->bb_rightsib, ARCH_CONVERT); + bno = be32_to_cpu(left->bb_rightsib); /* * If left block is full enough so that removing one entry * won't make it too empty, and right-shifting an entry out * of left to us works, we're done. */ - if (INT_GET(left->bb_numrecs, ARCH_CONVERT) - 1 >= + if (be16_to_cpu(left->bb_numrecs) - 1 >= XFS_ALLOC_BLOCK_MINRECS(level, cur)) { if ((error = xfs_alloc_rshift(tcur, level, &i))) goto error0; if (i) { - ASSERT(INT_GET(block->bb_numrecs, ARCH_CONVERT) >= + ASSERT(be16_to_cpu(block->bb_numrecs) >= XFS_ALLOC_BLOCK_MINRECS(level, cur)); xfs_btree_del_cursor(tcur, XFS_BTREE_NOERROR); @@ -407,7 +407,7 @@ xfs_alloc_delrec( * Otherwise, grab the number of records in right for * future reference. */ - lrecs = INT_GET(left->bb_numrecs, ARCH_CONVERT); + lrecs = be16_to_cpu(left->bb_numrecs); } /* * Delete the temp cursor, we're done with it. @@ -421,7 +421,7 @@ xfs_alloc_delrec( * See if we can join with the left neighbor block. */ if (lbno != NULLAGBLOCK && - lrecs + INT_GET(block->bb_numrecs, ARCH_CONVERT) <= XFS_ALLOC_BLOCK_MAXRECS(level, cur)) { + lrecs + be16_to_cpu(block->bb_numrecs) <= XFS_ALLOC_BLOCK_MAXRECS(level, cur)) { /* * Set "right" to be the starting block, * "left" to be the left neighbor. @@ -441,7 +441,7 @@ xfs_alloc_delrec( * If that won't work, see if we can join with the right neighbor block. */ else if (rbno != NULLAGBLOCK && - rrecs + INT_GET(block->bb_numrecs, ARCH_CONVERT) <= + rrecs + be16_to_cpu(block->bb_numrecs) <= XFS_ALLOC_BLOCK_MAXRECS(level, cur)) { /* * Set "left" to be the starting block, @@ -476,31 +476,34 @@ xfs_alloc_delrec( /* * It's a non-leaf. Move keys and pointers. */ - lkp = XFS_ALLOC_KEY_ADDR(left, INT_GET(left->bb_numrecs, ARCH_CONVERT) + 1, cur); - lpp = XFS_ALLOC_PTR_ADDR(left, INT_GET(left->bb_numrecs, ARCH_CONVERT) + 1, cur); + lkp = XFS_ALLOC_KEY_ADDR(left, be16_to_cpu(left->bb_numrecs) + 1, cur); + lpp = XFS_ALLOC_PTR_ADDR(left, be16_to_cpu(left->bb_numrecs) + 1, cur); rkp = XFS_ALLOC_KEY_ADDR(right, 1, cur); rpp = XFS_ALLOC_PTR_ADDR(right, 1, cur); #ifdef DEBUG - for (i = 0; i < INT_GET(right->bb_numrecs, ARCH_CONVERT); i++) { - if ((error = xfs_btree_check_sptr(cur, INT_GET(rpp[i], ARCH_CONVERT), level))) + for (i = 0; i < be16_to_cpu(right->bb_numrecs); i++) { + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(rpp[i]), level))) return error; } #endif - memcpy(lkp, rkp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*lkp)); /* INT_: structure copy */ - memcpy(lpp, rpp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*lpp)); /* INT_: structure copy */ - xfs_alloc_log_keys(cur, lbp, INT_GET(left->bb_numrecs, ARCH_CONVERT) + 1, - INT_GET(left->bb_numrecs, ARCH_CONVERT) + INT_GET(right->bb_numrecs, ARCH_CONVERT)); - xfs_alloc_log_ptrs(cur, lbp, INT_GET(left->bb_numrecs, ARCH_CONVERT) + 1, - INT_GET(left->bb_numrecs, ARCH_CONVERT) + INT_GET(right->bb_numrecs, ARCH_CONVERT)); + memcpy(lkp, rkp, be16_to_cpu(right->bb_numrecs) * sizeof(*lkp)); + memcpy(lpp, rpp, be16_to_cpu(right->bb_numrecs) * sizeof(*lpp)); + xfs_alloc_log_keys(cur, lbp, be16_to_cpu(left->bb_numrecs) + 1, + be16_to_cpu(left->bb_numrecs) + + be16_to_cpu(right->bb_numrecs)); + xfs_alloc_log_ptrs(cur, lbp, be16_to_cpu(left->bb_numrecs) + 1, + be16_to_cpu(left->bb_numrecs) + + be16_to_cpu(right->bb_numrecs)); } else { /* * It's a leaf. Move records. */ - lrp = XFS_ALLOC_REC_ADDR(left, INT_GET(left->bb_numrecs, ARCH_CONVERT) + 1, cur); + lrp = XFS_ALLOC_REC_ADDR(left, be16_to_cpu(left->bb_numrecs) + 1, cur); rrp = XFS_ALLOC_REC_ADDR(right, 1, cur); - memcpy(lrp, rrp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*lrp)); - xfs_alloc_log_recs(cur, lbp, INT_GET(left->bb_numrecs, ARCH_CONVERT) + 1, - INT_GET(left->bb_numrecs, ARCH_CONVERT) + INT_GET(right->bb_numrecs, ARCH_CONVERT)); + memcpy(lrp, rrp, be16_to_cpu(right->bb_numrecs) * sizeof(*lrp)); + xfs_alloc_log_recs(cur, lbp, be16_to_cpu(left->bb_numrecs) + 1, + be16_to_cpu(left->bb_numrecs) + + be16_to_cpu(right->bb_numrecs)); } /* * If we joined with the left neighbor, set the buffer in the @@ -508,7 +511,7 @@ xfs_alloc_delrec( */ if (bp != lbp) { xfs_btree_setbuf(cur, level, lbp); - cur->bc_ptrs[level] += INT_GET(left->bb_numrecs, ARCH_CONVERT); + cur->bc_ptrs[level] += be16_to_cpu(left->bb_numrecs); } /* * If we joined with the right neighbor and there's a level above @@ -520,28 +523,28 @@ xfs_alloc_delrec( /* * Fix up the number of records in the surviving block. */ - INT_MOD(left->bb_numrecs, ARCH_CONVERT, INT_GET(right->bb_numrecs, ARCH_CONVERT)); + be16_add(&left->bb_numrecs, be16_to_cpu(right->bb_numrecs)); /* * Fix up the right block pointer in the surviving block, and log it. */ - left->bb_rightsib = right->bb_rightsib; /* INT_: direct copy */ + left->bb_rightsib = right->bb_rightsib; xfs_alloc_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS | XFS_BB_RIGHTSIB); /* * If there is a right sibling now, make it point to the * remaining block. */ - if (INT_GET(left->bb_rightsib, ARCH_CONVERT) != NULLAGBLOCK) { + if (be32_to_cpu(left->bb_rightsib) != NULLAGBLOCK) { xfs_alloc_block_t *rrblock; xfs_buf_t *rrbp; if ((error = xfs_btree_read_bufs(mp, cur->bc_tp, - cur->bc_private.a.agno, INT_GET(left->bb_rightsib, ARCH_CONVERT), 0, + cur->bc_private.a.agno, be32_to_cpu(left->bb_rightsib), 0, &rrbp, XFS_ALLOC_BTREE_REF))) return error; rrblock = XFS_BUF_TO_ALLOC_BLOCK(rrbp); if ((error = xfs_btree_check_sblock(cur, rrblock, level, rrbp))) return error; - INT_SET(rrblock->bb_leftsib, ARCH_CONVERT, lbno); + rrblock->bb_leftsib = cpu_to_be32(lbno); xfs_alloc_log_block(cur->bc_tp, rrbp, XFS_BB_LEFTSIB); } /* @@ -562,10 +565,9 @@ xfs_alloc_delrec( * busy block is allocated, the iclog is pushed up to the * LSN that freed the block. */ - xfs_alloc_mark_busy(cur->bc_tp, - INT_GET(agf->agf_seqno, ARCH_CONVERT), bno, 1); - + xfs_alloc_mark_busy(cur->bc_tp, be32_to_cpu(agf->agf_seqno), bno, 1); xfs_trans_agbtree_delta(cur->bc_tp, -1); + /* * Adjust the current level's cursor so that we're left referring * to the right node, after we're done. @@ -613,7 +615,7 @@ xfs_alloc_insrec( int ptr; /* index in btree block for this rec */ xfs_alloc_rec_t *rp; /* pointer to btree records */ - ASSERT(INT_GET(recp->ar_blockcount, ARCH_CONVERT) > 0); + ASSERT(be32_to_cpu(recp->ar_blockcount) > 0); /* * GCC doesn't understand the (arguably complex) control flow in @@ -637,8 +639,8 @@ xfs_alloc_insrec( /* * Make a key out of the record data to be inserted, and save it. */ - key.ar_startblock = recp->ar_startblock; /* INT_: direct copy */ - key.ar_blockcount = recp->ar_blockcount; /* INT_: direct copy */ + key.ar_startblock = recp->ar_startblock; + key.ar_blockcount = recp->ar_blockcount; optr = ptr = cur->bc_ptrs[level]; /* * If we're off the left edge, return failure. @@ -659,7 +661,7 @@ xfs_alloc_insrec( /* * Check that the new entry is being inserted in the right place. */ - if (ptr <= INT_GET(block->bb_numrecs, ARCH_CONVERT)) { + if (ptr <= be16_to_cpu(block->bb_numrecs)) { if (level == 0) { rp = XFS_ALLOC_REC_ADDR(block, ptr, cur); xfs_btree_check_rec(cur->bc_btnum, recp, rp); @@ -675,7 +677,7 @@ xfs_alloc_insrec( * If the block is full, we can't insert the new entry until we * make the block un-full. */ - if (INT_GET(block->bb_numrecs, ARCH_CONVERT) == XFS_ALLOC_BLOCK_MAXRECS(level, cur)) { + if (be16_to_cpu(block->bb_numrecs) == XFS_ALLOC_BLOCK_MAXRECS(level, cur)) { /* * First, try shifting an entry to the right neighbor. */ @@ -712,8 +714,8 @@ xfs_alloc_insrec( return error; #endif ptr = cur->bc_ptrs[level]; - nrec.ar_startblock = nkey.ar_startblock; /* INT_: direct copy */ - nrec.ar_blockcount = nkey.ar_blockcount; /* INT_: direct copy */ + nrec.ar_startblock = nkey.ar_startblock; + nrec.ar_blockcount = nkey.ar_blockcount; } /* * Otherwise the insert fails. @@ -737,15 +739,15 @@ xfs_alloc_insrec( kp = XFS_ALLOC_KEY_ADDR(block, 1, cur); pp = XFS_ALLOC_PTR_ADDR(block, 1, cur); #ifdef DEBUG - for (i = INT_GET(block->bb_numrecs, ARCH_CONVERT); i >= ptr; i--) { - if ((error = xfs_btree_check_sptr(cur, INT_GET(pp[i - 1], ARCH_CONVERT), level))) + for (i = be16_to_cpu(block->bb_numrecs); i >= ptr; i--) { + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(pp[i - 1]), level))) return error; } #endif memmove(&kp[ptr], &kp[ptr - 1], - (INT_GET(block->bb_numrecs, ARCH_CONVERT) - ptr + 1) * sizeof(*kp)); /* INT_: copy */ + (be16_to_cpu(block->bb_numrecs) - ptr + 1) * sizeof(*kp)); memmove(&pp[ptr], &pp[ptr - 1], - (INT_GET(block->bb_numrecs, ARCH_CONVERT) - ptr + 1) * sizeof(*pp)); /* INT_: copy */ + (be16_to_cpu(block->bb_numrecs) - ptr + 1) * sizeof(*pp)); #ifdef DEBUG if ((error = xfs_btree_check_sptr(cur, *bnop, level))) return error; @@ -754,12 +756,12 @@ xfs_alloc_insrec( * Now stuff the new data in, bump numrecs and log the new data. */ kp[ptr - 1] = key; - INT_SET(pp[ptr - 1], ARCH_CONVERT, *bnop); - INT_MOD(block->bb_numrecs, ARCH_CONVERT, +1); - xfs_alloc_log_keys(cur, bp, ptr, INT_GET(block->bb_numrecs, ARCH_CONVERT)); - xfs_alloc_log_ptrs(cur, bp, ptr, INT_GET(block->bb_numrecs, ARCH_CONVERT)); + pp[ptr - 1] = cpu_to_be32(*bnop); + be16_add(&block->bb_numrecs, 1); + xfs_alloc_log_keys(cur, bp, ptr, be16_to_cpu(block->bb_numrecs)); + xfs_alloc_log_ptrs(cur, bp, ptr, be16_to_cpu(block->bb_numrecs)); #ifdef DEBUG - if (ptr < INT_GET(block->bb_numrecs, ARCH_CONVERT)) + if (ptr < be16_to_cpu(block->bb_numrecs)) xfs_btree_check_key(cur->bc_btnum, kp + ptr - 1, kp + ptr); #endif @@ -769,16 +771,16 @@ xfs_alloc_insrec( */ rp = XFS_ALLOC_REC_ADDR(block, 1, cur); memmove(&rp[ptr], &rp[ptr - 1], - (INT_GET(block->bb_numrecs, ARCH_CONVERT) - ptr + 1) * sizeof(*rp)); + (be16_to_cpu(block->bb_numrecs) - ptr + 1) * sizeof(*rp)); /* * Now stuff the new record in, bump numrecs * and log the new data. */ rp[ptr - 1] = *recp; /* INT_: struct copy */ - INT_MOD(block->bb_numrecs, ARCH_CONVERT, +1); - xfs_alloc_log_recs(cur, bp, ptr, INT_GET(block->bb_numrecs, ARCH_CONVERT)); + be16_add(&block->bb_numrecs, 1); + xfs_alloc_log_recs(cur, bp, ptr, be16_to_cpu(block->bb_numrecs)); #ifdef DEBUG - if (ptr < INT_GET(block->bb_numrecs, ARCH_CONVERT)) + if (ptr < be16_to_cpu(block->bb_numrecs)) xfs_btree_check_rec(cur->bc_btnum, rp + ptr - 1, rp + ptr); #endif @@ -800,16 +802,16 @@ xfs_alloc_insrec( agf = XFS_BUF_TO_AGF(cur->bc_private.a.agbp); if (level == 0 && cur->bc_btnum == XFS_BTNUM_CNT && - INT_GET(block->bb_rightsib, ARCH_CONVERT) == NULLAGBLOCK && - INT_GET(recp->ar_blockcount, ARCH_CONVERT) > INT_GET(agf->agf_longest, ARCH_CONVERT)) { + be32_to_cpu(block->bb_rightsib) == NULLAGBLOCK && + be32_to_cpu(recp->ar_blockcount) > be32_to_cpu(agf->agf_longest)) { /* * If this is a leaf in the by-size btree and there * is no right sibling block and this block is bigger * than the previous longest block, update it. */ - INT_COPY(agf->agf_longest, recp->ar_blockcount, ARCH_CONVERT); - cur->bc_mp->m_perag[INT_GET(agf->agf_seqno, ARCH_CONVERT)].pagf_longest - = INT_GET(recp->ar_blockcount, ARCH_CONVERT); + agf->agf_longest = recp->ar_blockcount; + cur->bc_mp->m_perag[be32_to_cpu(agf->agf_seqno)].pagf_longest + = be32_to_cpu(recp->ar_blockcount); xfs_alloc_log_agf(cur->bc_tp, cur->bc_private.a.agbp, XFS_AGF_LONGEST); } @@ -919,8 +921,9 @@ xfs_alloc_log_recs( agf = XFS_BUF_TO_AGF(cur->bc_private.a.agbp); for (p = &rp[rfirst - 1]; p <= &rp[rlast - 1]; p++) - ASSERT(INT_GET(p->ar_startblock, ARCH_CONVERT) + INT_GET(p->ar_blockcount, ARCH_CONVERT) <= - INT_GET(agf->agf_length, ARCH_CONVERT)); + ASSERT(be32_to_cpu(p->ar_startblock) + + be32_to_cpu(p->ar_blockcount) <= + be32_to_cpu(agf->agf_length)); } #endif first = (int)((xfs_caddr_t)&rp[rfirst - 1] - (xfs_caddr_t)block); @@ -957,8 +960,8 @@ xfs_alloc_lookup( xfs_agf_t *agf; /* a.g. freespace header */ agf = XFS_BUF_TO_AGF(cur->bc_private.a.agbp); - agno = INT_GET(agf->agf_seqno, ARCH_CONVERT); - agbno = INT_GET(agf->agf_roots[cur->bc_btnum], ARCH_CONVERT); + agno = be32_to_cpu(agf->agf_seqno); + agbno = be32_to_cpu(agf->agf_roots[cur->bc_btnum]); } /* * Iterate over each level in the btree, starting at the root. @@ -1025,7 +1028,7 @@ xfs_alloc_lookup( * Set low and high entry numbers, 1-based. */ low = 1; - if (!(high = INT_GET(block->bb_numrecs, ARCH_CONVERT))) { + if (!(high = be16_to_cpu(block->bb_numrecs))) { /* * If the block is empty, the tree must * be an empty leaf. @@ -1054,14 +1057,14 @@ xfs_alloc_lookup( xfs_alloc_key_t *kkp; kkp = kkbase + keyno - 1; - startblock = INT_GET(kkp->ar_startblock, ARCH_CONVERT); - blockcount = INT_GET(kkp->ar_blockcount, ARCH_CONVERT); + startblock = be32_to_cpu(kkp->ar_startblock); + blockcount = be32_to_cpu(kkp->ar_blockcount); } else { xfs_alloc_rec_t *krp; krp = krbase + keyno - 1; - startblock = INT_GET(krp->ar_startblock, ARCH_CONVERT); - blockcount = INT_GET(krp->ar_blockcount, ARCH_CONVERT); + startblock = be32_to_cpu(krp->ar_startblock); + blockcount = be32_to_cpu(krp->ar_blockcount); } /* * Compute difference to get next direction. @@ -1101,7 +1104,7 @@ xfs_alloc_lookup( */ if (diff > 0 && --keyno < 1) keyno = 1; - agbno = INT_GET(*XFS_ALLOC_PTR_ADDR(block, keyno, cur), ARCH_CONVERT); + agbno = be32_to_cpu(*XFS_ALLOC_PTR_ADDR(block, keyno, cur)); #ifdef DEBUG if ((error = xfs_btree_check_sptr(cur, agbno, level))) return error; @@ -1120,8 +1123,8 @@ xfs_alloc_lookup( * not the last block, we're in the wrong block. */ if (dir == XFS_LOOKUP_GE && - keyno > INT_GET(block->bb_numrecs, ARCH_CONVERT) && - INT_GET(block->bb_rightsib, ARCH_CONVERT) != NULLAGBLOCK) { + keyno > be16_to_cpu(block->bb_numrecs) && + be32_to_cpu(block->bb_rightsib) != NULLAGBLOCK) { int i; cur->bc_ptrs[0] = keyno; @@ -1138,7 +1141,7 @@ xfs_alloc_lookup( /* * Return if we succeeded or not. */ - if (keyno == 0 || keyno > INT_GET(block->bb_numrecs, ARCH_CONVERT)) + if (keyno == 0 || keyno > be16_to_cpu(block->bb_numrecs)) *stat = 0; else *stat = ((dir != XFS_LOOKUP_EQ) || (diff == 0)); @@ -1181,7 +1184,7 @@ xfs_alloc_lshift( /* * If we've got no left sibling then we can't shift an entry left. */ - if (INT_GET(right->bb_leftsib, ARCH_CONVERT) == NULLAGBLOCK) { + if (be32_to_cpu(right->bb_leftsib) == NULLAGBLOCK) { *stat = 0; return 0; } @@ -1197,8 +1200,8 @@ xfs_alloc_lshift( * Set up the left neighbor as "left". */ if ((error = xfs_btree_read_bufs(cur->bc_mp, cur->bc_tp, - cur->bc_private.a.agno, INT_GET(right->bb_leftsib, ARCH_CONVERT), 0, &lbp, - XFS_ALLOC_BTREE_REF))) + cur->bc_private.a.agno, be32_to_cpu(right->bb_leftsib), + 0, &lbp, XFS_ALLOC_BTREE_REF))) return error; left = XFS_BUF_TO_ALLOC_BLOCK(lbp); if ((error = xfs_btree_check_sblock(cur, left, level, lbp))) @@ -1206,11 +1209,11 @@ xfs_alloc_lshift( /* * If it's full, it can't take another entry. */ - if (INT_GET(left->bb_numrecs, ARCH_CONVERT) == XFS_ALLOC_BLOCK_MAXRECS(level, cur)) { + if (be16_to_cpu(left->bb_numrecs) == XFS_ALLOC_BLOCK_MAXRECS(level, cur)) { *stat = 0; return 0; } - nrec = INT_GET(left->bb_numrecs, ARCH_CONVERT) + 1; + nrec = be16_to_cpu(left->bb_numrecs) + 1; /* * If non-leaf, copy a key and a ptr to the left block. */ @@ -1225,7 +1228,7 @@ xfs_alloc_lshift( lpp = XFS_ALLOC_PTR_ADDR(left, nrec, cur); rpp = XFS_ALLOC_PTR_ADDR(right, 1, cur); #ifdef DEBUG - if ((error = xfs_btree_check_sptr(cur, INT_GET(*rpp, ARCH_CONVERT), level))) + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(*rpp), level))) return error; #endif *lpp = *rpp; /* INT_: copy */ @@ -1247,30 +1250,30 @@ xfs_alloc_lshift( /* * Bump and log left's numrecs, decrement and log right's numrecs. */ - INT_MOD(left->bb_numrecs, ARCH_CONVERT, +1); + be16_add(&left->bb_numrecs, 1); xfs_alloc_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS); - INT_MOD(right->bb_numrecs, ARCH_CONVERT, -1); + be16_add(&right->bb_numrecs, -1); xfs_alloc_log_block(cur->bc_tp, rbp, XFS_BB_NUMRECS); /* * Slide the contents of right down one entry. */ if (level > 0) { #ifdef DEBUG - for (i = 0; i < INT_GET(right->bb_numrecs, ARCH_CONVERT); i++) { - if ((error = xfs_btree_check_sptr(cur, INT_GET(rpp[i + 1], ARCH_CONVERT), + for (i = 0; i < be16_to_cpu(right->bb_numrecs); i++) { + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(rpp[i + 1]), level))) return error; } #endif - memmove(rkp, rkp + 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rkp)); - memmove(rpp, rpp + 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rpp)); - xfs_alloc_log_keys(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); - xfs_alloc_log_ptrs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); + memmove(rkp, rkp + 1, be16_to_cpu(right->bb_numrecs) * sizeof(*rkp)); + memmove(rpp, rpp + 1, be16_to_cpu(right->bb_numrecs) * sizeof(*rpp)); + xfs_alloc_log_keys(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); + xfs_alloc_log_ptrs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); } else { - memmove(rrp, rrp + 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rrp)); - xfs_alloc_log_recs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); - key.ar_startblock = rrp->ar_startblock; /* INT_: direct copy */ - key.ar_blockcount = rrp->ar_blockcount; /* INT_: direct copy */ + memmove(rrp, rrp + 1, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp)); + xfs_alloc_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); + key.ar_startblock = rrp->ar_startblock; + key.ar_blockcount = rrp->ar_blockcount; rkp = &key; } /* @@ -1335,9 +1338,9 @@ xfs_alloc_newroot( xfs_agnumber_t seqno; agf = XFS_BUF_TO_AGF(cur->bc_private.a.agbp); - INT_SET(agf->agf_roots[cur->bc_btnum], ARCH_CONVERT, nbno); - INT_MOD(agf->agf_levels[cur->bc_btnum], ARCH_CONVERT, 1); - seqno = INT_GET(agf->agf_seqno, ARCH_CONVERT); + agf->agf_roots[cur->bc_btnum] = cpu_to_be32(nbno); + be32_add(&agf->agf_levels[cur->bc_btnum], 1); + seqno = be32_to_cpu(agf->agf_seqno); mp->m_perag[seqno].pagf_levels[cur->bc_btnum]++; xfs_alloc_log_agf(cur->bc_tp, cur->bc_private.a.agbp, XFS_AGF_ROOTS | XFS_AGF_LEVELS); @@ -1354,12 +1357,12 @@ xfs_alloc_newroot( if ((error = xfs_btree_check_sblock(cur, left, cur->bc_nlevels - 1, lbp))) return error; #endif - if (INT_GET(left->bb_rightsib, ARCH_CONVERT) != NULLAGBLOCK) { + if (be32_to_cpu(left->bb_rightsib) != NULLAGBLOCK) { /* * Our block is left, pick up the right block. */ lbno = XFS_DADDR_TO_AGBNO(mp, XFS_BUF_ADDR(lbp)); - rbno = INT_GET(left->bb_rightsib, ARCH_CONVERT); + rbno = be32_to_cpu(left->bb_rightsib); if ((error = xfs_btree_read_bufs(mp, cur->bc_tp, cur->bc_private.a.agno, rbno, 0, &rbp, XFS_ALLOC_BTREE_REF))) @@ -1376,7 +1379,7 @@ xfs_alloc_newroot( rbp = lbp; right = left; rbno = XFS_DADDR_TO_AGBNO(mp, XFS_BUF_ADDR(rbp)); - lbno = INT_GET(right->bb_leftsib, ARCH_CONVERT); + lbno = be32_to_cpu(right->bb_leftsib); if ((error = xfs_btree_read_bufs(mp, cur->bc_tp, cur->bc_private.a.agno, lbno, 0, &lbp, XFS_ALLOC_BTREE_REF))) @@ -1390,11 +1393,11 @@ xfs_alloc_newroot( /* * Fill in the new block's btree header and log it. */ - INT_SET(new->bb_magic, ARCH_CONVERT, xfs_magics[cur->bc_btnum]); - INT_SET(new->bb_level, ARCH_CONVERT, (__uint16_t)cur->bc_nlevels); - INT_SET(new->bb_numrecs, ARCH_CONVERT, 2); - INT_SET(new->bb_leftsib, ARCH_CONVERT, NULLAGBLOCK); - INT_SET(new->bb_rightsib, ARCH_CONVERT, NULLAGBLOCK); + new->bb_magic = cpu_to_be32(xfs_magics[cur->bc_btnum]); + new->bb_level = cpu_to_be16(cur->bc_nlevels); + new->bb_numrecs = cpu_to_be16(2); + new->bb_leftsib = cpu_to_be32(NULLAGBLOCK); + new->bb_rightsib = cpu_to_be32(NULLAGBLOCK); xfs_alloc_log_block(cur->bc_tp, nbp, XFS_BB_ALL_BITS); ASSERT(lbno != NULLAGBLOCK && rbno != NULLAGBLOCK); /* @@ -1404,18 +1407,18 @@ xfs_alloc_newroot( xfs_alloc_key_t *kp; /* btree key pointer */ kp = XFS_ALLOC_KEY_ADDR(new, 1, cur); - if (INT_GET(left->bb_level, ARCH_CONVERT) > 0) { + if (be16_to_cpu(left->bb_level) > 0) { kp[0] = *XFS_ALLOC_KEY_ADDR(left, 1, cur); /* INT_: structure copy */ kp[1] = *XFS_ALLOC_KEY_ADDR(right, 1, cur);/* INT_: structure copy */ } else { xfs_alloc_rec_t *rp; /* btree record pointer */ rp = XFS_ALLOC_REC_ADDR(left, 1, cur); - kp[0].ar_startblock = rp->ar_startblock; /* INT_: direct copy */ - kp[0].ar_blockcount = rp->ar_blockcount; /* INT_: direct copy */ + kp[0].ar_startblock = rp->ar_startblock; + kp[0].ar_blockcount = rp->ar_blockcount; rp = XFS_ALLOC_REC_ADDR(right, 1, cur); - kp[1].ar_startblock = rp->ar_startblock; /* INT_: direct copy */ - kp[1].ar_blockcount = rp->ar_blockcount; /* INT_: direct copy */ + kp[1].ar_startblock = rp->ar_startblock; + kp[1].ar_blockcount = rp->ar_blockcount; } } xfs_alloc_log_keys(cur, nbp, 1, 2); @@ -1426,8 +1429,8 @@ xfs_alloc_newroot( xfs_alloc_ptr_t *pp; /* btree address pointer */ pp = XFS_ALLOC_PTR_ADDR(new, 1, cur); - INT_SET(pp[0], ARCH_CONVERT, lbno); - INT_SET(pp[1], ARCH_CONVERT, rbno); + pp[0] = cpu_to_be32(lbno); + pp[1] = cpu_to_be32(rbno); } xfs_alloc_log_ptrs(cur, nbp, 1, 2); /* @@ -1472,7 +1475,7 @@ xfs_alloc_rshift( /* * If we've got no right sibling then we can't shift an entry right. */ - if (INT_GET(left->bb_rightsib, ARCH_CONVERT) == NULLAGBLOCK) { + if (be32_to_cpu(left->bb_rightsib) == NULLAGBLOCK) { *stat = 0; return 0; } @@ -1480,7 +1483,7 @@ xfs_alloc_rshift( * If the cursor entry is the one that would be moved, don't * do it... it's too complicated. */ - if (cur->bc_ptrs[level] >= INT_GET(left->bb_numrecs, ARCH_CONVERT)) { + if (cur->bc_ptrs[level] >= be16_to_cpu(left->bb_numrecs)) { *stat = 0; return 0; } @@ -1488,8 +1491,8 @@ xfs_alloc_rshift( * Set up the right neighbor as "right". */ if ((error = xfs_btree_read_bufs(cur->bc_mp, cur->bc_tp, - cur->bc_private.a.agno, INT_GET(left->bb_rightsib, ARCH_CONVERT), 0, &rbp, - XFS_ALLOC_BTREE_REF))) + cur->bc_private.a.agno, be32_to_cpu(left->bb_rightsib), + 0, &rbp, XFS_ALLOC_BTREE_REF))) return error; right = XFS_BUF_TO_ALLOC_BLOCK(rbp); if ((error = xfs_btree_check_sblock(cur, right, level, rbp))) @@ -1497,7 +1500,7 @@ xfs_alloc_rshift( /* * If it's full, it can't take another entry. */ - if (INT_GET(right->bb_numrecs, ARCH_CONVERT) == XFS_ALLOC_BLOCK_MAXRECS(level, cur)) { + if (be16_to_cpu(right->bb_numrecs) == XFS_ALLOC_BLOCK_MAXRECS(level, cur)) { *stat = 0; return 0; } @@ -1510,47 +1513,47 @@ xfs_alloc_rshift( xfs_alloc_ptr_t *lpp; /* address pointer for left block */ xfs_alloc_ptr_t *rpp; /* address pointer for right block */ - lkp = XFS_ALLOC_KEY_ADDR(left, INT_GET(left->bb_numrecs, ARCH_CONVERT), cur); - lpp = XFS_ALLOC_PTR_ADDR(left, INT_GET(left->bb_numrecs, ARCH_CONVERT), cur); + lkp = XFS_ALLOC_KEY_ADDR(left, be16_to_cpu(left->bb_numrecs), cur); + lpp = XFS_ALLOC_PTR_ADDR(left, be16_to_cpu(left->bb_numrecs), cur); rkp = XFS_ALLOC_KEY_ADDR(right, 1, cur); rpp = XFS_ALLOC_PTR_ADDR(right, 1, cur); #ifdef DEBUG - for (i = INT_GET(right->bb_numrecs, ARCH_CONVERT) - 1; i >= 0; i--) { - if ((error = xfs_btree_check_sptr(cur, INT_GET(rpp[i], ARCH_CONVERT), level))) + for (i = be16_to_cpu(right->bb_numrecs) - 1; i >= 0; i--) { + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(rpp[i]), level))) return error; } #endif - memmove(rkp + 1, rkp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rkp)); - memmove(rpp + 1, rpp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rpp)); + memmove(rkp + 1, rkp, be16_to_cpu(right->bb_numrecs) * sizeof(*rkp)); + memmove(rpp + 1, rpp, be16_to_cpu(right->bb_numrecs) * sizeof(*rpp)); #ifdef DEBUG - if ((error = xfs_btree_check_sptr(cur, INT_GET(*lpp, ARCH_CONVERT), level))) + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(*lpp), level))) return error; #endif *rkp = *lkp; /* INT_: copy */ *rpp = *lpp; /* INT_: copy */ - xfs_alloc_log_keys(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1); - xfs_alloc_log_ptrs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1); + xfs_alloc_log_keys(cur, rbp, 1, be16_to_cpu(right->bb_numrecs) + 1); + xfs_alloc_log_ptrs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs) + 1); xfs_btree_check_key(cur->bc_btnum, rkp, rkp + 1); } else { xfs_alloc_rec_t *lrp; /* record pointer for left block */ xfs_alloc_rec_t *rrp; /* record pointer for right block */ - lrp = XFS_ALLOC_REC_ADDR(left, INT_GET(left->bb_numrecs, ARCH_CONVERT), cur); + lrp = XFS_ALLOC_REC_ADDR(left, be16_to_cpu(left->bb_numrecs), cur); rrp = XFS_ALLOC_REC_ADDR(right, 1, cur); - memmove(rrp + 1, rrp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rrp)); + memmove(rrp + 1, rrp, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp)); *rrp = *lrp; - xfs_alloc_log_recs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1); - key.ar_startblock = rrp->ar_startblock; /* INT_: direct copy */ - key.ar_blockcount = rrp->ar_blockcount; /* INT_: direct copy */ + xfs_alloc_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs) + 1); + key.ar_startblock = rrp->ar_startblock; + key.ar_blockcount = rrp->ar_blockcount; rkp = &key; xfs_btree_check_rec(cur->bc_btnum, rrp, rrp + 1); } /* * Decrement and log left's numrecs, bump and log right's numrecs. */ - INT_MOD(left->bb_numrecs, ARCH_CONVERT, -1); + be16_add(&left->bb_numrecs, -1); xfs_alloc_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS); - INT_MOD(right->bb_numrecs, ARCH_CONVERT, +1); + be16_add(&right->bb_numrecs, 1); xfs_alloc_log_block(cur->bc_tp, rbp, XFS_BB_NUMRECS); /* * Using a temporary cursor, update the parent key values of the @@ -1623,17 +1626,17 @@ xfs_alloc_split( /* * Fill in the btree header for the new block. */ - INT_SET(right->bb_magic, ARCH_CONVERT, xfs_magics[cur->bc_btnum]); - right->bb_level = left->bb_level; /* INT_: direct copy */ - INT_SET(right->bb_numrecs, ARCH_CONVERT, (__uint16_t)(INT_GET(left->bb_numrecs, ARCH_CONVERT) / 2)); + right->bb_magic = cpu_to_be32(xfs_magics[cur->bc_btnum]); + right->bb_level = left->bb_level; + right->bb_numrecs = cpu_to_be16(be16_to_cpu(left->bb_numrecs) / 2); /* * Make sure that if there's an odd number of entries now, that * each new block will have the same number of entries. */ - if ((INT_GET(left->bb_numrecs, ARCH_CONVERT) & 1) && - cur->bc_ptrs[level] <= INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1) - INT_MOD(right->bb_numrecs, ARCH_CONVERT, +1); - i = INT_GET(left->bb_numrecs, ARCH_CONVERT) - INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1; + if ((be16_to_cpu(left->bb_numrecs) & 1) && + cur->bc_ptrs[level] <= be16_to_cpu(right->bb_numrecs) + 1) + be16_add(&right->bb_numrecs, 1); + i = be16_to_cpu(left->bb_numrecs) - be16_to_cpu(right->bb_numrecs) + 1; /* * For non-leaf blocks, copy keys and addresses over to the new block. */ @@ -1648,15 +1651,15 @@ xfs_alloc_split( rkp = XFS_ALLOC_KEY_ADDR(right, 1, cur); rpp = XFS_ALLOC_PTR_ADDR(right, 1, cur); #ifdef DEBUG - for (i = 0; i < INT_GET(right->bb_numrecs, ARCH_CONVERT); i++) { - if ((error = xfs_btree_check_sptr(cur, INT_GET(lpp[i], ARCH_CONVERT), level))) + for (i = 0; i < be16_to_cpu(right->bb_numrecs); i++) { + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(lpp[i]), level))) return error; } #endif - memcpy(rkp, lkp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rkp)); /* INT_: copy */ - memcpy(rpp, lpp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rpp)); /* INT_: copy */ - xfs_alloc_log_keys(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); - xfs_alloc_log_ptrs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); + memcpy(rkp, lkp, be16_to_cpu(right->bb_numrecs) * sizeof(*rkp)); + memcpy(rpp, lpp, be16_to_cpu(right->bb_numrecs) * sizeof(*rpp)); + xfs_alloc_log_keys(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); + xfs_alloc_log_ptrs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); *keyp = *rkp; } /* @@ -1668,38 +1671,38 @@ xfs_alloc_split( lrp = XFS_ALLOC_REC_ADDR(left, i, cur); rrp = XFS_ALLOC_REC_ADDR(right, 1, cur); - memcpy(rrp, lrp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rrp)); - xfs_alloc_log_recs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); - keyp->ar_startblock = rrp->ar_startblock; /* INT_: direct copy */ - keyp->ar_blockcount = rrp->ar_blockcount; /* INT_: direct copy */ + memcpy(rrp, lrp, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp)); + xfs_alloc_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); + keyp->ar_startblock = rrp->ar_startblock; + keyp->ar_blockcount = rrp->ar_blockcount; } /* * Find the left block number by looking in the buffer. * Adjust numrecs, sibling pointers. */ lbno = XFS_DADDR_TO_AGBNO(cur->bc_mp, XFS_BUF_ADDR(lbp)); - INT_MOD(left->bb_numrecs, ARCH_CONVERT, -(INT_GET(right->bb_numrecs, ARCH_CONVERT))); - right->bb_rightsib = left->bb_rightsib; /* INT_: direct copy */ - INT_SET(left->bb_rightsib, ARCH_CONVERT, rbno); - INT_SET(right->bb_leftsib, ARCH_CONVERT, lbno); + be16_add(&left->bb_numrecs, -(be16_to_cpu(right->bb_numrecs))); + right->bb_rightsib = left->bb_rightsib; + left->bb_rightsib = cpu_to_be32(rbno); + right->bb_leftsib = cpu_to_be32(lbno); xfs_alloc_log_block(cur->bc_tp, rbp, XFS_BB_ALL_BITS); xfs_alloc_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS | XFS_BB_RIGHTSIB); /* * If there's a block to the new block's right, make that block * point back to right instead of to left. */ - if (INT_GET(right->bb_rightsib, ARCH_CONVERT) != NULLAGBLOCK) { + if (be32_to_cpu(right->bb_rightsib) != NULLAGBLOCK) { xfs_alloc_block_t *rrblock; /* rr btree block */ xfs_buf_t *rrbp; /* buffer for rrblock */ if ((error = xfs_btree_read_bufs(cur->bc_mp, cur->bc_tp, - cur->bc_private.a.agno, INT_GET(right->bb_rightsib, ARCH_CONVERT), 0, + cur->bc_private.a.agno, be32_to_cpu(right->bb_rightsib), 0, &rrbp, XFS_ALLOC_BTREE_REF))) return error; rrblock = XFS_BUF_TO_ALLOC_BLOCK(rrbp); if ((error = xfs_btree_check_sblock(cur, rrblock, level, rrbp))) return error; - INT_SET(rrblock->bb_leftsib, ARCH_CONVERT, rbno); + rrblock->bb_leftsib = cpu_to_be32(rbno); xfs_alloc_log_block(cur->bc_tp, rrbp, XFS_BB_LEFTSIB); } /* @@ -1707,9 +1710,9 @@ xfs_alloc_split( * If it's just pointing past the last entry in left, then we'll * insert there, so don't change anything in that case. */ - if (cur->bc_ptrs[level] > INT_GET(left->bb_numrecs, ARCH_CONVERT) + 1) { + if (cur->bc_ptrs[level] > be16_to_cpu(left->bb_numrecs) + 1) { xfs_btree_setbuf(cur, level, rbp); - cur->bc_ptrs[level] -= INT_GET(left->bb_numrecs, ARCH_CONVERT); + cur->bc_ptrs[level] -= be16_to_cpu(left->bb_numrecs); } /* * If there are more levels, we'll need another cursor which refers to @@ -1807,7 +1810,7 @@ xfs_alloc_decrement( /* * If we just went off the left edge of the tree, return failure. */ - if (INT_GET(block->bb_leftsib, ARCH_CONVERT) == NULLAGBLOCK) { + if (be32_to_cpu(block->bb_leftsib) == NULLAGBLOCK) { *stat = 0; return 0; } @@ -1836,7 +1839,7 @@ xfs_alloc_decrement( xfs_agblock_t agbno; /* block number of btree block */ xfs_buf_t *bp; /* buffer pointer for block */ - agbno = INT_GET(*XFS_ALLOC_PTR_ADDR(block, cur->bc_ptrs[lev], cur), ARCH_CONVERT); + agbno = be32_to_cpu(*XFS_ALLOC_PTR_ADDR(block, cur->bc_ptrs[lev], cur)); if ((error = xfs_btree_read_bufs(cur->bc_mp, cur->bc_tp, cur->bc_private.a.agno, agbno, 0, &bp, XFS_ALLOC_BTREE_REF))) @@ -1846,7 +1849,7 @@ xfs_alloc_decrement( block = XFS_BUF_TO_ALLOC_BLOCK(bp); if ((error = xfs_btree_check_sblock(cur, block, lev, bp))) return error; - cur->bc_ptrs[lev] = INT_GET(block->bb_numrecs, ARCH_CONVERT); + cur->bc_ptrs[lev] = be16_to_cpu(block->bb_numrecs); } *stat = 1; return 0; @@ -1913,7 +1916,7 @@ xfs_alloc_get_rec( /* * Off the right end or left end, return failure. */ - if (ptr > INT_GET(block->bb_numrecs, ARCH_CONVERT) || ptr <= 0) { + if (ptr > be16_to_cpu(block->bb_numrecs) || ptr <= 0) { *stat = 0; return 0; } @@ -1924,8 +1927,8 @@ xfs_alloc_get_rec( xfs_alloc_rec_t *rec; /* record data */ rec = XFS_ALLOC_REC_ADDR(block, ptr, cur); - *bno = INT_GET(rec->ar_startblock, ARCH_CONVERT); - *len = INT_GET(rec->ar_blockcount, ARCH_CONVERT); + *bno = be32_to_cpu(rec->ar_startblock); + *len = be32_to_cpu(rec->ar_blockcount); } *stat = 1; return 0; @@ -1964,14 +1967,14 @@ xfs_alloc_increment( * Increment the ptr at this level. If we're still in the block * then we're done. */ - if (++cur->bc_ptrs[level] <= INT_GET(block->bb_numrecs, ARCH_CONVERT)) { + if (++cur->bc_ptrs[level] <= be16_to_cpu(block->bb_numrecs)) { *stat = 1; return 0; } /* * If we just went off the right edge of the tree, return failure. */ - if (INT_GET(block->bb_rightsib, ARCH_CONVERT) == NULLAGBLOCK) { + if (be32_to_cpu(block->bb_rightsib) == NULLAGBLOCK) { *stat = 0; return 0; } @@ -1986,7 +1989,7 @@ xfs_alloc_increment( if ((error = xfs_btree_check_sblock(cur, block, lev, bp))) return error; #endif - if (++cur->bc_ptrs[lev] <= INT_GET(block->bb_numrecs, ARCH_CONVERT)) + if (++cur->bc_ptrs[lev] <= be16_to_cpu(block->bb_numrecs)) break; /* * Read-ahead the right block, we're going to read it @@ -2006,7 +2009,7 @@ xfs_alloc_increment( lev > level; ) { xfs_agblock_t agbno; /* block number of btree block */ - agbno = INT_GET(*XFS_ALLOC_PTR_ADDR(block, cur->bc_ptrs[lev], cur), ARCH_CONVERT); + agbno = be32_to_cpu(*XFS_ALLOC_PTR_ADDR(block, cur->bc_ptrs[lev], cur)); if ((error = xfs_btree_read_bufs(cur->bc_mp, cur->bc_tp, cur->bc_private.a.agno, agbno, 0, &bp, XFS_ALLOC_BTREE_REF))) @@ -2041,8 +2044,8 @@ xfs_alloc_insert( level = 0; nbno = NULLAGBLOCK; - INT_SET(nrec.ar_startblock, ARCH_CONVERT, cur->bc_rec.a.ar_startblock); - INT_SET(nrec.ar_blockcount, ARCH_CONVERT, cur->bc_rec.a.ar_blockcount); + nrec.ar_startblock = cpu_to_be32(cur->bc_rec.a.ar_startblock); + nrec.ar_blockcount = cpu_to_be32(cur->bc_rec.a.ar_blockcount); ncur = (xfs_btree_cur_t *)0; pcur = cur; /* @@ -2163,8 +2166,8 @@ xfs_alloc_update( /* * Fill in the new contents and log them. */ - INT_SET(rp->ar_startblock, ARCH_CONVERT, bno); - INT_SET(rp->ar_blockcount, ARCH_CONVERT, len); + rp->ar_startblock = cpu_to_be32(bno); + rp->ar_blockcount = cpu_to_be32(len); xfs_alloc_log_recs(cur, cur->bc_bufs[0], ptr, ptr); } /* @@ -2173,15 +2176,15 @@ xfs_alloc_update( * extent in the a.g., which we cache in the a.g. freelist header. */ if (cur->bc_btnum == XFS_BTNUM_CNT && - INT_GET(block->bb_rightsib, ARCH_CONVERT) == NULLAGBLOCK && - ptr == INT_GET(block->bb_numrecs, ARCH_CONVERT)) { + be32_to_cpu(block->bb_rightsib) == NULLAGBLOCK && + ptr == be16_to_cpu(block->bb_numrecs)) { xfs_agf_t *agf; /* a.g. freespace header */ xfs_agnumber_t seqno; agf = XFS_BUF_TO_AGF(cur->bc_private.a.agbp); - seqno = INT_GET(agf->agf_seqno, ARCH_CONVERT); + seqno = be32_to_cpu(agf->agf_seqno); cur->bc_mp->m_perag[seqno].pagf_longest = len; - INT_SET(agf->agf_longest, ARCH_CONVERT, len); + agf->agf_longest = cpu_to_be32(len); xfs_alloc_log_agf(cur->bc_tp, cur->bc_private.a.agbp, XFS_AGF_LONGEST); } @@ -2191,8 +2194,8 @@ xfs_alloc_update( if (ptr == 1) { xfs_alloc_key_t key; /* key containing [bno, len] */ - INT_SET(key.ar_startblock, ARCH_CONVERT, bno); - INT_SET(key.ar_blockcount, ARCH_CONVERT, len); + key.ar_startblock = cpu_to_be32(bno); + key.ar_blockcount = cpu_to_be32(len); if ((error = xfs_alloc_updkey(cur, &key, 1))) return error; } diff --git a/fs/xfs/xfs_alloc_btree.h b/fs/xfs/xfs_alloc_btree.h index 5615ebba6a3..bce81c7a4fd 100644 --- a/fs/xfs/xfs_alloc_btree.h +++ b/fs/xfs/xfs_alloc_btree.h @@ -38,14 +38,19 @@ struct xfs_mount; /* * Data record/key structure */ -typedef struct xfs_alloc_rec -{ +typedef struct xfs_alloc_rec { + __be32 ar_startblock; /* starting block number */ + __be32 ar_blockcount; /* count of free blocks */ +} xfs_alloc_rec_t, xfs_alloc_key_t; + +typedef struct xfs_alloc_rec_incore { xfs_agblock_t ar_startblock; /* starting block number */ xfs_extlen_t ar_blockcount; /* count of free blocks */ -} xfs_alloc_rec_t, xfs_alloc_key_t; +} xfs_alloc_rec_incore_t; -typedef xfs_agblock_t xfs_alloc_ptr_t; /* btree pointer type */ - /* btree block header type */ +/* btree pointer type */ +typedef __be32 xfs_alloc_ptr_t; +/* btree block header type */ typedef struct xfs_btree_sblock xfs_alloc_block_t; #define XFS_BUF_TO_ALLOC_BLOCK(bp) ((xfs_alloc_block_t *)XFS_BUF_PTR(bp)) diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index 9f635f0ccf0..e415a4698e9 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -2763,8 +2763,8 @@ xfs_bmap_btree_to_extents( ASSERT(ifp->if_flags & XFS_IFEXTENTS); ASSERT(XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_BTREE); rblock = ifp->if_broot; - ASSERT(INT_GET(rblock->bb_level, ARCH_CONVERT) == 1); - ASSERT(INT_GET(rblock->bb_numrecs, ARCH_CONVERT) == 1); + ASSERT(be16_to_cpu(rblock->bb_level) == 1); + ASSERT(be16_to_cpu(rblock->bb_numrecs) == 1); ASSERT(XFS_BMAP_BROOT_MAXRECS(ifp->if_broot_bytes) == 1); mp = ip->i_mount; pp = XFS_BMAP_BROOT_PTR_ADDR(rblock, 1, ifp->if_broot_bytes); @@ -3207,11 +3207,11 @@ xfs_bmap_extents_to_btree( * Fill in the root. */ block = ifp->if_broot; - INT_SET(block->bb_magic, ARCH_CONVERT, XFS_BMAP_MAGIC); - INT_SET(block->bb_level, ARCH_CONVERT, 1); - INT_SET(block->bb_numrecs, ARCH_CONVERT, 1); - INT_SET(block->bb_leftsib, ARCH_CONVERT, NULLDFSBNO); - INT_SET(block->bb_rightsib, ARCH_CONVERT, NULLDFSBNO); + block->bb_magic = cpu_to_be32(XFS_BMAP_MAGIC); + block->bb_level = cpu_to_be16(1); + block->bb_numrecs = cpu_to_be16(1); + block->bb_leftsib = cpu_to_be64(NULLDFSBNO); + block->bb_rightsib = cpu_to_be64(NULLDFSBNO); /* * Need a cursor. Can't allocate until bb_level is filled in. */ @@ -3264,10 +3264,10 @@ xfs_bmap_extents_to_btree( * Fill in the child block. */ ablock = XFS_BUF_TO_BMBT_BLOCK(abp); - INT_SET(ablock->bb_magic, ARCH_CONVERT, XFS_BMAP_MAGIC); + ablock->bb_magic = cpu_to_be32(XFS_BMAP_MAGIC); ablock->bb_level = 0; - INT_SET(ablock->bb_leftsib, ARCH_CONVERT, NULLDFSBNO); - INT_SET(ablock->bb_rightsib, ARCH_CONVERT, NULLDFSBNO); + ablock->bb_leftsib = cpu_to_be64(NULLDFSBNO); + ablock->bb_rightsib = cpu_to_be64(NULLDFSBNO); arp = XFS_BMAP_REC_IADDR(ablock, 1, cur); nextents = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t); for (ep = ifp->if_u1.if_extents, cnt = i = 0; i < nextents; i++, ep++) { @@ -3277,8 +3277,8 @@ xfs_bmap_extents_to_btree( arp++; cnt++; } } - INT_SET(ablock->bb_numrecs, ARCH_CONVERT, cnt); - ASSERT(INT_GET(ablock->bb_numrecs, ARCH_CONVERT) == XFS_IFORK_NEXTENTS(ip, whichfork)); + ASSERT(cnt == XFS_IFORK_NEXTENTS(ip, whichfork)); + ablock->bb_numrecs = cpu_to_be16(cnt); /* * Fill in the root key and pointer. */ @@ -3292,7 +3292,7 @@ xfs_bmap_extents_to_btree( * the root is at the right level. */ xfs_bmbt_log_block(cur, abp, XFS_BB_ALL_BITS); - xfs_bmbt_log_recs(cur, abp, 1, INT_GET(ablock->bb_numrecs, ARCH_CONVERT)); + xfs_bmbt_log_recs(cur, abp, 1, be16_to_cpu(ablock->bb_numrecs)); ASSERT(*curp == NULL); *curp = cur; *logflagsp = XFS_ILOG_CORE | XFS_ILOG_FBROOT(whichfork); @@ -4371,8 +4371,8 @@ xfs_bmap_read_extents( /* * Root level must use BMAP_BROOT_PTR_ADDR macro to get ptr out. */ - ASSERT(INT_GET(block->bb_level, ARCH_CONVERT) > 0); - level = INT_GET(block->bb_level, ARCH_CONVERT); + level = be16_to_cpu(block->bb_level); + ASSERT(level > 0); pp = XFS_BMAP_BROOT_PTR_ADDR(block, 1, ifp->if_broot_bytes); ASSERT(INT_GET(*pp, ARCH_CONVERT) != NULLDFSBNO); ASSERT(XFS_FSB_TO_AGNO(mp, INT_GET(*pp, ARCH_CONVERT)) < mp->m_sb.sb_agcount); @@ -4415,7 +4415,7 @@ xfs_bmap_read_extents( xfs_extnum_t num_recs; - num_recs = INT_GET(block->bb_numrecs, ARCH_CONVERT); + num_recs = be16_to_cpu(block->bb_numrecs); if (unlikely(i + num_recs > room)) { ASSERT(i + num_recs <= room); xfs_fs_cmn_err(CE_WARN, ip->i_mount, @@ -4432,7 +4432,7 @@ xfs_bmap_read_extents( /* * Read-ahead the next leaf block, if any. */ - nextbno = INT_GET(block->bb_rightsib, ARCH_CONVERT); + nextbno = be64_to_cpu(block->bb_rightsib); if (nextbno != NULLFSBLOCK) xfs_btree_reada_bufl(mp, nextbno, 1); /* @@ -4689,7 +4689,7 @@ xfs_bmapi( } if (wr && *firstblock == NULLFSBLOCK) { if (XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_BTREE) - minleft = INT_GET(ifp->if_broot->bb_level, ARCH_CONVERT) + 1; + minleft = be16_to_cpu(ifp->if_broot->bb_level) + 1; else minleft = 1; } else @@ -5967,10 +5967,10 @@ xfs_check_block( xfs_bmbt_ptr_t *pp, *thispa; /* pointer to block address */ xfs_bmbt_key_t *prevp, *keyp; - ASSERT(INT_GET(block->bb_level, ARCH_CONVERT) > 0); + ASSERT(be16_to_cpu(block->bb_level) > 0); prevp = NULL; - for( i = 1; i <= INT_GET(block->bb_numrecs, ARCH_CONVERT);i++) { + for( i = 1; i <= be16_to_cpu(block->bb_numrecs); i++) { dmxr = mp->m_bmap_dmxr[0]; if (root) { @@ -5995,7 +5995,7 @@ xfs_check_block( pp = XFS_BTREE_PTR_ADDR(mp->m_sb.sb_blocksize, xfs_bmbt, block, i, dmxr); } - for (j = i+1; j <= INT_GET(block->bb_numrecs, ARCH_CONVERT); j++) { + for (j = i+1; j <= be16_to_cpu(block->bb_numrecs); j++) { if (root) { thispa = XFS_BMAP_BROOT_PTR_ADDR(block, j, sz); } else { @@ -6048,8 +6048,8 @@ xfs_bmap_check_leaf_extents( /* * Root level must use BMAP_BROOT_PTR_ADDR macro to get ptr out. */ - ASSERT(INT_GET(block->bb_level, ARCH_CONVERT) > 0); - level = INT_GET(block->bb_level, ARCH_CONVERT); + level = be16_to_cpu(block->bb_level); + ASSERT(level > 0); xfs_check_block(block, mp, 1, ifp->if_broot_bytes); pp = XFS_BMAP_BROOT_PTR_ADDR(block, 1, ifp->if_broot_bytes); ASSERT(INT_GET(*pp, ARCH_CONVERT) != NULLDFSBNO); @@ -6109,13 +6109,13 @@ xfs_bmap_check_leaf_extents( xfs_extnum_t num_recs; - num_recs = INT_GET(block->bb_numrecs, ARCH_CONVERT); + num_recs = be16_to_cpu(block->bb_numrecs); /* * Read-ahead the next leaf block, if any. */ - nextbno = INT_GET(block->bb_rightsib, ARCH_CONVERT); + nextbno = be64_to_cpu(block->bb_rightsib); /* * Check all the extents to make sure they are OK. @@ -6212,8 +6212,8 @@ xfs_bmap_count_blocks( * Root level must use BMAP_BROOT_PTR_ADDR macro to get ptr out. */ block = ifp->if_broot; - ASSERT(INT_GET(block->bb_level, ARCH_CONVERT) > 0); - level = INT_GET(block->bb_level, ARCH_CONVERT); + level = be16_to_cpu(block->bb_level); + ASSERT(level > 0); pp = XFS_BMAP_BROOT_PTR_ADDR(block, 1, ifp->if_broot_bytes); ASSERT(INT_GET(*pp, ARCH_CONVERT) != NULLDFSBNO); ASSERT(XFS_FSB_TO_AGNO(mp, INT_GET(*pp, ARCH_CONVERT)) < mp->m_sb.sb_agcount); @@ -6258,14 +6258,14 @@ xfs_bmap_count_tree( if (--level) { /* Not at node above leafs, count this level of nodes */ - nextbno = INT_GET(block->bb_rightsib, ARCH_CONVERT); + nextbno = be64_to_cpu(block->bb_rightsib); while (nextbno != NULLFSBLOCK) { if ((error = xfs_btree_read_bufl(mp, tp, nextbno, 0, &nbp, XFS_BMAP_BTREE_REF))) return error; *count += 1; nextblock = XFS_BUF_TO_BMBT_BLOCK(nbp); - nextbno = INT_GET(nextblock->bb_rightsib, ARCH_CONVERT); + nextbno = be64_to_cpu(nextblock->bb_rightsib); xfs_trans_brelse(tp, nbp); } @@ -6284,8 +6284,8 @@ xfs_bmap_count_tree( } else { /* count all level 1 nodes and their leaves */ for (;;) { - nextbno = INT_GET(block->bb_rightsib, ARCH_CONVERT); - numrecs = INT_GET(block->bb_numrecs, ARCH_CONVERT); + nextbno = be64_to_cpu(block->bb_rightsib); + numrecs = be16_to_cpu(block->bb_numrecs); frp = XFS_BTREE_REC_ADDR(mp->m_sb.sb_blocksize, xfs_bmbt, block, 1, mp->m_bmap_dmxr[0]); if (unlikely(xfs_bmap_disk_count_leaves(frp, numrecs, count) < 0)) { diff --git a/fs/xfs/xfs_bmap_btree.c b/fs/xfs/xfs_bmap_btree.c index 3bf70eca163..3f1383d160e 100644 --- a/fs/xfs/xfs_bmap_btree.c +++ b/fs/xfs/xfs_bmap_btree.c @@ -366,7 +366,7 @@ xfs_bmbt_delrec( return 0; } block = xfs_bmbt_get_block(cur, level, &bp); - numrecs = INT_GET(block->bb_numrecs, ARCH_CONVERT); + numrecs = be16_to_cpu(block->bb_numrecs); #ifdef DEBUG if ((error = xfs_btree_check_lblock(cur, block, level, bp))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); @@ -411,7 +411,7 @@ xfs_bmbt_delrec( } } numrecs--; - INT_SET(block->bb_numrecs, ARCH_CONVERT, numrecs); + block->bb_numrecs = cpu_to_be16(numrecs); xfs_bmbt_log_block(cur, bp, XFS_BB_NUMRECS); /* * We're at the root level. @@ -447,8 +447,8 @@ xfs_bmbt_delrec( *stat = 1; return 0; } - rbno = INT_GET(block->bb_rightsib, ARCH_CONVERT); - lbno = INT_GET(block->bb_leftsib, ARCH_CONVERT); + rbno = be64_to_cpu(block->bb_rightsib); + lbno = be64_to_cpu(block->bb_leftsib); /* * One child of root, need to get a chance to copy its contents * into the root and delete it. Can't go up to next level, @@ -492,15 +492,15 @@ xfs_bmbt_delrec( goto error0; } #endif - bno = INT_GET(right->bb_leftsib, ARCH_CONVERT); - if (INT_GET(right->bb_numrecs, ARCH_CONVERT) - 1 >= + bno = be64_to_cpu(right->bb_leftsib); + if (be16_to_cpu(right->bb_numrecs) - 1 >= XFS_BMAP_BLOCK_IMINRECS(level, cur)) { if ((error = xfs_bmbt_lshift(tcur, level, &i))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); goto error0; } if (i) { - ASSERT(INT_GET(block->bb_numrecs, ARCH_CONVERT) >= + ASSERT(be16_to_cpu(block->bb_numrecs) >= XFS_BMAP_BLOCK_IMINRECS(level, tcur)); xfs_btree_del_cursor(tcur, XFS_BTREE_NOERROR); tcur = NULL; @@ -517,7 +517,7 @@ xfs_bmbt_delrec( return 0; } } - rrecs = INT_GET(right->bb_numrecs, ARCH_CONVERT); + rrecs = be16_to_cpu(right->bb_numrecs); if (lbno != NULLFSBLOCK) { i = xfs_btree_firstrec(tcur, level); XFS_WANT_CORRUPTED_GOTO(i == 1, error0); @@ -548,15 +548,15 @@ xfs_bmbt_delrec( goto error0; } #endif - bno = INT_GET(left->bb_rightsib, ARCH_CONVERT); - if (INT_GET(left->bb_numrecs, ARCH_CONVERT) - 1 >= + bno = be64_to_cpu(left->bb_rightsib); + if (be16_to_cpu(left->bb_numrecs) - 1 >= XFS_BMAP_BLOCK_IMINRECS(level, cur)) { if ((error = xfs_bmbt_rshift(tcur, level, &i))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); goto error0; } if (i) { - ASSERT(INT_GET(block->bb_numrecs, ARCH_CONVERT) >= + ASSERT(be16_to_cpu(block->bb_numrecs) >= XFS_BMAP_BLOCK_IMINRECS(level, tcur)); xfs_btree_del_cursor(tcur, XFS_BTREE_NOERROR); tcur = NULL; @@ -567,14 +567,14 @@ xfs_bmbt_delrec( return 0; } } - lrecs = INT_GET(left->bb_numrecs, ARCH_CONVERT); + lrecs = be16_to_cpu(left->bb_numrecs); } xfs_btree_del_cursor(tcur, XFS_BTREE_NOERROR); tcur = NULL; mp = cur->bc_mp; ASSERT(bno != NULLFSBLOCK); if (lbno != NULLFSBLOCK && - lrecs + INT_GET(block->bb_numrecs, ARCH_CONVERT) <= XFS_BMAP_BLOCK_IMAXRECS(level, cur)) { + lrecs + be16_to_cpu(block->bb_numrecs) <= XFS_BMAP_BLOCK_IMAXRECS(level, cur)) { rbno = bno; right = block; rbp = bp; @@ -589,7 +589,7 @@ xfs_bmbt_delrec( goto error0; } } else if (rbno != NULLFSBLOCK && - rrecs + INT_GET(block->bb_numrecs, ARCH_CONVERT) <= + rrecs + be16_to_cpu(block->bb_numrecs) <= XFS_BMAP_BLOCK_IMAXRECS(level, cur)) { lbno = bno; left = block; @@ -604,7 +604,7 @@ xfs_bmbt_delrec( XFS_BMBT_TRACE_CURSOR(cur, ERROR); goto error0; } - lrecs = INT_GET(left->bb_numrecs, ARCH_CONVERT); + lrecs = be16_to_cpu(left->bb_numrecs); } else { if (level > 0 && (error = xfs_bmbt_decrement(cur, level, &i))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); @@ -614,8 +614,8 @@ xfs_bmbt_delrec( *stat = 1; return 0; } - numlrecs = INT_GET(left->bb_numrecs, ARCH_CONVERT); - numrrecs = INT_GET(right->bb_numrecs, ARCH_CONVERT); + numlrecs = be16_to_cpu(left->bb_numrecs); + numrrecs = be16_to_cpu(right->bb_numrecs); if (level > 0) { lkp = XFS_BMAP_KEY_IADDR(left, numlrecs + 1, cur); lpp = XFS_BMAP_PTR_IADDR(left, numlrecs + 1, cur); @@ -639,12 +639,12 @@ xfs_bmbt_delrec( memcpy(lrp, rrp, numrrecs * sizeof(*lrp)); xfs_bmbt_log_recs(cur, lbp, numlrecs + 1, numlrecs + numrrecs); } - INT_MOD(left->bb_numrecs, ARCH_CONVERT, numrrecs); - left->bb_rightsib = right->bb_rightsib; /* INT_: direct copy */ + be16_add(&left->bb_numrecs, numrrecs); + left->bb_rightsib = right->bb_rightsib; xfs_bmbt_log_block(cur, lbp, XFS_BB_RIGHTSIB | XFS_BB_NUMRECS); - if (INT_GET(left->bb_rightsib, ARCH_CONVERT) != NULLDFSBNO) { + if (be64_to_cpu(left->bb_rightsib) != NULLDFSBNO) { if ((error = xfs_btree_read_bufl(mp, cur->bc_tp, - INT_GET(left->bb_rightsib, ARCH_CONVERT), + be64_to_cpu(left->bb_rightsib), 0, &rrbp, XFS_BMAP_BTREE_REF))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); goto error0; @@ -654,7 +654,7 @@ xfs_bmbt_delrec( XFS_BMBT_TRACE_CURSOR(cur, ERROR); goto error0; } - INT_SET(rrblock->bb_leftsib, ARCH_CONVERT, lbno); + rrblock->bb_leftsib = cpu_to_be64(lbno); xfs_bmbt_log_block(cur, rrbp, XFS_BB_LEFTSIB); } xfs_bmap_add_free(XFS_DADDR_TO_FSB(mp, XFS_BUF_ADDR(rbp)), 1, @@ -711,7 +711,7 @@ xfs_bmbt_get_rec( if ((error = xfs_btree_check_lblock(cur, block, 0, bp))) return error; #endif - if (ptr > INT_GET(block->bb_numrecs, ARCH_CONVERT) || ptr <= 0) { + if (ptr > be16_to_cpu(block->bb_numrecs) || ptr <= 0) { *stat = 0; return 0; } @@ -772,7 +772,7 @@ xfs_bmbt_insrec( } XFS_STATS_INC(xs_bmbt_insrec); block = xfs_bmbt_get_block(cur, level, &bp); - numrecs = INT_GET(block->bb_numrecs, ARCH_CONVERT); + numrecs = be16_to_cpu(block->bb_numrecs); #ifdef DEBUG if ((error = xfs_btree_check_lblock(cur, block, level, bp))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); @@ -854,7 +854,7 @@ xfs_bmbt_insrec( } } } - numrecs = INT_GET(block->bb_numrecs, ARCH_CONVERT); + numrecs = be16_to_cpu(block->bb_numrecs); if (level > 0) { kp = XFS_BMAP_KEY_IADDR(block, 1, cur); pp = XFS_BMAP_PTR_IADDR(block, 1, cur); @@ -881,7 +881,7 @@ xfs_bmbt_insrec( kp[ptr - 1] = key; INT_SET(pp[ptr - 1], ARCH_CONVERT, *bnop); numrecs++; - INT_SET(block->bb_numrecs, ARCH_CONVERT, numrecs); + block->bb_numrecs = cpu_to_be16(numrecs); xfs_bmbt_log_keys(cur, bp, ptr, numrecs); xfs_bmbt_log_ptrs(cur, bp, ptr, numrecs); } else { @@ -890,7 +890,7 @@ xfs_bmbt_insrec( (numrecs - ptr + 1) * sizeof(*rp)); rp[ptr - 1] = *recp; numrecs++; - INT_SET(block->bb_numrecs, ARCH_CONVERT, numrecs); + block->bb_numrecs = cpu_to_be16(numrecs); xfs_bmbt_log_recs(cur, bp, ptr, numrecs); } xfs_bmbt_log_block(cur, bp, XFS_BB_NUMRECS); @@ -955,7 +955,7 @@ xfs_bmbt_killroot( /* * Give up if the root has multiple children. */ - if (INT_GET(block->bb_numrecs, ARCH_CONVERT) != 1) { + if (be16_to_cpu(block->bb_numrecs) != 1) { XFS_BMBT_TRACE_CURSOR(cur, EXIT); return 0; } @@ -966,37 +966,37 @@ xfs_bmbt_killroot( */ cbp = cur->bc_bufs[level - 1]; cblock = XFS_BUF_TO_BMBT_BLOCK(cbp); - if (INT_GET(cblock->bb_numrecs, ARCH_CONVERT) > XFS_BMAP_BLOCK_DMAXRECS(level, cur)) { + if (be16_to_cpu(cblock->bb_numrecs) > XFS_BMAP_BLOCK_DMAXRECS(level, cur)) { XFS_BMBT_TRACE_CURSOR(cur, EXIT); return 0; } - ASSERT(INT_GET(cblock->bb_leftsib, ARCH_CONVERT) == NULLDFSBNO); - ASSERT(INT_GET(cblock->bb_rightsib, ARCH_CONVERT) == NULLDFSBNO); + ASSERT(be64_to_cpu(cblock->bb_leftsib) == NULLDFSBNO); + ASSERT(be64_to_cpu(cblock->bb_rightsib) == NULLDFSBNO); ip = cur->bc_private.b.ip; ifp = XFS_IFORK_PTR(ip, cur->bc_private.b.whichfork); ASSERT(XFS_BMAP_BLOCK_IMAXRECS(level, cur) == XFS_BMAP_BROOT_MAXRECS(ifp->if_broot_bytes)); - i = (int)(INT_GET(cblock->bb_numrecs, ARCH_CONVERT) - XFS_BMAP_BLOCK_IMAXRECS(level, cur)); + i = (int)(be16_to_cpu(cblock->bb_numrecs) - XFS_BMAP_BLOCK_IMAXRECS(level, cur)); if (i) { xfs_iroot_realloc(ip, i, cur->bc_private.b.whichfork); block = ifp->if_broot; } - INT_MOD(block->bb_numrecs, ARCH_CONVERT, i); - ASSERT(INT_GET(block->bb_numrecs, ARCH_CONVERT) == INT_GET(cblock->bb_numrecs, ARCH_CONVERT)); + be16_add(&block->bb_numrecs, i); + ASSERT(block->bb_numrecs == cblock->bb_numrecs); kp = XFS_BMAP_KEY_IADDR(block, 1, cur); ckp = XFS_BMAP_KEY_IADDR(cblock, 1, cur); - memcpy(kp, ckp, INT_GET(block->bb_numrecs, ARCH_CONVERT) * sizeof(*kp)); + memcpy(kp, ckp, be16_to_cpu(block->bb_numrecs) * sizeof(*kp)); pp = XFS_BMAP_PTR_IADDR(block, 1, cur); cpp = XFS_BMAP_PTR_IADDR(cblock, 1, cur); #ifdef DEBUG - for (i = 0; i < INT_GET(cblock->bb_numrecs, ARCH_CONVERT); i++) { + for (i = 0; i < be16_to_cpu(cblock->bb_numrecs); i++) { if ((error = xfs_btree_check_lptr(cur, INT_GET(cpp[i], ARCH_CONVERT), level - 1))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); return error; } } #endif - memcpy(pp, cpp, INT_GET(block->bb_numrecs, ARCH_CONVERT) * sizeof(*pp)); + memcpy(pp, cpp, be16_to_cpu(block->bb_numrecs) * sizeof(*pp)); xfs_bmap_add_free(XFS_DADDR_TO_FSB(cur->bc_mp, XFS_BUF_ADDR(cbp)), 1, cur->bc_private.b.flist, cur->bc_mp); ip->i_d.di_nblocks--; @@ -1004,7 +1004,7 @@ xfs_bmbt_killroot( XFS_TRANS_DQ_BCOUNT, -1L); xfs_trans_binval(cur->bc_tp, cbp); cur->bc_bufs[level - 1] = NULL; - INT_MOD(block->bb_level, ARCH_CONVERT, -1); + be16_add(&block->bb_level, -1); xfs_trans_log_inode(cur->bc_tp, ip, XFS_ILOG_CORE | XFS_ILOG_FBROOT(cur->bc_private.b.whichfork)); cur->bc_nlevels--; @@ -1160,7 +1160,7 @@ xfs_bmbt_lookup( else krbase = XFS_BMAP_REC_IADDR(block, 1, cur); low = 1; - if (!(high = INT_GET(block->bb_numrecs, ARCH_CONVERT))) { + if (!(high = be16_to_cpu(block->bb_numrecs))) { ASSERT(level == 0); cur->bc_ptrs[0] = dir != XFS_LOOKUP_LE; XFS_BMBT_TRACE_CURSOR(cur, EXIT); @@ -1207,8 +1207,8 @@ xfs_bmbt_lookup( * If ge search and we went off the end of the block, but it's * not the last block, we're in the wrong block. */ - if (dir == XFS_LOOKUP_GE && keyno > INT_GET(block->bb_numrecs, ARCH_CONVERT) && - INT_GET(block->bb_rightsib, ARCH_CONVERT) != NULLDFSBNO) { + if (dir == XFS_LOOKUP_GE && keyno > be16_to_cpu(block->bb_numrecs) && + be64_to_cpu(block->bb_rightsib) != NULLDFSBNO) { cur->bc_ptrs[0] = keyno; if ((error = xfs_bmbt_increment(cur, 0, &i))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); @@ -1223,7 +1223,7 @@ xfs_bmbt_lookup( else if (dir == XFS_LOOKUP_LE && diff > 0) keyno--; cur->bc_ptrs[0] = keyno; - if (keyno == 0 || keyno > INT_GET(block->bb_numrecs, ARCH_CONVERT)) { + if (keyno == 0 || keyno > be16_to_cpu(block->bb_numrecs)) { XFS_BMBT_TRACE_CURSOR(cur, EXIT); *stat = 0; } else { @@ -1280,7 +1280,7 @@ xfs_bmbt_lshift( return error; } #endif - if (INT_GET(right->bb_leftsib, ARCH_CONVERT) == NULLDFSBNO) { + if (be64_to_cpu(right->bb_leftsib) == NULLDFSBNO) { XFS_BMBT_TRACE_CURSOR(cur, EXIT); *stat = 0; return 0; @@ -1291,7 +1291,7 @@ xfs_bmbt_lshift( return 0; } mp = cur->bc_mp; - if ((error = xfs_btree_read_bufl(mp, cur->bc_tp, INT_GET(right->bb_leftsib, ARCH_CONVERT), 0, + if ((error = xfs_btree_read_bufl(mp, cur->bc_tp, be64_to_cpu(right->bb_leftsib), 0, &lbp, XFS_BMAP_BTREE_REF))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); return error; @@ -1301,12 +1301,12 @@ xfs_bmbt_lshift( XFS_BMBT_TRACE_CURSOR(cur, ERROR); return error; } - if (INT_GET(left->bb_numrecs, ARCH_CONVERT) == XFS_BMAP_BLOCK_IMAXRECS(level, cur)) { + if (be16_to_cpu(left->bb_numrecs) == XFS_BMAP_BLOCK_IMAXRECS(level, cur)) { XFS_BMBT_TRACE_CURSOR(cur, EXIT); *stat = 0; return 0; } - lrecs = INT_GET(left->bb_numrecs, ARCH_CONVERT) + 1; + lrecs = be16_to_cpu(left->bb_numrecs) + 1; if (level > 0) { lkp = XFS_BMAP_KEY_IADDR(left, lrecs, cur); rkp = XFS_BMAP_KEY_IADDR(right, 1, cur); @@ -1328,7 +1328,7 @@ xfs_bmbt_lshift( *lrp = *rrp; xfs_bmbt_log_recs(cur, lbp, lrecs, lrecs); } - INT_SET(left->bb_numrecs, ARCH_CONVERT, lrecs); + left->bb_numrecs = cpu_to_be16(lrecs); xfs_bmbt_log_block(cur, lbp, XFS_BB_NUMRECS); #ifdef DEBUG if (level > 0) @@ -1336,8 +1336,8 @@ xfs_bmbt_lshift( else xfs_btree_check_rec(XFS_BTNUM_BMAP, lrp - 1, lrp); #endif - rrecs = INT_GET(right->bb_numrecs, ARCH_CONVERT) - 1; - INT_SET(right->bb_numrecs, ARCH_CONVERT, rrecs); + rrecs = be16_to_cpu(right->bb_numrecs) - 1; + right->bb_numrecs = cpu_to_be16(rrecs); xfs_bmbt_log_block(cur, rbp, XFS_BB_NUMRECS); if (level > 0) { #ifdef DEBUG @@ -1414,18 +1414,18 @@ xfs_bmbt_rshift( return error; } #endif - if (INT_GET(left->bb_rightsib, ARCH_CONVERT) == NULLDFSBNO) { + if (be64_to_cpu(left->bb_rightsib) == NULLDFSBNO) { XFS_BMBT_TRACE_CURSOR(cur, EXIT); *stat = 0; return 0; } - if (cur->bc_ptrs[level] >= INT_GET(left->bb_numrecs, ARCH_CONVERT)) { + if (cur->bc_ptrs[level] >= be16_to_cpu(left->bb_numrecs)) { XFS_BMBT_TRACE_CURSOR(cur, EXIT); *stat = 0; return 0; } mp = cur->bc_mp; - if ((error = xfs_btree_read_bufl(mp, cur->bc_tp, INT_GET(left->bb_rightsib, ARCH_CONVERT), 0, + if ((error = xfs_btree_read_bufl(mp, cur->bc_tp, be64_to_cpu(left->bb_rightsib), 0, &rbp, XFS_BMAP_BTREE_REF))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); return error; @@ -1435,26 +1435,26 @@ xfs_bmbt_rshift( XFS_BMBT_TRACE_CURSOR(cur, ERROR); return error; } - if (INT_GET(right->bb_numrecs, ARCH_CONVERT) == XFS_BMAP_BLOCK_IMAXRECS(level, cur)) { + if (be16_to_cpu(right->bb_numrecs) == XFS_BMAP_BLOCK_IMAXRECS(level, cur)) { XFS_BMBT_TRACE_CURSOR(cur, EXIT); *stat = 0; return 0; } if (level > 0) { - lkp = XFS_BMAP_KEY_IADDR(left, INT_GET(left->bb_numrecs, ARCH_CONVERT), cur); - lpp = XFS_BMAP_PTR_IADDR(left, INT_GET(left->bb_numrecs, ARCH_CONVERT), cur); + lkp = XFS_BMAP_KEY_IADDR(left, be16_to_cpu(left->bb_numrecs), cur); + lpp = XFS_BMAP_PTR_IADDR(left, be16_to_cpu(left->bb_numrecs), cur); rkp = XFS_BMAP_KEY_IADDR(right, 1, cur); rpp = XFS_BMAP_PTR_IADDR(right, 1, cur); #ifdef DEBUG - for (i = INT_GET(right->bb_numrecs, ARCH_CONVERT) - 1; i >= 0; i--) { + for (i = be16_to_cpu(right->bb_numrecs) - 1; i >= 0; i--) { if ((error = xfs_btree_check_lptr(cur, INT_GET(rpp[i], ARCH_CONVERT), level))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); return error; } } #endif - memmove(rkp + 1, rkp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rkp)); - memmove(rpp + 1, rpp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rpp)); + memmove(rkp + 1, rkp, be16_to_cpu(right->bb_numrecs) * sizeof(*rkp)); + memmove(rpp + 1, rpp, be16_to_cpu(right->bb_numrecs) * sizeof(*rpp)); #ifdef DEBUG if ((error = xfs_btree_check_lptr(cur, INT_GET(*lpp, ARCH_CONVERT), level))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); @@ -1463,21 +1463,21 @@ xfs_bmbt_rshift( #endif *rkp = *lkp; *rpp = *lpp; /* INT_: direct copy */ - xfs_bmbt_log_keys(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1); - xfs_bmbt_log_ptrs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1); + xfs_bmbt_log_keys(cur, rbp, 1, be16_to_cpu(right->bb_numrecs) + 1); + xfs_bmbt_log_ptrs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs) + 1); } else { - lrp = XFS_BMAP_REC_IADDR(left, INT_GET(left->bb_numrecs, ARCH_CONVERT), cur); + lrp = XFS_BMAP_REC_IADDR(left, be16_to_cpu(left->bb_numrecs), cur); rrp = XFS_BMAP_REC_IADDR(right, 1, cur); - memmove(rrp + 1, rrp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rrp)); + memmove(rrp + 1, rrp, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp)); *rrp = *lrp; - xfs_bmbt_log_recs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1); + xfs_bmbt_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs) + 1); INT_SET(key.br_startoff, ARCH_CONVERT, xfs_bmbt_disk_get_startoff(rrp)); rkp = &key; } - INT_MOD(left->bb_numrecs, ARCH_CONVERT, -1); + be16_add(&left->bb_numrecs, -1); xfs_bmbt_log_block(cur, lbp, XFS_BB_NUMRECS); - INT_MOD(right->bb_numrecs, ARCH_CONVERT, +1); + be16_add(&right->bb_numrecs, 1); #ifdef DEBUG if (level > 0) xfs_btree_check_key(XFS_BTNUM_BMAP, rkp, rkp + 1); @@ -1608,47 +1608,47 @@ xfs_bmbt_split( return error; } #endif - INT_SET(right->bb_magic, ARCH_CONVERT, XFS_BMAP_MAGIC); - right->bb_level = left->bb_level; /* INT_: direct copy */ - INT_SET(right->bb_numrecs, ARCH_CONVERT, (__uint16_t)(INT_GET(left->bb_numrecs, ARCH_CONVERT) / 2)); - if ((INT_GET(left->bb_numrecs, ARCH_CONVERT) & 1) && - cur->bc_ptrs[level] <= INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1) - INT_MOD(right->bb_numrecs, ARCH_CONVERT, +1); - i = INT_GET(left->bb_numrecs, ARCH_CONVERT) - INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1; + right->bb_magic = cpu_to_be32(XFS_BMAP_MAGIC); + right->bb_level = left->bb_level; + right->bb_numrecs = cpu_to_be16(be16_to_cpu(left->bb_numrecs) / 2); + if ((be16_to_cpu(left->bb_numrecs) & 1) && + cur->bc_ptrs[level] <= be16_to_cpu(right->bb_numrecs) + 1) + be16_add(&right->bb_numrecs, 1); + i = be16_to_cpu(left->bb_numrecs) - be16_to_cpu(right->bb_numrecs) + 1; if (level > 0) { lkp = XFS_BMAP_KEY_IADDR(left, i, cur); lpp = XFS_BMAP_PTR_IADDR(left, i, cur); rkp = XFS_BMAP_KEY_IADDR(right, 1, cur); rpp = XFS_BMAP_PTR_IADDR(right, 1, cur); #ifdef DEBUG - for (i = 0; i < INT_GET(right->bb_numrecs, ARCH_CONVERT); i++) { + for (i = 0; i < be16_to_cpu(right->bb_numrecs); i++) { if ((error = xfs_btree_check_lptr(cur, INT_GET(lpp[i], ARCH_CONVERT), level))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); return error; } } #endif - memcpy(rkp, lkp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rkp)); - memcpy(rpp, lpp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rpp)); - xfs_bmbt_log_keys(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); - xfs_bmbt_log_ptrs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); + memcpy(rkp, lkp, be16_to_cpu(right->bb_numrecs) * sizeof(*rkp)); + memcpy(rpp, lpp, be16_to_cpu(right->bb_numrecs) * sizeof(*rpp)); + xfs_bmbt_log_keys(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); + xfs_bmbt_log_ptrs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); keyp->br_startoff = INT_GET(rkp->br_startoff, ARCH_CONVERT); } else { lrp = XFS_BMAP_REC_IADDR(left, i, cur); rrp = XFS_BMAP_REC_IADDR(right, 1, cur); - memcpy(rrp, lrp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rrp)); - xfs_bmbt_log_recs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); + memcpy(rrp, lrp, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp)); + xfs_bmbt_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); keyp->br_startoff = xfs_bmbt_disk_get_startoff(rrp); } - INT_MOD(left->bb_numrecs, ARCH_CONVERT, -(INT_GET(right->bb_numrecs, ARCH_CONVERT))); - right->bb_rightsib = left->bb_rightsib; /* INT_: direct copy */ - INT_SET(left->bb_rightsib, ARCH_CONVERT, args.fsbno); - INT_SET(right->bb_leftsib, ARCH_CONVERT, lbno); + be16_add(&left->bb_numrecs, -(be16_to_cpu(right->bb_numrecs))); + right->bb_rightsib = left->bb_rightsib; + left->bb_rightsib = cpu_to_be64(args.fsbno); + right->bb_leftsib = cpu_to_be64(lbno); xfs_bmbt_log_block(cur, rbp, XFS_BB_ALL_BITS); xfs_bmbt_log_block(cur, lbp, XFS_BB_NUMRECS | XFS_BB_RIGHTSIB); - if (INT_GET(right->bb_rightsib, ARCH_CONVERT) != NULLDFSBNO) { + if (be64_to_cpu(right->bb_rightsib) != NULLDFSBNO) { if ((error = xfs_btree_read_bufl(args.mp, args.tp, - INT_GET(right->bb_rightsib, ARCH_CONVERT), 0, &rrbp, + be64_to_cpu(right->bb_rightsib), 0, &rrbp, XFS_BMAP_BTREE_REF))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); return error; @@ -1658,12 +1658,12 @@ xfs_bmbt_split( XFS_BMBT_TRACE_CURSOR(cur, ERROR); return error; } - INT_SET(rrblock->bb_leftsib, ARCH_CONVERT, args.fsbno); + rrblock->bb_leftsib = cpu_to_be64(args.fsbno); xfs_bmbt_log_block(cur, rrbp, XFS_BB_LEFTSIB); } - if (cur->bc_ptrs[level] > INT_GET(left->bb_numrecs, ARCH_CONVERT) + 1) { + if (cur->bc_ptrs[level] > be16_to_cpu(left->bb_numrecs) + 1) { xfs_btree_setbuf(cur, level, rbp); - cur->bc_ptrs[level] -= INT_GET(left->bb_numrecs, ARCH_CONVERT); + cur->bc_ptrs[level] -= be16_to_cpu(left->bb_numrecs); } if (level + 1 < cur->bc_nlevels) { if ((error = xfs_btree_dup_cursor(cur, curp))) { @@ -1735,18 +1735,18 @@ xfs_bmdr_to_bmbt( xfs_bmbt_key_t *tkp; xfs_bmbt_ptr_t *tpp; - INT_SET(rblock->bb_magic, ARCH_CONVERT, XFS_BMAP_MAGIC); - rblock->bb_level = dblock->bb_level; /* both in on-disk format */ - ASSERT(INT_GET(rblock->bb_level, ARCH_CONVERT) > 0); - rblock->bb_numrecs = dblock->bb_numrecs;/* both in on-disk format */ - INT_SET(rblock->bb_leftsib, ARCH_CONVERT, NULLDFSBNO); - INT_SET(rblock->bb_rightsib, ARCH_CONVERT, NULLDFSBNO); + rblock->bb_magic = cpu_to_be32(XFS_BMAP_MAGIC); + rblock->bb_level = dblock->bb_level; + ASSERT(be16_to_cpu(rblock->bb_level) > 0); + rblock->bb_numrecs = dblock->bb_numrecs; + rblock->bb_leftsib = cpu_to_be64(NULLDFSBNO); + rblock->bb_rightsib = cpu_to_be64(NULLDFSBNO); dmxr = (int)XFS_BTREE_BLOCK_MAXRECS(dblocklen, xfs_bmdr, 0); fkp = XFS_BTREE_KEY_ADDR(dblocklen, xfs_bmdr, dblock, 1, dmxr); tkp = XFS_BMAP_BROOT_KEY_ADDR(rblock, 1, rblocklen); fpp = XFS_BTREE_PTR_ADDR(dblocklen, xfs_bmdr, dblock, 1, dmxr); tpp = XFS_BMAP_BROOT_PTR_ADDR(rblock, 1, rblocklen); - dmxr = INT_GET(dblock->bb_numrecs, ARCH_CONVERT); + dmxr = be16_to_cpu(dblock->bb_numrecs); memcpy(tkp, fkp, sizeof(*fkp) * dmxr); memcpy(tpp, fpp, sizeof(*fpp) * dmxr); /* INT_: direct copy */ } @@ -1789,7 +1789,7 @@ xfs_bmbt_decrement( return error; } #endif - if (INT_GET(block->bb_leftsib, ARCH_CONVERT) == NULLDFSBNO) { + if (be64_to_cpu(block->bb_leftsib) == NULLDFSBNO) { XFS_BMBT_TRACE_CURSOR(cur, EXIT); *stat = 0; return 0; @@ -1821,7 +1821,7 @@ xfs_bmbt_decrement( XFS_BMBT_TRACE_CURSOR(cur, ERROR); return error; } - cur->bc_ptrs[lev] = INT_GET(block->bb_numrecs, ARCH_CONVERT); + cur->bc_ptrs[lev] = be16_to_cpu(block->bb_numrecs); } XFS_BMBT_TRACE_CURSOR(cur, EXIT); *stat = 1; @@ -2107,12 +2107,12 @@ xfs_bmbt_increment( return error; } #endif - if (++cur->bc_ptrs[level] <= INT_GET(block->bb_numrecs, ARCH_CONVERT)) { + if (++cur->bc_ptrs[level] <= be16_to_cpu(block->bb_numrecs)) { XFS_BMBT_TRACE_CURSOR(cur, EXIT); *stat = 1; return 0; } - if (INT_GET(block->bb_rightsib, ARCH_CONVERT) == NULLDFSBNO) { + if (be64_to_cpu(block->bb_rightsib) == NULLDFSBNO) { XFS_BMBT_TRACE_CURSOR(cur, EXIT); *stat = 0; return 0; @@ -2125,7 +2125,7 @@ xfs_bmbt_increment( return error; } #endif - if (++cur->bc_ptrs[lev] <= INT_GET(block->bb_numrecs, ARCH_CONVERT)) + if (++cur->bc_ptrs[lev] <= be16_to_cpu(block->bb_numrecs)) break; if (lev < cur->bc_nlevels - 1) xfs_btree_readahead(cur, lev, XFS_BTCUR_RIGHTRA); @@ -2387,23 +2387,23 @@ xfs_bmbt_newroot( bp = xfs_btree_get_bufl(args.mp, cur->bc_tp, args.fsbno, 0); cblock = XFS_BUF_TO_BMBT_BLOCK(bp); *cblock = *block; - INT_MOD(block->bb_level, ARCH_CONVERT, +1); - INT_SET(block->bb_numrecs, ARCH_CONVERT, 1); + be16_add(&block->bb_level, 1); + block->bb_numrecs = cpu_to_be16(1); cur->bc_nlevels++; cur->bc_ptrs[level + 1] = 1; kp = XFS_BMAP_KEY_IADDR(block, 1, cur); ckp = XFS_BMAP_KEY_IADDR(cblock, 1, cur); - memcpy(ckp, kp, INT_GET(cblock->bb_numrecs, ARCH_CONVERT) * sizeof(*kp)); + memcpy(ckp, kp, be16_to_cpu(cblock->bb_numrecs) * sizeof(*kp)); cpp = XFS_BMAP_PTR_IADDR(cblock, 1, cur); #ifdef DEBUG - for (i = 0; i < INT_GET(cblock->bb_numrecs, ARCH_CONVERT); i++) { + for (i = 0; i < be16_to_cpu(cblock->bb_numrecs); i++) { if ((error = xfs_btree_check_lptr(cur, INT_GET(pp[i], ARCH_CONVERT), level))) { XFS_BMBT_TRACE_CURSOR(cur, ERROR); return error; } } #endif - memcpy(cpp, pp, INT_GET(cblock->bb_numrecs, ARCH_CONVERT) * sizeof(*pp)); + memcpy(cpp, pp, be16_to_cpu(cblock->bb_numrecs) * sizeof(*pp)); #ifdef DEBUG if ((error = xfs_btree_check_lptr(cur, (xfs_bmbt_ptr_t)args.fsbno, level))) { @@ -2412,7 +2412,7 @@ xfs_bmbt_newroot( } #endif INT_SET(*pp, ARCH_CONVERT, args.fsbno); - xfs_iroot_realloc(cur->bc_private.b.ip, 1 - INT_GET(cblock->bb_numrecs, ARCH_CONVERT), + xfs_iroot_realloc(cur->bc_private.b.ip, 1 - be16_to_cpu(cblock->bb_numrecs), cur->bc_private.b.whichfork); xfs_btree_setbuf(cur, level, bp); /* @@ -2420,8 +2420,8 @@ xfs_bmbt_newroot( * the root is at the right level. */ xfs_bmbt_log_block(cur, bp, XFS_BB_ALL_BITS); - xfs_bmbt_log_keys(cur, bp, 1, INT_GET(cblock->bb_numrecs, ARCH_CONVERT)); - xfs_bmbt_log_ptrs(cur, bp, 1, INT_GET(cblock->bb_numrecs, ARCH_CONVERT)); + xfs_bmbt_log_keys(cur, bp, 1, be16_to_cpu(cblock->bb_numrecs)); + xfs_bmbt_log_ptrs(cur, bp, 1, be16_to_cpu(cblock->bb_numrecs)); XFS_BMBT_TRACE_CURSOR(cur, EXIT); *logflags |= XFS_ILOG_CORE | XFS_ILOG_FBROOT(cur->bc_private.b.whichfork); @@ -2689,18 +2689,18 @@ xfs_bmbt_to_bmdr( xfs_bmbt_key_t *tkp; xfs_bmbt_ptr_t *tpp; - ASSERT(INT_GET(rblock->bb_magic, ARCH_CONVERT) == XFS_BMAP_MAGIC); - ASSERT(INT_GET(rblock->bb_leftsib, ARCH_CONVERT) == NULLDFSBNO); - ASSERT(INT_GET(rblock->bb_rightsib, ARCH_CONVERT) == NULLDFSBNO); - ASSERT(INT_GET(rblock->bb_level, ARCH_CONVERT) > 0); - dblock->bb_level = rblock->bb_level; /* both in on-disk format */ - dblock->bb_numrecs = rblock->bb_numrecs;/* both in on-disk format */ + ASSERT(be32_to_cpu(rblock->bb_magic) == XFS_BMAP_MAGIC); + ASSERT(be64_to_cpu(rblock->bb_leftsib) == NULLDFSBNO); + ASSERT(be64_to_cpu(rblock->bb_rightsib) == NULLDFSBNO); + ASSERT(be16_to_cpu(rblock->bb_level) > 0); + dblock->bb_level = rblock->bb_level; + dblock->bb_numrecs = rblock->bb_numrecs; dmxr = (int)XFS_BTREE_BLOCK_MAXRECS(dblocklen, xfs_bmdr, 0); fkp = XFS_BMAP_BROOT_KEY_ADDR(rblock, 1, rblocklen); tkp = XFS_BTREE_KEY_ADDR(dblocklen, xfs_bmdr, dblock, 1, dmxr); fpp = XFS_BMAP_BROOT_PTR_ADDR(rblock, 1, rblocklen); tpp = XFS_BTREE_PTR_ADDR(dblocklen, xfs_bmdr, dblock, 1, dmxr); - dmxr = INT_GET(dblock->bb_numrecs, ARCH_CONVERT); + dmxr = be16_to_cpu(dblock->bb_numrecs); memcpy(tkp, fkp, sizeof(*fkp) * dmxr); memcpy(tpp, fpp, sizeof(*fpp) * dmxr); /* INT_: direct copy */ } diff --git a/fs/xfs/xfs_bmap_btree.h b/fs/xfs/xfs_bmap_btree.h index 7478b1b1aa2..e095a2d344a 100644 --- a/fs/xfs/xfs_bmap_btree.h +++ b/fs/xfs/xfs_bmap_btree.h @@ -28,10 +28,9 @@ struct xfs_inode; /* * Bmap root header, on-disk form only. */ -typedef struct xfs_bmdr_block -{ - __uint16_t bb_level; /* 0 is a leaf */ - __uint16_t bb_numrecs; /* current # of data records */ +typedef struct xfs_bmdr_block { + __be16 bb_level; /* 0 is a leaf */ + __be16 bb_numrecs; /* current # of data records */ } xfs_bmdr_block_t; /* @@ -212,36 +211,36 @@ typedef struct xfs_btree_lblock xfs_bmbt_block_t; #define XFS_BMAP_REC_DADDR(bb,i,cur) \ (XFS_BTREE_REC_ADDR(XFS_BMAP_BLOCK_DSIZE( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ + be16_to_cpu((bb)->bb_level), cur), \ xfs_bmbt, bb, i, XFS_BMAP_BLOCK_DMAXRECS( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur))) + be16_to_cpu((bb)->bb_level), cur))) #define XFS_BMAP_REC_IADDR(bb,i,cur) \ (XFS_BTREE_REC_ADDR(XFS_BMAP_BLOCK_ISIZE( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ + be16_to_cpu((bb)->bb_level), cur), \ xfs_bmbt, bb, i, XFS_BMAP_BLOCK_IMAXRECS( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur))) + be16_to_cpu((bb)->bb_level), cur))) #define XFS_BMAP_KEY_DADDR(bb,i,cur) \ (XFS_BTREE_KEY_ADDR(XFS_BMAP_BLOCK_DSIZE( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ + be16_to_cpu((bb)->bb_level), cur), \ xfs_bmbt, bb, i, XFS_BMAP_BLOCK_DMAXRECS( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur))) + be16_to_cpu((bb)->bb_level), cur))) #define XFS_BMAP_KEY_IADDR(bb,i,cur) \ (XFS_BTREE_KEY_ADDR(XFS_BMAP_BLOCK_ISIZE( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ + be16_to_cpu((bb)->bb_level), cur), \ xfs_bmbt, bb, i, XFS_BMAP_BLOCK_IMAXRECS( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur))) + be16_to_cpu((bb)->bb_level), cur))) #define XFS_BMAP_PTR_DADDR(bb,i,cur) \ (XFS_BTREE_PTR_ADDR(XFS_BMAP_BLOCK_DSIZE( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ + be16_to_cpu((bb)->bb_level), cur), \ xfs_bmbt, bb, i, XFS_BMAP_BLOCK_DMAXRECS( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur))) + be16_to_cpu((bb)->bb_level), cur))) #define XFS_BMAP_PTR_IADDR(bb,i,cur) \ (XFS_BTREE_PTR_ADDR(XFS_BMAP_BLOCK_ISIZE( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur), \ + be16_to_cpu((bb)->bb_level), cur), \ xfs_bmbt, bb, i, XFS_BMAP_BLOCK_IMAXRECS( \ - INT_GET((bb)->bb_level, ARCH_CONVERT), cur))) + be16_to_cpu((bb)->bb_level), cur))) /* * These are to be used when we know the size of the block and @@ -254,7 +253,7 @@ typedef struct xfs_btree_lblock xfs_bmbt_block_t; #define XFS_BMAP_BROOT_PTR_ADDR(bb,i,sz) \ (XFS_BTREE_PTR_ADDR(sz,xfs_bmbt,bb,i,XFS_BMAP_BROOT_MAXRECS(sz))) -#define XFS_BMAP_BROOT_NUMRECS(bb) INT_GET((bb)->bb_numrecs, ARCH_CONVERT) +#define XFS_BMAP_BROOT_NUMRECS(bb) be16_to_cpu((bb)->bb_numrecs) #define XFS_BMAP_BROOT_MAXRECS(sz) XFS_BTREE_BLOCK_MAXRECS(sz,xfs_bmbt,0) #define XFS_BMAP_BROOT_SPACE_CALC(nrecs) \ @@ -262,7 +261,7 @@ typedef struct xfs_btree_lblock xfs_bmbt_block_t; ((nrecs) * (sizeof(xfs_bmbt_key_t) + sizeof(xfs_bmbt_ptr_t)))) #define XFS_BMAP_BROOT_SPACE(bb) \ - (XFS_BMAP_BROOT_SPACE_CALC(INT_GET((bb)->bb_numrecs, ARCH_CONVERT))) + (XFS_BMAP_BROOT_SPACE_CALC(be16_to_cpu((bb)->bb_numrecs))) #define XFS_BMDR_SPACE_CALC(nrecs) \ (int)(sizeof(xfs_bmdr_block_t) + \ ((nrecs) * (sizeof(xfs_bmbt_key_t) + sizeof(xfs_bmbt_ptr_t)))) @@ -273,11 +272,10 @@ typedef struct xfs_btree_lblock xfs_bmbt_block_t; #define XFS_BM_MAXLEVELS(mp,w) ((mp)->m_bm_maxlevels[(w)]) #define XFS_BMAP_SANITY_CHECK(mp,bb,level) \ - (INT_GET((bb)->bb_magic, ARCH_CONVERT) == XFS_BMAP_MAGIC && \ - INT_GET((bb)->bb_level, ARCH_CONVERT) == level && \ - INT_GET((bb)->bb_numrecs, ARCH_CONVERT) > 0 && \ - INT_GET((bb)->bb_numrecs, ARCH_CONVERT) <= \ - (mp)->m_bmap_dmxr[(level) != 0]) + (be32_to_cpu((bb)->bb_magic) == XFS_BMAP_MAGIC && \ + be16_to_cpu((bb)->bb_level) == level && \ + be16_to_cpu((bb)->bb_numrecs) > 0 && \ + be16_to_cpu((bb)->bb_numrecs) <= (mp)->m_bmap_dmxr[(level) != 0]) #ifdef __KERNEL__ diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c index 9de5a1f312c..52d5d095fc3 100644 --- a/fs/xfs/xfs_btree.c +++ b/fs/xfs/xfs_btree.c @@ -90,11 +90,14 @@ xfs_btree_maxrecs( switch (cur->bc_btnum) { case XFS_BTNUM_BNO: case XFS_BTNUM_CNT: - return (int)XFS_ALLOC_BLOCK_MAXRECS(INT_GET(block->bb_h.bb_level, ARCH_CONVERT), cur); + return (int)XFS_ALLOC_BLOCK_MAXRECS( + be16_to_cpu(block->bb_h.bb_level), cur); case XFS_BTNUM_BMAP: - return (int)XFS_BMAP_BLOCK_IMAXRECS(INT_GET(block->bb_h.bb_level, ARCH_CONVERT), cur); + return (int)XFS_BMAP_BLOCK_IMAXRECS( + be16_to_cpu(block->bb_h.bb_level), cur); case XFS_BTNUM_INO: - return (int)XFS_INOBT_BLOCK_MAXRECS(INT_GET(block->bb_h.bb_level, ARCH_CONVERT), cur); + return (int)XFS_INOBT_BLOCK_MAXRECS( + be16_to_cpu(block->bb_h.bb_level), cur); default: ASSERT(0); return 0; @@ -140,7 +143,7 @@ xfs_btree_check_key( k1 = ak1; k2 = ak2; - ASSERT(INT_GET(k1->ar_startblock, ARCH_CONVERT) < INT_GET(k2->ar_startblock, ARCH_CONVERT)); + ASSERT(be32_to_cpu(k1->ar_startblock) < be32_to_cpu(k2->ar_startblock)); break; } case XFS_BTNUM_CNT: { @@ -149,9 +152,9 @@ xfs_btree_check_key( k1 = ak1; k2 = ak2; - ASSERT(INT_GET(k1->ar_blockcount, ARCH_CONVERT) < INT_GET(k2->ar_blockcount, ARCH_CONVERT) || - (INT_GET(k1->ar_blockcount, ARCH_CONVERT) == INT_GET(k2->ar_blockcount, ARCH_CONVERT) && - INT_GET(k1->ar_startblock, ARCH_CONVERT) < INT_GET(k2->ar_startblock, ARCH_CONVERT))); + ASSERT(be32_to_cpu(k1->ar_blockcount) < be32_to_cpu(k2->ar_blockcount) || + (k1->ar_blockcount == k2->ar_blockcount && + be32_to_cpu(k1->ar_startblock) < be32_to_cpu(k2->ar_startblock))); break; } case XFS_BTNUM_BMAP: { @@ -194,16 +197,16 @@ xfs_btree_check_lblock( mp = cur->bc_mp; lblock_ok = - INT_GET(block->bb_magic, ARCH_CONVERT) == xfs_magics[cur->bc_btnum] && - INT_GET(block->bb_level, ARCH_CONVERT) == level && - INT_GET(block->bb_numrecs, ARCH_CONVERT) <= + be32_to_cpu(block->bb_magic) == xfs_magics[cur->bc_btnum] && + be16_to_cpu(block->bb_level) == level && + be16_to_cpu(block->bb_numrecs) <= xfs_btree_maxrecs(cur, (xfs_btree_block_t *)block) && block->bb_leftsib && - (INT_GET(block->bb_leftsib, ARCH_CONVERT) == NULLDFSBNO || - XFS_FSB_SANITY_CHECK(mp, INT_GET(block->bb_leftsib, ARCH_CONVERT))) && + (be64_to_cpu(block->bb_leftsib) == NULLDFSBNO || + XFS_FSB_SANITY_CHECK(mp, be64_to_cpu(block->bb_leftsib))) && block->bb_rightsib && - (INT_GET(block->bb_rightsib, ARCH_CONVERT) == NULLDFSBNO || - XFS_FSB_SANITY_CHECK(mp, INT_GET(block->bb_rightsib, ARCH_CONVERT))); + (be64_to_cpu(block->bb_rightsib) == NULLDFSBNO || + XFS_FSB_SANITY_CHECK(mp, be64_to_cpu(block->bb_rightsib))); if (unlikely(XFS_TEST_ERROR(!lblock_ok, mp, XFS_ERRTAG_BTREE_CHECK_LBLOCK, XFS_RANDOM_BTREE_CHECK_LBLOCK))) { if (bp) @@ -251,8 +254,9 @@ xfs_btree_check_rec( r1 = ar1; r2 = ar2; - ASSERT(INT_GET(r1->ar_startblock, ARCH_CONVERT) + INT_GET(r1->ar_blockcount, ARCH_CONVERT) <= - INT_GET(r2->ar_startblock, ARCH_CONVERT)); + ASSERT(be32_to_cpu(r1->ar_startblock) + + be32_to_cpu(r1->ar_blockcount) <= + be32_to_cpu(r2->ar_startblock)); break; } case XFS_BTNUM_CNT: { @@ -261,9 +265,9 @@ xfs_btree_check_rec( r1 = ar1; r2 = ar2; - ASSERT(INT_GET(r1->ar_blockcount, ARCH_CONVERT) < INT_GET(r2->ar_blockcount, ARCH_CONVERT) || - (INT_GET(r1->ar_blockcount, ARCH_CONVERT) == INT_GET(r2->ar_blockcount, ARCH_CONVERT) && - INT_GET(r1->ar_startblock, ARCH_CONVERT) < INT_GET(r2->ar_startblock, ARCH_CONVERT))); + ASSERT(be32_to_cpu(r1->ar_blockcount) < be32_to_cpu(r2->ar_blockcount) || + (r1->ar_blockcount == r2->ar_blockcount && + be32_to_cpu(r1->ar_startblock) < be32_to_cpu(r2->ar_startblock))); break; } case XFS_BTNUM_BMAP: { @@ -311,17 +315,17 @@ xfs_btree_check_sblock( agbp = cur->bc_private.a.agbp; agf = XFS_BUF_TO_AGF(agbp); - agflen = INT_GET(agf->agf_length, ARCH_CONVERT); + agflen = be32_to_cpu(agf->agf_length); sblock_ok = - INT_GET(block->bb_magic, ARCH_CONVERT) == xfs_magics[cur->bc_btnum] && - INT_GET(block->bb_level, ARCH_CONVERT) == level && - INT_GET(block->bb_numrecs, ARCH_CONVERT) <= + be32_to_cpu(block->bb_magic) == xfs_magics[cur->bc_btnum] && + be16_to_cpu(block->bb_level) == level && + be16_to_cpu(block->bb_numrecs) <= xfs_btree_maxrecs(cur, (xfs_btree_block_t *)block) && - (INT_GET(block->bb_leftsib, ARCH_CONVERT) == NULLAGBLOCK || - INT_GET(block->bb_leftsib, ARCH_CONVERT) < agflen) && + (be32_to_cpu(block->bb_leftsib) == NULLAGBLOCK || + be32_to_cpu(block->bb_leftsib) < agflen) && block->bb_leftsib && - (INT_GET(block->bb_rightsib, ARCH_CONVERT) == NULLAGBLOCK || - INT_GET(block->bb_rightsib, ARCH_CONVERT) < agflen) && + (be32_to_cpu(block->bb_rightsib) == NULLAGBLOCK || + be32_to_cpu(block->bb_rightsib) < agflen) && block->bb_rightsib; if (unlikely(XFS_TEST_ERROR(!sblock_ok, cur->bc_mp, XFS_ERRTAG_BTREE_CHECK_SBLOCK, @@ -352,7 +356,7 @@ xfs_btree_check_sptr( XFS_WANT_CORRUPTED_RETURN( level > 0 && ptr != NULLAGBLOCK && ptr != 0 && - ptr < INT_GET(agf->agf_length, ARCH_CONVERT)); + ptr < be32_to_cpu(agf->agf_length)); return 0; } @@ -591,15 +595,15 @@ xfs_btree_init_cursor( case XFS_BTNUM_BNO: case XFS_BTNUM_CNT: agf = XFS_BUF_TO_AGF(agbp); - nlevels = INT_GET(agf->agf_levels[btnum], ARCH_CONVERT); + nlevels = be32_to_cpu(agf->agf_levels[btnum]); break; case XFS_BTNUM_BMAP: ifp = XFS_IFORK_PTR(ip, whichfork); - nlevels = INT_GET(ifp->if_broot->bb_level, ARCH_CONVERT) + 1; + nlevels = be16_to_cpu(ifp->if_broot->bb_level) + 1; break; case XFS_BTNUM_INO: agi = XFS_BUF_TO_AGI(agbp); - nlevels = INT_GET(agi->agi_level, ARCH_CONVERT); + nlevels = be32_to_cpu(agi->agi_level); break; default: ASSERT(0); @@ -663,9 +667,9 @@ xfs_btree_islastblock( block = xfs_btree_get_block(cur, level, &bp); xfs_btree_check_block(cur, block, level, bp); if (XFS_BTREE_LONG_PTRS(cur->bc_btnum)) - return INT_GET(block->bb_u.l.bb_rightsib, ARCH_CONVERT) == NULLDFSBNO; + return be64_to_cpu(block->bb_u.l.bb_rightsib) == NULLDFSBNO; else - return INT_GET(block->bb_u.s.bb_rightsib, ARCH_CONVERT) == NULLAGBLOCK; + return be32_to_cpu(block->bb_u.s.bb_rightsib) == NULLAGBLOCK; } /* @@ -693,7 +697,7 @@ xfs_btree_lastrec( /* * Set the ptr value to numrecs, that's the last record/key. */ - cur->bc_ptrs[level] = INT_GET(block->bb_h.bb_numrecs, ARCH_CONVERT); + cur->bc_ptrs[level] = be16_to_cpu(block->bb_h.bb_numrecs); return 1; } @@ -863,38 +867,38 @@ xfs_btree_readahead_core( case XFS_BTNUM_BNO: case XFS_BTNUM_CNT: a = XFS_BUF_TO_ALLOC_BLOCK(cur->bc_bufs[lev]); - if ((lr & XFS_BTCUR_LEFTRA) && INT_GET(a->bb_leftsib, ARCH_CONVERT) != NULLAGBLOCK) { + if ((lr & XFS_BTCUR_LEFTRA) && be32_to_cpu(a->bb_leftsib) != NULLAGBLOCK) { xfs_btree_reada_bufs(cur->bc_mp, cur->bc_private.a.agno, - INT_GET(a->bb_leftsib, ARCH_CONVERT), 1); + be32_to_cpu(a->bb_leftsib), 1); rval++; } - if ((lr & XFS_BTCUR_RIGHTRA) && INT_GET(a->bb_rightsib, ARCH_CONVERT) != NULLAGBLOCK) { + if ((lr & XFS_BTCUR_RIGHTRA) && be32_to_cpu(a->bb_rightsib) != NULLAGBLOCK) { xfs_btree_reada_bufs(cur->bc_mp, cur->bc_private.a.agno, - INT_GET(a->bb_rightsib, ARCH_CONVERT), 1); + be32_to_cpu(a->bb_rightsib), 1); rval++; } break; case XFS_BTNUM_BMAP: b = XFS_BUF_TO_BMBT_BLOCK(cur->bc_bufs[lev]); - if ((lr & XFS_BTCUR_LEFTRA) && INT_GET(b->bb_leftsib, ARCH_CONVERT) != NULLDFSBNO) { - xfs_btree_reada_bufl(cur->bc_mp, INT_GET(b->bb_leftsib, ARCH_CONVERT), 1); + if ((lr & XFS_BTCUR_LEFTRA) && be64_to_cpu(b->bb_leftsib) != NULLDFSBNO) { + xfs_btree_reada_bufl(cur->bc_mp, be64_to_cpu(b->bb_leftsib), 1); rval++; } - if ((lr & XFS_BTCUR_RIGHTRA) && INT_GET(b->bb_rightsib, ARCH_CONVERT) != NULLDFSBNO) { - xfs_btree_reada_bufl(cur->bc_mp, INT_GET(b->bb_rightsib, ARCH_CONVERT), 1); + if ((lr & XFS_BTCUR_RIGHTRA) && be64_to_cpu(b->bb_rightsib) != NULLDFSBNO) { + xfs_btree_reada_bufl(cur->bc_mp, be64_to_cpu(b->bb_rightsib), 1); rval++; } break; case XFS_BTNUM_INO: i = XFS_BUF_TO_INOBT_BLOCK(cur->bc_bufs[lev]); - if ((lr & XFS_BTCUR_LEFTRA) && INT_GET(i->bb_leftsib, ARCH_CONVERT) != NULLAGBLOCK) { + if ((lr & XFS_BTCUR_LEFTRA) && be32_to_cpu(i->bb_leftsib) != NULLAGBLOCK) { xfs_btree_reada_bufs(cur->bc_mp, cur->bc_private.i.agno, - INT_GET(i->bb_leftsib, ARCH_CONVERT), 1); + be32_to_cpu(i->bb_leftsib), 1); rval++; } - if ((lr & XFS_BTCUR_RIGHTRA) && INT_GET(i->bb_rightsib, ARCH_CONVERT) != NULLAGBLOCK) { + if ((lr & XFS_BTCUR_RIGHTRA) && be32_to_cpu(i->bb_rightsib) != NULLAGBLOCK) { xfs_btree_reada_bufs(cur->bc_mp, cur->bc_private.i.agno, - INT_GET(i->bb_rightsib, ARCH_CONVERT), 1); + be32_to_cpu(i->bb_rightsib), 1); rval++; } break; @@ -926,14 +930,14 @@ xfs_btree_setbuf( return; b = XFS_BUF_TO_BLOCK(bp); if (XFS_BTREE_LONG_PTRS(cur->bc_btnum)) { - if (INT_GET(b->bb_u.l.bb_leftsib, ARCH_CONVERT) == NULLDFSBNO) + if (be64_to_cpu(b->bb_u.l.bb_leftsib) == NULLDFSBNO) cur->bc_ra[lev] |= XFS_BTCUR_LEFTRA; - if (INT_GET(b->bb_u.l.bb_rightsib, ARCH_CONVERT) == NULLDFSBNO) + if (be64_to_cpu(b->bb_u.l.bb_rightsib) == NULLDFSBNO) cur->bc_ra[lev] |= XFS_BTCUR_RIGHTRA; } else { - if (INT_GET(b->bb_u.s.bb_leftsib, ARCH_CONVERT) == NULLAGBLOCK) + if (be32_to_cpu(b->bb_u.s.bb_leftsib) == NULLAGBLOCK) cur->bc_ra[lev] |= XFS_BTCUR_LEFTRA; - if (INT_GET(b->bb_u.s.bb_rightsib, ARCH_CONVERT) == NULLAGBLOCK) + if (be32_to_cpu(b->bb_u.s.bb_rightsib) == NULLAGBLOCK) cur->bc_ra[lev] |= XFS_BTCUR_RIGHTRA; } } diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h index e6b2a09401c..44f1bd98064 100644 --- a/fs/xfs/xfs_btree.h +++ b/fs/xfs/xfs_btree.h @@ -39,25 +39,23 @@ struct xfs_trans; /* * Short form header: space allocation btrees. */ -typedef struct xfs_btree_sblock -{ - __uint32_t bb_magic; /* magic number for block type */ - __uint16_t bb_level; /* 0 is a leaf */ - __uint16_t bb_numrecs; /* current # of data records */ - xfs_agblock_t bb_leftsib; /* left sibling block or NULLAGBLOCK */ - xfs_agblock_t bb_rightsib; /* right sibling block or NULLAGBLOCK */ +typedef struct xfs_btree_sblock { + __be32 bb_magic; /* magic number for block type */ + __be16 bb_level; /* 0 is a leaf */ + __be16 bb_numrecs; /* current # of data records */ + __be32 bb_leftsib; /* left sibling block or NULLAGBLOCK */ + __be32 bb_rightsib; /* right sibling block or NULLAGBLOCK */ } xfs_btree_sblock_t; /* * Long form header: bmap btrees. */ -typedef struct xfs_btree_lblock -{ - __uint32_t bb_magic; /* magic number for block type */ - __uint16_t bb_level; /* 0 is a leaf */ - __uint16_t bb_numrecs; /* current # of data records */ - xfs_dfsbno_t bb_leftsib; /* left sibling block or NULLDFSBNO */ - xfs_dfsbno_t bb_rightsib; /* right sibling block or NULLDFSBNO */ +typedef struct xfs_btree_lblock { + __be32 bb_magic; /* magic number for block type */ + __be16 bb_level; /* 0 is a leaf */ + __be16 bb_numrecs; /* current # of data records */ + __be64 bb_leftsib; /* left sibling block or NULLDFSBNO */ + __be64 bb_rightsib; /* right sibling block or NULLDFSBNO */ } xfs_btree_lblock_t; /* @@ -65,24 +63,23 @@ typedef struct xfs_btree_lblock */ typedef struct xfs_btree_hdr { - __uint32_t bb_magic; /* magic number for block type */ - __uint16_t bb_level; /* 0 is a leaf */ - __uint16_t bb_numrecs; /* current # of data records */ + __be32 bb_magic; /* magic number for block type */ + __be16 bb_level; /* 0 is a leaf */ + __be16 bb_numrecs; /* current # of data records */ } xfs_btree_hdr_t; -typedef struct xfs_btree_block -{ +typedef struct xfs_btree_block { xfs_btree_hdr_t bb_h; /* header */ - union { - struct { - xfs_agblock_t bb_leftsib; - xfs_agblock_t bb_rightsib; - } s; /* short form pointers */ + union { + struct { + __be32 bb_leftsib; + __be32 bb_rightsib; + } s; /* short form pointers */ struct { - xfs_dfsbno_t bb_leftsib; - xfs_dfsbno_t bb_rightsib; - } l; /* long form pointers */ - } bb_u; /* rest */ + __be64 bb_leftsib; + __be64 bb_rightsib; + } l; /* long form pointers */ + } bb_u; /* rest */ } xfs_btree_block_t; /* @@ -146,7 +143,7 @@ typedef struct xfs_btree_cur struct xfs_trans *bc_tp; /* transaction we're in, if any */ struct xfs_mount *bc_mp; /* file system mount struct */ union { - xfs_alloc_rec_t a; + xfs_alloc_rec_incore_t a; xfs_bmbt_irec_t b; xfs_inobt_rec_t i; } bc_rec; /* current insert/search record value */ diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 239e701e982..0ca597b0ca7 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c @@ -191,28 +191,26 @@ xfs_growfs_data_private( XFS_FSS_TO_BB(mp, 1), 0); agf = XFS_BUF_TO_AGF(bp); memset(agf, 0, mp->m_sb.sb_sectsize); - INT_SET(agf->agf_magicnum, ARCH_CONVERT, XFS_AGF_MAGIC); - INT_SET(agf->agf_versionnum, ARCH_CONVERT, XFS_AGF_VERSION); - INT_SET(agf->agf_seqno, ARCH_CONVERT, agno); + agf->agf_magicnum = cpu_to_be32(XFS_AGF_MAGIC); + agf->agf_versionnum = cpu_to_be32(XFS_AGF_VERSION); + agf->agf_seqno = cpu_to_be32(agno); if (agno == nagcount - 1) agsize = nb - (agno * (xfs_rfsblock_t)mp->m_sb.sb_agblocks); else agsize = mp->m_sb.sb_agblocks; - INT_SET(agf->agf_length, ARCH_CONVERT, agsize); - INT_SET(agf->agf_roots[XFS_BTNUM_BNOi], ARCH_CONVERT, - XFS_BNO_BLOCK(mp)); - INT_SET(agf->agf_roots[XFS_BTNUM_CNTi], ARCH_CONVERT, - XFS_CNT_BLOCK(mp)); - INT_SET(agf->agf_levels[XFS_BTNUM_BNOi], ARCH_CONVERT, 1); - INT_SET(agf->agf_levels[XFS_BTNUM_CNTi], ARCH_CONVERT, 1); + agf->agf_length = cpu_to_be32(agsize); + agf->agf_roots[XFS_BTNUM_BNOi] = cpu_to_be32(XFS_BNO_BLOCK(mp)); + agf->agf_roots[XFS_BTNUM_CNTi] = cpu_to_be32(XFS_CNT_BLOCK(mp)); + agf->agf_levels[XFS_BTNUM_BNOi] = cpu_to_be32(1); + agf->agf_levels[XFS_BTNUM_CNTi] = cpu_to_be32(1); agf->agf_flfirst = 0; - INT_SET(agf->agf_fllast, ARCH_CONVERT, XFS_AGFL_SIZE(mp) - 1); + agf->agf_fllast = cpu_to_be32(XFS_AGFL_SIZE(mp) - 1); agf->agf_flcount = 0; tmpsize = agsize - XFS_PREALLOC_BLOCKS(mp); - INT_SET(agf->agf_freeblks, ARCH_CONVERT, tmpsize); - INT_SET(agf->agf_longest, ARCH_CONVERT, tmpsize); + agf->agf_freeblks = cpu_to_be32(tmpsize); + agf->agf_longest = cpu_to_be32(tmpsize); error = xfs_bwrite(mp, bp); if (error) { goto error0; @@ -225,19 +223,18 @@ xfs_growfs_data_private( XFS_FSS_TO_BB(mp, 1), 0); agi = XFS_BUF_TO_AGI(bp); memset(agi, 0, mp->m_sb.sb_sectsize); - INT_SET(agi->agi_magicnum, ARCH_CONVERT, XFS_AGI_MAGIC); - INT_SET(agi->agi_versionnum, ARCH_CONVERT, XFS_AGI_VERSION); - INT_SET(agi->agi_seqno, ARCH_CONVERT, agno); - INT_SET(agi->agi_length, ARCH_CONVERT, agsize); + agi->agi_magicnum = cpu_to_be32(XFS_AGI_MAGIC); + agi->agi_versionnum = cpu_to_be32(XFS_AGI_VERSION); + agi->agi_seqno = cpu_to_be32(agno); + agi->agi_length = cpu_to_be32(agsize); agi->agi_count = 0; - INT_SET(agi->agi_root, ARCH_CONVERT, XFS_IBT_BLOCK(mp)); - INT_SET(agi->agi_level, ARCH_CONVERT, 1); + agi->agi_root = cpu_to_be32(XFS_IBT_BLOCK(mp)); + agi->agi_level = cpu_to_be32(1); agi->agi_freecount = 0; - INT_SET(agi->agi_newino, ARCH_CONVERT, NULLAGINO); - INT_SET(agi->agi_dirino, ARCH_CONVERT, NULLAGINO); + agi->agi_newino = cpu_to_be32(NULLAGINO); + agi->agi_dirino = cpu_to_be32(NULLAGINO); for (bucket = 0; bucket < XFS_AGI_UNLINKED_BUCKETS; bucket++) - INT_SET(agi->agi_unlinked[bucket], ARCH_CONVERT, - NULLAGINO); + agi->agi_unlinked[bucket] = cpu_to_be32(NULLAGINO); error = xfs_bwrite(mp, bp); if (error) { goto error0; @@ -250,17 +247,16 @@ xfs_growfs_data_private( BTOBB(mp->m_sb.sb_blocksize), 0); block = XFS_BUF_TO_SBLOCK(bp); memset(block, 0, mp->m_sb.sb_blocksize); - INT_SET(block->bb_magic, ARCH_CONVERT, XFS_ABTB_MAGIC); + block->bb_magic = cpu_to_be32(XFS_ABTB_MAGIC); block->bb_level = 0; - INT_SET(block->bb_numrecs, ARCH_CONVERT, 1); - INT_SET(block->bb_leftsib, ARCH_CONVERT, NULLAGBLOCK); - INT_SET(block->bb_rightsib, ARCH_CONVERT, NULLAGBLOCK); + block->bb_numrecs = cpu_to_be16(1); + block->bb_leftsib = cpu_to_be32(NULLAGBLOCK); + block->bb_rightsib = cpu_to_be32(NULLAGBLOCK); arec = XFS_BTREE_REC_ADDR(mp->m_sb.sb_blocksize, xfs_alloc, block, 1, mp->m_alloc_mxr[0]); - INT_SET(arec->ar_startblock, ARCH_CONVERT, - XFS_PREALLOC_BLOCKS(mp)); - INT_SET(arec->ar_blockcount, ARCH_CONVERT, - agsize - INT_GET(arec->ar_startblock, ARCH_CONVERT)); + arec->ar_startblock = cpu_to_be32(XFS_PREALLOC_BLOCKS(mp)); + arec->ar_blockcount = cpu_to_be32( + agsize - be32_to_cpu(arec->ar_startblock)); error = xfs_bwrite(mp, bp); if (error) { goto error0; @@ -273,18 +269,17 @@ xfs_growfs_data_private( BTOBB(mp->m_sb.sb_blocksize), 0); block = XFS_BUF_TO_SBLOCK(bp); memset(block, 0, mp->m_sb.sb_blocksize); - INT_SET(block->bb_magic, ARCH_CONVERT, XFS_ABTC_MAGIC); + block->bb_magic = cpu_to_be32(XFS_ABTC_MAGIC); block->bb_level = 0; - INT_SET(block->bb_numrecs, ARCH_CONVERT, 1); - INT_SET(block->bb_leftsib, ARCH_CONVERT, NULLAGBLOCK); - INT_SET(block->bb_rightsib, ARCH_CONVERT, NULLAGBLOCK); + block->bb_numrecs = cpu_to_be16(1); + block->bb_leftsib = cpu_to_be32(NULLAGBLOCK); + block->bb_rightsib = cpu_to_be32(NULLAGBLOCK); arec = XFS_BTREE_REC_ADDR(mp->m_sb.sb_blocksize, xfs_alloc, block, 1, mp->m_alloc_mxr[0]); - INT_SET(arec->ar_startblock, ARCH_CONVERT, - XFS_PREALLOC_BLOCKS(mp)); - INT_SET(arec->ar_blockcount, ARCH_CONVERT, - agsize - INT_GET(arec->ar_startblock, ARCH_CONVERT)); - nfree += INT_GET(arec->ar_blockcount, ARCH_CONVERT); + arec->ar_startblock = cpu_to_be32(XFS_PREALLOC_BLOCKS(mp)); + arec->ar_blockcount = cpu_to_be32( + agsize - be32_to_cpu(arec->ar_startblock)); + nfree += be32_to_cpu(arec->ar_blockcount); error = xfs_bwrite(mp, bp); if (error) { goto error0; @@ -297,11 +292,11 @@ xfs_growfs_data_private( BTOBB(mp->m_sb.sb_blocksize), 0); block = XFS_BUF_TO_SBLOCK(bp); memset(block, 0, mp->m_sb.sb_blocksize); - INT_SET(block->bb_magic, ARCH_CONVERT, XFS_IBT_MAGIC); + block->bb_magic = cpu_to_be32(XFS_IBT_MAGIC); block->bb_level = 0; block->bb_numrecs = 0; - INT_SET(block->bb_leftsib, ARCH_CONVERT, NULLAGBLOCK); - INT_SET(block->bb_rightsib, ARCH_CONVERT, NULLAGBLOCK); + block->bb_leftsib = cpu_to_be32(NULLAGBLOCK); + block->bb_rightsib = cpu_to_be32(NULLAGBLOCK); error = xfs_bwrite(mp, bp); if (error) { goto error0; @@ -321,10 +316,9 @@ xfs_growfs_data_private( } ASSERT(bp); agi = XFS_BUF_TO_AGI(bp); - INT_MOD(agi->agi_length, ARCH_CONVERT, new); + be32_add(&agi->agi_length, new); ASSERT(nagcount == oagcount || - INT_GET(agi->agi_length, ARCH_CONVERT) == - mp->m_sb.sb_agblocks); + be32_to_cpu(agi->agi_length) == mp->m_sb.sb_agblocks); xfs_ialloc_log_agi(tp, bp, XFS_AGI_LENGTH); /* * Change agf length. @@ -335,14 +329,14 @@ xfs_growfs_data_private( } ASSERT(bp); agf = XFS_BUF_TO_AGF(bp); - INT_MOD(agf->agf_length, ARCH_CONVERT, new); - ASSERT(INT_GET(agf->agf_length, ARCH_CONVERT) == - INT_GET(agi->agi_length, ARCH_CONVERT)); + be32_add(&agf->agf_length, new); + ASSERT(be32_to_cpu(agf->agf_length) == + be32_to_cpu(agi->agi_length)); /* * Free the new space. */ error = xfs_free_extent(tp, XFS_AGB_TO_FSB(mp, agno, - INT_GET(agf->agf_length, ARCH_CONVERT) - new), new); + be32_to_cpu(agf->agf_length) - new), new); if (error) { goto error0; } diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index d8ceb3d1865..8f3fae1aa98 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c @@ -178,8 +178,8 @@ xfs_ialloc_ag_alloc( * Ideally they should be spaced out through the a.g. * For now, just allocate blocks up front. */ - args.agbno = INT_GET(agi->agi_root, ARCH_CONVERT); - args.fsbno = XFS_AGB_TO_FSB(args.mp, INT_GET(agi->agi_seqno, ARCH_CONVERT), + args.agbno = be32_to_cpu(agi->agi_root); + args.fsbno = XFS_AGB_TO_FSB(args.mp, be32_to_cpu(agi->agi_seqno), args.agbno); /* * Allocate a fixed-size extent of inodes. @@ -201,9 +201,9 @@ xfs_ialloc_ag_alloc( */ if (isaligned && args.fsbno == NULLFSBLOCK) { args.type = XFS_ALLOCTYPE_NEAR_BNO; - args.agbno = INT_GET(agi->agi_root, ARCH_CONVERT); + args.agbno = be32_to_cpu(agi->agi_root); args.fsbno = XFS_AGB_TO_FSB(args.mp, - INT_GET(agi->agi_seqno, ARCH_CONVERT), args.agbno); + be32_to_cpu(agi->agi_seqno), args.agbno); if (XFS_SB_VERSION_HASALIGN(&args.mp->m_sb) && args.mp->m_sb.sb_inoalignmt >= XFS_B_TO_FSBT(args.mp, XFS_INODE_CLUSTER_SIZE(args.mp))) @@ -258,7 +258,7 @@ xfs_ialloc_ag_alloc( /* * Get the block. */ - d = XFS_AGB_TO_DADDR(args.mp, INT_GET(agi->agi_seqno, ARCH_CONVERT), + d = XFS_AGB_TO_DADDR(args.mp, be32_to_cpu(agi->agi_seqno), args.agbno + (j * blks_per_cluster)); fbuf = xfs_trans_get_buf(tp, args.mp->m_ddev_targp, d, args.mp->m_bsize * blks_per_cluster, @@ -278,17 +278,17 @@ xfs_ialloc_ag_alloc( } xfs_trans_inode_alloc_buf(tp, fbuf); } - INT_MOD(agi->agi_count, ARCH_CONVERT, newlen); - INT_MOD(agi->agi_freecount, ARCH_CONVERT, newlen); + be32_add(&agi->agi_count, newlen); + be32_add(&agi->agi_freecount, newlen); down_read(&args.mp->m_peraglock); - args.mp->m_perag[INT_GET(agi->agi_seqno, ARCH_CONVERT)].pagi_freecount += newlen; + args.mp->m_perag[be32_to_cpu(agi->agi_seqno)].pagi_freecount += newlen; up_read(&args.mp->m_peraglock); - INT_SET(agi->agi_newino, ARCH_CONVERT, newino); + agi->agi_newino = cpu_to_be32(newino); /* * Insert records describing the new inode chunk into the btree. */ cur = xfs_btree_init_cursor(args.mp, tp, agbp, - INT_GET(agi->agi_seqno, ARCH_CONVERT), + be32_to_cpu(agi->agi_seqno), XFS_BTNUM_INO, (xfs_inode_t *)0, 0); for (thisino = newino; thisino < newino + newlen; @@ -528,7 +528,7 @@ xfs_dialloc( return 0; } agi = XFS_BUF_TO_AGI(agbp); - ASSERT(INT_GET(agi->agi_magicnum, ARCH_CONVERT) == XFS_AGI_MAGIC); + ASSERT(be32_to_cpu(agi->agi_magicnum) == XFS_AGI_MAGIC); } else { /* * Continue where we left off before. In this case, we @@ -536,12 +536,12 @@ xfs_dialloc( */ agbp = *IO_agbp; agi = XFS_BUF_TO_AGI(agbp); - ASSERT(INT_GET(agi->agi_magicnum, ARCH_CONVERT) == XFS_AGI_MAGIC); - ASSERT(INT_GET(agi->agi_freecount, ARCH_CONVERT) > 0); + ASSERT(be32_to_cpu(agi->agi_magicnum) == XFS_AGI_MAGIC); + ASSERT(be32_to_cpu(agi->agi_freecount) > 0); } mp = tp->t_mountp; agcount = mp->m_sb.sb_agcount; - agno = INT_GET(agi->agi_seqno, ARCH_CONVERT); + agno = be32_to_cpu(agi->agi_seqno); tagno = agno; pagno = XFS_INO_TO_AGNO(mp, parent); pagino = XFS_INO_TO_AGINO(mp, parent); @@ -589,7 +589,7 @@ xfs_dialloc( * can commit the current transaction and call * us again where we left off. */ - ASSERT(INT_GET(agi->agi_freecount, ARCH_CONVERT) > 0); + ASSERT(be32_to_cpu(agi->agi_freecount) > 0); *alloc_done = B_TRUE; *IO_agbp = agbp; *inop = NULLFSINO; @@ -620,7 +620,7 @@ nextag: if (error) goto nextag; agi = XFS_BUF_TO_AGI(agbp); - ASSERT(INT_GET(agi->agi_magicnum, ARCH_CONVERT) == XFS_AGI_MAGIC); + ASSERT(be32_to_cpu(agi->agi_magicnum) == XFS_AGI_MAGIC); } /* * Here with an allocation group that has a free inode. @@ -629,14 +629,14 @@ nextag: */ agno = tagno; *IO_agbp = NULL; - cur = xfs_btree_init_cursor(mp, tp, agbp, INT_GET(agi->agi_seqno, ARCH_CONVERT), + cur = xfs_btree_init_cursor(mp, tp, agbp, be32_to_cpu(agi->agi_seqno), XFS_BTNUM_INO, (xfs_inode_t *)0, 0); /* * If pagino is 0 (this is the root inode allocation) use newino. * This must work because we've just allocated some. */ if (!pagino) - pagino = INT_GET(agi->agi_newino, ARCH_CONVERT); + pagino = be32_to_cpu(agi->agi_newino); #ifdef DEBUG if (cur->bc_nlevels == 1) { int freecount = 0; @@ -654,7 +654,7 @@ nextag: goto error0; } while (i == 1); - ASSERT(freecount == INT_GET(agi->agi_freecount, ARCH_CONVERT) || + ASSERT(freecount == be32_to_cpu(agi->agi_freecount) || XFS_FORCED_SHUTDOWN(mp)); } #endif @@ -813,9 +813,9 @@ nextag: * In a different a.g. from the parent. * See if the most recently allocated block has any free. */ - else if (INT_GET(agi->agi_newino, ARCH_CONVERT) != NULLAGINO) { + else if (be32_to_cpu(agi->agi_newino) != NULLAGINO) { if ((error = xfs_inobt_lookup_eq(cur, - INT_GET(agi->agi_newino, ARCH_CONVERT), 0, 0, &i))) + be32_to_cpu(agi->agi_newino), 0, 0, &i))) goto error0; if (i == 1 && (error = xfs_inobt_get_rec(cur, &rec.ir_startino, @@ -862,7 +862,7 @@ nextag: if ((error = xfs_inobt_update(cur, rec.ir_startino, rec.ir_freecount, rec.ir_free))) goto error0; - INT_MOD(agi->agi_freecount, ARCH_CONVERT, -1); + be32_add(&agi->agi_freecount, -1); xfs_ialloc_log_agi(tp, agbp, XFS_AGI_FREECOUNT); down_read(&mp->m_peraglock); mp->m_perag[tagno].pagi_freecount--; @@ -882,7 +882,7 @@ nextag: if ((error = xfs_inobt_increment(cur, 0, &i))) goto error0; } while (i == 1); - ASSERT(freecount == INT_GET(agi->agi_freecount, ARCH_CONVERT) || + ASSERT(freecount == be32_to_cpu(agi->agi_freecount) || XFS_FORCED_SHUTDOWN(mp)); } #endif @@ -970,8 +970,8 @@ xfs_difree( return error; } agi = XFS_BUF_TO_AGI(agbp); - ASSERT(INT_GET(agi->agi_magicnum, ARCH_CONVERT) == XFS_AGI_MAGIC); - ASSERT(agbno < INT_GET(agi->agi_length, ARCH_CONVERT)); + ASSERT(be32_to_cpu(agi->agi_magicnum) == XFS_AGI_MAGIC); + ASSERT(agbno < be32_to_cpu(agi->agi_length)); /* * Initialize the cursor. */ @@ -993,7 +993,7 @@ xfs_difree( goto error0; } } while (i == 1); - ASSERT(freecount == INT_GET(agi->agi_freecount, ARCH_CONVERT) || + ASSERT(freecount == be32_to_cpu(agi->agi_freecount) || XFS_FORCED_SHUTDOWN(mp)); } #endif @@ -1042,8 +1042,8 @@ xfs_difree( * to be freed when the transaction is committed. */ ilen = XFS_IALLOC_INODES(mp); - INT_MOD(agi->agi_count, ARCH_CONVERT, -ilen); - INT_MOD(agi->agi_freecount, ARCH_CONVERT, -(ilen - 1)); + be32_add(&agi->agi_count, -ilen); + be32_add(&agi->agi_freecount, -(ilen - 1)); xfs_ialloc_log_agi(tp, agbp, XFS_AGI_COUNT | XFS_AGI_FREECOUNT); down_read(&mp->m_peraglock); mp->m_perag[agno].pagi_freecount -= ilen - 1; @@ -1072,7 +1072,7 @@ xfs_difree( /* * Change the inode free counts and log the ag/sb changes. */ - INT_MOD(agi->agi_freecount, ARCH_CONVERT, 1); + be32_add(&agi->agi_freecount, 1); xfs_ialloc_log_agi(tp, agbp, XFS_AGI_FREECOUNT); down_read(&mp->m_peraglock); mp->m_perag[agno].pagi_freecount++; @@ -1098,7 +1098,7 @@ xfs_difree( goto error0; } } while (i == 1); - ASSERT(freecount == INT_GET(agi->agi_freecount, ARCH_CONVERT) || + ASSERT(freecount == be32_to_cpu(agi->agi_freecount) || XFS_FORCED_SHUTDOWN(mp)); } #endif @@ -1307,7 +1307,7 @@ xfs_ialloc_log_agi( xfs_agi_t *agi; /* allocation group header */ agi = XFS_BUF_TO_AGI(bp); - ASSERT(INT_GET(agi->agi_magicnum, ARCH_CONVERT) == XFS_AGI_MAGIC); + ASSERT(be32_to_cpu(agi->agi_magicnum) == XFS_AGI_MAGIC); #endif /* * Compute byte offsets for the first and last fields. @@ -1349,9 +1349,8 @@ xfs_ialloc_read_agi( */ agi = XFS_BUF_TO_AGI(bp); agi_ok = - INT_GET(agi->agi_magicnum, ARCH_CONVERT) == XFS_AGI_MAGIC && - XFS_AGI_GOOD_VERSION( - INT_GET(agi->agi_versionnum, ARCH_CONVERT)); + be32_to_cpu(agi->agi_magicnum) == XFS_AGI_MAGIC && + XFS_AGI_GOOD_VERSION(be32_to_cpu(agi->agi_versionnum)); if (unlikely(XFS_TEST_ERROR(!agi_ok, mp, XFS_ERRTAG_IALLOC_READ_AGI, XFS_RANDOM_IALLOC_READ_AGI))) { XFS_CORRUPTION_ERROR("xfs_ialloc_read_agi", XFS_ERRLEVEL_LOW, @@ -1361,16 +1360,15 @@ xfs_ialloc_read_agi( } pag = &mp->m_perag[agno]; if (!pag->pagi_init) { - pag->pagi_freecount = INT_GET(agi->agi_freecount, ARCH_CONVERT); + pag->pagi_freecount = be32_to_cpu(agi->agi_freecount); pag->pagi_init = 1; } else { /* * It's possible for these to be out of sync if * we are in the middle of a forced shutdown. */ - ASSERT(pag->pagi_freecount == - INT_GET(agi->agi_freecount, ARCH_CONVERT) - || XFS_FORCED_SHUTDOWN(mp)); + ASSERT(pag->pagi_freecount == be32_to_cpu(agi->agi_freecount) || + XFS_FORCED_SHUTDOWN(mp)); } #ifdef DEBUG diff --git a/fs/xfs/xfs_ialloc_btree.c b/fs/xfs/xfs_ialloc_btree.c index 6912143f6ff..60c65683462 100644 --- a/fs/xfs/xfs_ialloc_btree.c +++ b/fs/xfs/xfs_ialloc_btree.c @@ -118,7 +118,7 @@ xfs_inobt_delrec( * Fail if we're off the end of the block. */ - numrecs = INT_GET(block->bb_numrecs, ARCH_CONVERT); + numrecs = be16_to_cpu(block->bb_numrecs); if (ptr > numrecs) { *stat = 0; return 0; @@ -133,7 +133,7 @@ xfs_inobt_delrec( pp = XFS_INOBT_PTR_ADDR(block, 1, cur); #ifdef DEBUG for (i = ptr; i < numrecs; i++) { - if ((error = xfs_btree_check_sptr(cur, INT_GET(pp[i], ARCH_CONVERT), level))) + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(pp[i]), level))) return error; } #endif @@ -170,7 +170,7 @@ xfs_inobt_delrec( * Decrement and log the number of entries in the block. */ numrecs--; - INT_SET(block->bb_numrecs, ARCH_CONVERT, numrecs); + block->bb_numrecs = cpu_to_be16(numrecs); xfs_inobt_log_block(cur->bc_tp, bp, XFS_BB_NUMRECS); /* * Is this the root level? If so, we're almost done. @@ -189,9 +189,9 @@ xfs_inobt_delrec( * pp is still set to the first pointer in the block. * Make it the new root of the btree. */ - bno = INT_GET(agi->agi_root, ARCH_CONVERT); + bno = be32_to_cpu(agi->agi_root); agi->agi_root = *pp; - INT_MOD(agi->agi_level, ARCH_CONVERT, -1); + be32_add(&agi->agi_level, -1); /* * Free the block. */ @@ -234,8 +234,8 @@ xfs_inobt_delrec( * tree balanced. Look at the left and right sibling blocks to * see if we can re-balance by moving only one record. */ - rbno = INT_GET(block->bb_rightsib, ARCH_CONVERT); - lbno = INT_GET(block->bb_leftsib, ARCH_CONVERT); + rbno = be32_to_cpu(block->bb_rightsib); + lbno = be32_to_cpu(block->bb_leftsib); bno = NULLAGBLOCK; ASSERT(rbno != NULLAGBLOCK || lbno != NULLAGBLOCK); /* @@ -272,18 +272,18 @@ xfs_inobt_delrec( /* * Grab the current block number, for future use. */ - bno = INT_GET(right->bb_leftsib, ARCH_CONVERT); + bno = be32_to_cpu(right->bb_leftsib); /* * If right block is full enough so that removing one entry * won't make it too empty, and left-shifting an entry out * of right to us works, we're done. */ - if (INT_GET(right->bb_numrecs, ARCH_CONVERT) - 1 >= + if (be16_to_cpu(right->bb_numrecs) - 1 >= XFS_INOBT_BLOCK_MINRECS(level, cur)) { if ((error = xfs_inobt_lshift(tcur, level, &i))) goto error0; if (i) { - ASSERT(INT_GET(block->bb_numrecs, ARCH_CONVERT) >= + ASSERT(be16_to_cpu(block->bb_numrecs) >= XFS_INOBT_BLOCK_MINRECS(level, cur)); xfs_btree_del_cursor(tcur, XFS_BTREE_NOERROR); @@ -300,7 +300,7 @@ xfs_inobt_delrec( * future reference, and fix up the temp cursor to point * to our block again (last record). */ - rrecs = INT_GET(right->bb_numrecs, ARCH_CONVERT); + rrecs = be16_to_cpu(right->bb_numrecs); if (lbno != NULLAGBLOCK) { xfs_btree_firstrec(tcur, level); if ((error = xfs_inobt_decrement(tcur, level, &i))) @@ -332,18 +332,18 @@ xfs_inobt_delrec( /* * Grab the current block number, for future use. */ - bno = INT_GET(left->bb_rightsib, ARCH_CONVERT); + bno = be32_to_cpu(left->bb_rightsib); /* * If left block is full enough so that removing one entry * won't make it too empty, and right-shifting an entry out * of left to us works, we're done. */ - if (INT_GET(left->bb_numrecs, ARCH_CONVERT) - 1 >= + if (be16_to_cpu(left->bb_numrecs) - 1 >= XFS_INOBT_BLOCK_MINRECS(level, cur)) { if ((error = xfs_inobt_rshift(tcur, level, &i))) goto error0; if (i) { - ASSERT(INT_GET(block->bb_numrecs, ARCH_CONVERT) >= + ASSERT(be16_to_cpu(block->bb_numrecs) >= XFS_INOBT_BLOCK_MINRECS(level, cur)); xfs_btree_del_cursor(tcur, XFS_BTREE_NOERROR); @@ -357,7 +357,7 @@ xfs_inobt_delrec( * Otherwise, grab the number of records in right for * future reference. */ - lrecs = INT_GET(left->bb_numrecs, ARCH_CONVERT); + lrecs = be16_to_cpu(left->bb_numrecs); } /* * Delete the temp cursor, we're done with it. @@ -378,14 +378,14 @@ xfs_inobt_delrec( */ rbno = bno; right = block; - rrecs = INT_GET(right->bb_numrecs, ARCH_CONVERT); + rrecs = be16_to_cpu(right->bb_numrecs); rbp = bp; if ((error = xfs_btree_read_bufs(mp, cur->bc_tp, cur->bc_private.i.agno, lbno, 0, &lbp, XFS_INO_BTREE_REF))) return error; left = XFS_BUF_TO_INOBT_BLOCK(lbp); - lrecs = INT_GET(left->bb_numrecs, ARCH_CONVERT); + lrecs = be16_to_cpu(left->bb_numrecs); if ((error = xfs_btree_check_sblock(cur, left, level, lbp))) return error; } @@ -400,14 +400,14 @@ xfs_inobt_delrec( */ lbno = bno; left = block; - lrecs = INT_GET(left->bb_numrecs, ARCH_CONVERT); + lrecs = be16_to_cpu(left->bb_numrecs); lbp = bp; if ((error = xfs_btree_read_bufs(mp, cur->bc_tp, cur->bc_private.i.agno, rbno, 0, &rbp, XFS_INO_BTREE_REF))) return error; right = XFS_BUF_TO_INOBT_BLOCK(rbp); - rrecs = INT_GET(right->bb_numrecs, ARCH_CONVERT); + rrecs = be16_to_cpu(right->bb_numrecs); if ((error = xfs_btree_check_sblock(cur, right, level, rbp))) return error; } @@ -435,7 +435,7 @@ xfs_inobt_delrec( rpp = XFS_INOBT_PTR_ADDR(right, 1, cur); #ifdef DEBUG for (i = 0; i < rrecs; i++) { - if ((error = xfs_btree_check_sptr(cur, INT_GET(rpp[i], ARCH_CONVERT), level))) + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(rpp[i]), level))) return error; } #endif @@ -471,7 +471,7 @@ xfs_inobt_delrec( * Fix up the number of records in the surviving block. */ lrecs += rrecs; - INT_SET(left->bb_numrecs, ARCH_CONVERT, lrecs); + left->bb_numrecs = cpu_to_be16(lrecs); /* * Fix up the right block pointer in the surviving block, and log it. */ @@ -481,18 +481,18 @@ xfs_inobt_delrec( * If there is a right sibling now, make it point to the * remaining block. */ - if (INT_GET(left->bb_rightsib, ARCH_CONVERT) != NULLAGBLOCK) { + if (be32_to_cpu(left->bb_rightsib) != NULLAGBLOCK) { xfs_inobt_block_t *rrblock; xfs_buf_t *rrbp; if ((error = xfs_btree_read_bufs(mp, cur->bc_tp, - cur->bc_private.i.agno, INT_GET(left->bb_rightsib, ARCH_CONVERT), 0, + cur->bc_private.i.agno, be32_to_cpu(left->bb_rightsib), 0, &rrbp, XFS_INO_BTREE_REF))) return error; rrblock = XFS_BUF_TO_INOBT_BLOCK(rrbp); if ((error = xfs_btree_check_sblock(cur, rrblock, level, rrbp))) return error; - INT_SET(rrblock->bb_leftsib, ARCH_CONVERT, lbno); + rrblock->bb_leftsib = cpu_to_be32(lbno); xfs_inobt_log_block(cur->bc_tp, rrbp, XFS_BB_LEFTSIB); } /* @@ -584,7 +584,7 @@ xfs_inobt_insrec( */ bp = cur->bc_bufs[level]; block = XFS_BUF_TO_INOBT_BLOCK(bp); - numrecs = INT_GET(block->bb_numrecs, ARCH_CONVERT); + numrecs = be16_to_cpu(block->bb_numrecs); #ifdef DEBUG if ((error = xfs_btree_check_sblock(cur, block, level, bp))) return error; @@ -658,7 +658,7 @@ xfs_inobt_insrec( * At this point we know there's room for our new entry in the block * we're pointing at. */ - numrecs = INT_GET(block->bb_numrecs, ARCH_CONVERT); + numrecs = be16_to_cpu(block->bb_numrecs); if (level > 0) { /* * It's a non-leaf entry. Make a hole for the new data @@ -668,7 +668,7 @@ xfs_inobt_insrec( pp = XFS_INOBT_PTR_ADDR(block, 1, cur); #ifdef DEBUG for (i = numrecs; i >= ptr; i--) { - if ((error = xfs_btree_check_sptr(cur, INT_GET(pp[i - 1], ARCH_CONVERT), level))) + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(pp[i - 1]), level))) return error; } #endif @@ -684,9 +684,9 @@ xfs_inobt_insrec( return error; #endif kp[ptr - 1] = key; /* INT_: struct copy */ - INT_SET(pp[ptr - 1], ARCH_CONVERT, *bnop); + pp[ptr - 1] = cpu_to_be32(*bnop); numrecs++; - INT_SET(block->bb_numrecs, ARCH_CONVERT, numrecs); + block->bb_numrecs = cpu_to_be16(numrecs); xfs_inobt_log_keys(cur, bp, ptr, numrecs); xfs_inobt_log_ptrs(cur, bp, ptr, numrecs); } else { @@ -702,7 +702,7 @@ xfs_inobt_insrec( */ rp[ptr - 1] = *recp; /* INT_: struct copy */ numrecs++; - INT_SET(block->bb_numrecs, ARCH_CONVERT, numrecs); + block->bb_numrecs = cpu_to_be16(numrecs); xfs_inobt_log_recs(cur, bp, ptr, numrecs); } /* @@ -857,8 +857,8 @@ xfs_inobt_lookup( xfs_agi_t *agi; /* a.g. inode header */ agi = XFS_BUF_TO_AGI(cur->bc_private.i.agbp); - agno = INT_GET(agi->agi_seqno, ARCH_CONVERT); - agbno = INT_GET(agi->agi_root, ARCH_CONVERT); + agno = be32_to_cpu(agi->agi_seqno); + agbno = be32_to_cpu(agi->agi_root); } /* * Iterate over each level in the btree, starting at the root. @@ -925,7 +925,7 @@ xfs_inobt_lookup( * Set low and high entry numbers, 1-based. */ low = 1; - if (!(high = INT_GET(block->bb_numrecs, ARCH_CONVERT))) { + if (!(high = be16_to_cpu(block->bb_numrecs))) { /* * If the block is empty, the tree must * be an empty leaf. @@ -992,7 +992,7 @@ xfs_inobt_lookup( */ if (diff > 0 && --keyno < 1) keyno = 1; - agbno = INT_GET(*XFS_INOBT_PTR_ADDR(block, keyno, cur), ARCH_CONVERT); + agbno = be32_to_cpu(*XFS_INOBT_PTR_ADDR(block, keyno, cur)); #ifdef DEBUG if ((error = xfs_btree_check_sptr(cur, agbno, level))) return error; @@ -1011,8 +1011,8 @@ xfs_inobt_lookup( * not the last block, we're in the wrong block. */ if (dir == XFS_LOOKUP_GE && - keyno > INT_GET(block->bb_numrecs, ARCH_CONVERT) && - INT_GET(block->bb_rightsib, ARCH_CONVERT) != NULLAGBLOCK) { + keyno > be16_to_cpu(block->bb_numrecs) && + be32_to_cpu(block->bb_rightsib) != NULLAGBLOCK) { int i; cur->bc_ptrs[0] = keyno; @@ -1029,7 +1029,7 @@ xfs_inobt_lookup( /* * Return if we succeeded or not. */ - if (keyno == 0 || keyno > INT_GET(block->bb_numrecs, ARCH_CONVERT)) + if (keyno == 0 || keyno > be16_to_cpu(block->bb_numrecs)) *stat = 0; else *stat = ((dir != XFS_LOOKUP_EQ) || (diff == 0)); @@ -1075,7 +1075,7 @@ xfs_inobt_lshift( /* * If we've got no left sibling then we can't shift an entry left. */ - if (INT_GET(right->bb_leftsib, ARCH_CONVERT) == NULLAGBLOCK) { + if (be32_to_cpu(right->bb_leftsib) == NULLAGBLOCK) { *stat = 0; return 0; } @@ -1091,8 +1091,8 @@ xfs_inobt_lshift( * Set up the left neighbor as "left". */ if ((error = xfs_btree_read_bufs(cur->bc_mp, cur->bc_tp, - cur->bc_private.i.agno, INT_GET(right->bb_leftsib, ARCH_CONVERT), 0, &lbp, - XFS_INO_BTREE_REF))) + cur->bc_private.i.agno, be32_to_cpu(right->bb_leftsib), + 0, &lbp, XFS_INO_BTREE_REF))) return error; left = XFS_BUF_TO_INOBT_BLOCK(lbp); if ((error = xfs_btree_check_sblock(cur, left, level, lbp))) @@ -1100,11 +1100,11 @@ xfs_inobt_lshift( /* * If it's full, it can't take another entry. */ - if (INT_GET(left->bb_numrecs, ARCH_CONVERT) == XFS_INOBT_BLOCK_MAXRECS(level, cur)) { + if (be16_to_cpu(left->bb_numrecs) == XFS_INOBT_BLOCK_MAXRECS(level, cur)) { *stat = 0; return 0; } - nrec = INT_GET(left->bb_numrecs, ARCH_CONVERT) + 1; + nrec = be16_to_cpu(left->bb_numrecs) + 1; /* * If non-leaf, copy a key and a ptr to the left block. */ @@ -1116,7 +1116,7 @@ xfs_inobt_lshift( lpp = XFS_INOBT_PTR_ADDR(left, nrec, cur); rpp = XFS_INOBT_PTR_ADDR(right, 1, cur); #ifdef DEBUG - if ((error = xfs_btree_check_sptr(cur, INT_GET(*rpp, ARCH_CONVERT), level))) + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(*rpp), level))) return error; #endif *lpp = *rpp; /* INT_: no-change copy */ @@ -1134,7 +1134,7 @@ xfs_inobt_lshift( /* * Bump and log left's numrecs, decrement and log right's numrecs. */ - INT_MOD(left->bb_numrecs, ARCH_CONVERT, +1); + be16_add(&left->bb_numrecs, 1); xfs_inobt_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS); #ifdef DEBUG if (level > 0) @@ -1142,26 +1142,26 @@ xfs_inobt_lshift( else xfs_btree_check_rec(cur->bc_btnum, lrp - 1, lrp); #endif - INT_MOD(right->bb_numrecs, ARCH_CONVERT, -1); + be16_add(&right->bb_numrecs, -1); xfs_inobt_log_block(cur->bc_tp, rbp, XFS_BB_NUMRECS); /* * Slide the contents of right down one entry. */ if (level > 0) { #ifdef DEBUG - for (i = 0; i < INT_GET(right->bb_numrecs, ARCH_CONVERT); i++) { - if ((error = xfs_btree_check_sptr(cur, INT_GET(rpp[i + 1], ARCH_CONVERT), + for (i = 0; i < be16_to_cpu(right->bb_numrecs); i++) { + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(rpp[i + 1]), level))) return error; } #endif - memmove(rkp, rkp + 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rkp)); - memmove(rpp, rpp + 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rpp)); - xfs_inobt_log_keys(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); - xfs_inobt_log_ptrs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); + memmove(rkp, rkp + 1, be16_to_cpu(right->bb_numrecs) * sizeof(*rkp)); + memmove(rpp, rpp + 1, be16_to_cpu(right->bb_numrecs) * sizeof(*rpp)); + xfs_inobt_log_keys(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); + xfs_inobt_log_ptrs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); } else { - memmove(rrp, rrp + 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rrp)); - xfs_inobt_log_recs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); + memmove(rrp, rrp + 1, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp)); + xfs_inobt_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); key.ir_startino = rrp->ir_startino; /* INT_: direct copy */ rkp = &key; } @@ -1213,7 +1213,7 @@ xfs_inobt_newroot( args.tp = cur->bc_tp; args.mp = cur->bc_mp; args.fsbno = XFS_AGB_TO_FSB(args.mp, cur->bc_private.i.agno, - INT_GET(agi->agi_root, ARCH_CONVERT)); + be32_to_cpu(agi->agi_root)); args.mod = args.minleft = args.alignment = args.total = args.wasdel = args.isfl = args.userdata = args.minalignslop = 0; args.minlen = args.maxlen = args.prod = 1; @@ -1233,8 +1233,8 @@ xfs_inobt_newroot( /* * Set the root data in the a.g. inode structure. */ - INT_SET(agi->agi_root, ARCH_CONVERT, args.agbno); - INT_MOD(agi->agi_level, ARCH_CONVERT, 1); + agi->agi_root = cpu_to_be32(args.agbno); + be32_add(&agi->agi_level, 1); xfs_ialloc_log_agi(args.tp, cur->bc_private.i.agbp, XFS_AGI_ROOT | XFS_AGI_LEVEL); /* @@ -1249,14 +1249,14 @@ xfs_inobt_newroot( if ((error = xfs_btree_check_sblock(cur, block, cur->bc_nlevels - 1, bp))) return error; #endif - if (INT_GET(block->bb_rightsib, ARCH_CONVERT) != NULLAGBLOCK) { + if (be32_to_cpu(block->bb_rightsib) != NULLAGBLOCK) { /* * Our block is left, pick up the right block. */ lbp = bp; lbno = XFS_DADDR_TO_AGBNO(args.mp, XFS_BUF_ADDR(lbp)); left = block; - rbno = INT_GET(left->bb_rightsib, ARCH_CONVERT); + rbno = be32_to_cpu(left->bb_rightsib); if ((error = xfs_btree_read_bufs(args.mp, args.tp, args.agno, rbno, 0, &rbp, XFS_INO_BTREE_REF))) return error; @@ -1273,7 +1273,7 @@ xfs_inobt_newroot( rbp = bp; rbno = XFS_DADDR_TO_AGBNO(args.mp, XFS_BUF_ADDR(rbp)); right = block; - lbno = INT_GET(right->bb_leftsib, ARCH_CONVERT); + lbno = be32_to_cpu(right->bb_leftsib); if ((error = xfs_btree_read_bufs(args.mp, args.tp, args.agno, lbno, 0, &lbp, XFS_INO_BTREE_REF))) return error; @@ -1287,18 +1287,18 @@ xfs_inobt_newroot( /* * Fill in the new block's btree header and log it. */ - INT_SET(new->bb_magic, ARCH_CONVERT, xfs_magics[cur->bc_btnum]); - INT_SET(new->bb_level, ARCH_CONVERT, (__uint16_t)cur->bc_nlevels); - INT_SET(new->bb_numrecs, ARCH_CONVERT, 2); - INT_SET(new->bb_leftsib, ARCH_CONVERT, NULLAGBLOCK); - INT_SET(new->bb_rightsib, ARCH_CONVERT, NULLAGBLOCK); + new->bb_magic = cpu_to_be32(xfs_magics[cur->bc_btnum]); + new->bb_level = cpu_to_be16(cur->bc_nlevels); + new->bb_numrecs = cpu_to_be16(2); + new->bb_leftsib = cpu_to_be32(NULLAGBLOCK); + new->bb_rightsib = cpu_to_be32(NULLAGBLOCK); xfs_inobt_log_block(args.tp, nbp, XFS_BB_ALL_BITS); ASSERT(lbno != NULLAGBLOCK && rbno != NULLAGBLOCK); /* * Fill in the key data in the new root. */ kp = XFS_INOBT_KEY_ADDR(new, 1, cur); - if (INT_GET(left->bb_level, ARCH_CONVERT) > 0) { + if (be16_to_cpu(left->bb_level) > 0) { kp[0] = *XFS_INOBT_KEY_ADDR(left, 1, cur); /* INT_: struct copy */ kp[1] = *XFS_INOBT_KEY_ADDR(right, 1, cur); /* INT_: struct copy */ } else { @@ -1312,8 +1312,8 @@ xfs_inobt_newroot( * Fill in the pointer data in the new root. */ pp = XFS_INOBT_PTR_ADDR(new, 1, cur); - INT_SET(pp[0], ARCH_CONVERT, lbno); - INT_SET(pp[1], ARCH_CONVERT, rbno); + pp[0] = cpu_to_be32(lbno); + pp[1] = cpu_to_be32(rbno); xfs_inobt_log_ptrs(cur, nbp, 1, 2); /* * Fix up the cursor. @@ -1362,7 +1362,7 @@ xfs_inobt_rshift( /* * If we've got no right sibling then we can't shift an entry right. */ - if (INT_GET(left->bb_rightsib, ARCH_CONVERT) == NULLAGBLOCK) { + if (be32_to_cpu(left->bb_rightsib) == NULLAGBLOCK) { *stat = 0; return 0; } @@ -1370,7 +1370,7 @@ xfs_inobt_rshift( * If the cursor entry is the one that would be moved, don't * do it... it's too complicated. */ - if (cur->bc_ptrs[level] >= INT_GET(left->bb_numrecs, ARCH_CONVERT)) { + if (cur->bc_ptrs[level] >= be16_to_cpu(left->bb_numrecs)) { *stat = 0; return 0; } @@ -1378,8 +1378,8 @@ xfs_inobt_rshift( * Set up the right neighbor as "right". */ if ((error = xfs_btree_read_bufs(cur->bc_mp, cur->bc_tp, - cur->bc_private.i.agno, INT_GET(left->bb_rightsib, ARCH_CONVERT), 0, &rbp, - XFS_INO_BTREE_REF))) + cur->bc_private.i.agno, be32_to_cpu(left->bb_rightsib), + 0, &rbp, XFS_INO_BTREE_REF))) return error; right = XFS_BUF_TO_INOBT_BLOCK(rbp); if ((error = xfs_btree_check_sblock(cur, right, level, rbp))) @@ -1387,7 +1387,7 @@ xfs_inobt_rshift( /* * If it's full, it can't take another entry. */ - if (INT_GET(right->bb_numrecs, ARCH_CONVERT) == XFS_INOBT_BLOCK_MAXRECS(level, cur)) { + if (be16_to_cpu(right->bb_numrecs) == XFS_INOBT_BLOCK_MAXRECS(level, cur)) { *stat = 0; return 0; } @@ -1396,41 +1396,41 @@ xfs_inobt_rshift( * copy the last left block entry to the hole. */ if (level > 0) { - lkp = XFS_INOBT_KEY_ADDR(left, INT_GET(left->bb_numrecs, ARCH_CONVERT), cur); - lpp = XFS_INOBT_PTR_ADDR(left, INT_GET(left->bb_numrecs, ARCH_CONVERT), cur); + lkp = XFS_INOBT_KEY_ADDR(left, be16_to_cpu(left->bb_numrecs), cur); + lpp = XFS_INOBT_PTR_ADDR(left, be16_to_cpu(left->bb_numrecs), cur); rkp = XFS_INOBT_KEY_ADDR(right, 1, cur); rpp = XFS_INOBT_PTR_ADDR(right, 1, cur); #ifdef DEBUG - for (i = INT_GET(right->bb_numrecs, ARCH_CONVERT) - 1; i >= 0; i--) { - if ((error = xfs_btree_check_sptr(cur, INT_GET(rpp[i], ARCH_CONVERT), level))) + for (i = be16_to_cpu(right->bb_numrecs) - 1; i >= 0; i--) { + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(rpp[i]), level))) return error; } #endif - memmove(rkp + 1, rkp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rkp)); - memmove(rpp + 1, rpp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rpp)); + memmove(rkp + 1, rkp, be16_to_cpu(right->bb_numrecs) * sizeof(*rkp)); + memmove(rpp + 1, rpp, be16_to_cpu(right->bb_numrecs) * sizeof(*rpp)); #ifdef DEBUG - if ((error = xfs_btree_check_sptr(cur, INT_GET(*lpp, ARCH_CONVERT), level))) + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(*lpp), level))) return error; #endif *rkp = *lkp; /* INT_: no change copy */ *rpp = *lpp; /* INT_: no change copy */ - xfs_inobt_log_keys(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1); - xfs_inobt_log_ptrs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1); + xfs_inobt_log_keys(cur, rbp, 1, be16_to_cpu(right->bb_numrecs) + 1); + xfs_inobt_log_ptrs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs) + 1); } else { - lrp = XFS_INOBT_REC_ADDR(left, INT_GET(left->bb_numrecs, ARCH_CONVERT), cur); + lrp = XFS_INOBT_REC_ADDR(left, be16_to_cpu(left->bb_numrecs), cur); rrp = XFS_INOBT_REC_ADDR(right, 1, cur); - memmove(rrp + 1, rrp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rrp)); + memmove(rrp + 1, rrp, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp)); *rrp = *lrp; - xfs_inobt_log_recs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1); + xfs_inobt_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs) + 1); key.ir_startino = rrp->ir_startino; /* INT_: direct copy */ rkp = &key; } /* * Decrement and log left's numrecs, bump and log right's numrecs. */ - INT_MOD(left->bb_numrecs, ARCH_CONVERT, -1); + be16_add(&left->bb_numrecs, -1); xfs_inobt_log_block(cur->bc_tp, lbp, XFS_BB_NUMRECS); - INT_MOD(right->bb_numrecs, ARCH_CONVERT, +1); + be16_add(&right->bb_numrecs, 1); #ifdef DEBUG if (level > 0) xfs_btree_check_key(cur->bc_btnum, rkp, rkp + 1); @@ -1522,17 +1522,17 @@ xfs_inobt_split( /* * Fill in the btree header for the new block. */ - INT_SET(right->bb_magic, ARCH_CONVERT, xfs_magics[cur->bc_btnum]); - right->bb_level = left->bb_level; /* INT_: direct copy */ - INT_SET(right->bb_numrecs, ARCH_CONVERT, (__uint16_t)(INT_GET(left->bb_numrecs, ARCH_CONVERT) / 2)); + right->bb_magic = cpu_to_be32(xfs_magics[cur->bc_btnum]); + right->bb_level = left->bb_level; + right->bb_numrecs = cpu_to_be16(be16_to_cpu(left->bb_numrecs) / 2); /* * Make sure that if there's an odd number of entries now, that * each new block will have the same number of entries. */ - if ((INT_GET(left->bb_numrecs, ARCH_CONVERT) & 1) && - cur->bc_ptrs[level] <= INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1) - INT_MOD(right->bb_numrecs, ARCH_CONVERT, +1); - i = INT_GET(left->bb_numrecs, ARCH_CONVERT) - INT_GET(right->bb_numrecs, ARCH_CONVERT) + 1; + if ((be16_to_cpu(left->bb_numrecs) & 1) && + cur->bc_ptrs[level] <= be16_to_cpu(right->bb_numrecs) + 1) + be16_add(&right->bb_numrecs, 1); + i = be16_to_cpu(left->bb_numrecs) - be16_to_cpu(right->bb_numrecs) + 1; /* * For non-leaf blocks, copy keys and addresses over to the new block. */ @@ -1542,15 +1542,15 @@ xfs_inobt_split( rkp = XFS_INOBT_KEY_ADDR(right, 1, cur); rpp = XFS_INOBT_PTR_ADDR(right, 1, cur); #ifdef DEBUG - for (i = 0; i < INT_GET(right->bb_numrecs, ARCH_CONVERT); i++) { - if ((error = xfs_btree_check_sptr(cur, INT_GET(lpp[i], ARCH_CONVERT), level))) + for (i = 0; i < be16_to_cpu(right->bb_numrecs); i++) { + if ((error = xfs_btree_check_sptr(cur, be32_to_cpu(lpp[i]), level))) return error; } #endif - memcpy(rkp, lkp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rkp)); - memcpy(rpp, lpp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rpp)); - xfs_inobt_log_keys(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); - xfs_inobt_log_ptrs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); + memcpy(rkp, lkp, be16_to_cpu(right->bb_numrecs) * sizeof(*rkp)); + memcpy(rpp, lpp, be16_to_cpu(right->bb_numrecs) * sizeof(*rpp)); + xfs_inobt_log_keys(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); + xfs_inobt_log_ptrs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); *keyp = *rkp; } /* @@ -1559,36 +1559,36 @@ xfs_inobt_split( else { lrp = XFS_INOBT_REC_ADDR(left, i, cur); rrp = XFS_INOBT_REC_ADDR(right, 1, cur); - memcpy(rrp, lrp, INT_GET(right->bb_numrecs, ARCH_CONVERT) * sizeof(*rrp)); - xfs_inobt_log_recs(cur, rbp, 1, INT_GET(right->bb_numrecs, ARCH_CONVERT)); + memcpy(rrp, lrp, be16_to_cpu(right->bb_numrecs) * sizeof(*rrp)); + xfs_inobt_log_recs(cur, rbp, 1, be16_to_cpu(right->bb_numrecs)); keyp->ir_startino = rrp->ir_startino; /* INT_: direct copy */ } /* * Find the left block number by looking in the buffer. * Adjust numrecs, sibling pointers. */ - INT_MOD(left->bb_numrecs, ARCH_CONVERT, -(INT_GET(right->bb_numrecs, ARCH_CONVERT))); - right->bb_rightsib = left->bb_rightsib; /* INT_: direct copy */ - INT_SET(left->bb_rightsib, ARCH_CONVERT, args.agbno); - INT_SET(right->bb_leftsib, ARCH_CONVERT, lbno); + be16_add(&left->bb_numrecs, -(be16_to_cpu(right->bb_numrecs))); + right->bb_rightsib = left->bb_rightsib; + left->bb_rightsib = cpu_to_be32(args.agbno); + right->bb_leftsib = cpu_to_be32(lbno); xfs_inobt_log_block(args.tp, rbp, XFS_BB_ALL_BITS); xfs_inobt_log_block(args.tp, lbp, XFS_BB_NUMRECS | XFS_BB_RIGHTSIB); /* * If there's a block to the new block's right, make that block * point back to right instead of to left. */ - if (INT_GET(right->bb_rightsib, ARCH_CONVERT) != NULLAGBLOCK) { + if (be32_to_cpu(right->bb_rightsib) != NULLAGBLOCK) { xfs_inobt_block_t *rrblock; /* rr btree block */ xfs_buf_t *rrbp; /* buffer for rrblock */ if ((error = xfs_btree_read_bufs(args.mp, args.tp, args.agno, - INT_GET(right->bb_rightsib, ARCH_CONVERT), 0, &rrbp, + be32_to_cpu(right->bb_rightsib), 0, &rrbp, XFS_INO_BTREE_REF))) return error; rrblock = XFS_BUF_TO_INOBT_BLOCK(rrbp); if ((error = xfs_btree_check_sblock(cur, rrblock, level, rrbp))) return error; - INT_SET(rrblock->bb_leftsib, ARCH_CONVERT, args.agbno); + rrblock->bb_leftsib = cpu_to_be32(args.agbno); xfs_inobt_log_block(args.tp, rrbp, XFS_BB_LEFTSIB); } /* @@ -1596,9 +1596,9 @@ xfs_inobt_split( * If it's just pointing past the last entry in left, then we'll * insert there, so don't change anything in that case. */ - if (cur->bc_ptrs[level] > INT_GET(left->bb_numrecs, ARCH_CONVERT) + 1) { + if (cur->bc_ptrs[level] > be16_to_cpu(left->bb_numrecs) + 1) { xfs_btree_setbuf(cur, level, rbp); - cur->bc_ptrs[level] -= INT_GET(left->bb_numrecs, ARCH_CONVERT); + cur->bc_ptrs[level] -= be16_to_cpu(left->bb_numrecs); } /* * If there are more levels, we'll need another cursor which refers @@ -1696,7 +1696,7 @@ xfs_inobt_decrement( /* * If we just went off the left edge of the tree, return failure. */ - if (INT_GET(block->bb_leftsib, ARCH_CONVERT) == NULLAGBLOCK) { + if (be32_to_cpu(block->bb_leftsib) == NULLAGBLOCK) { *stat = 0; return 0; } @@ -1725,7 +1725,7 @@ xfs_inobt_decrement( xfs_agblock_t agbno; /* block number of btree block */ xfs_buf_t *bp; /* buffer containing btree block */ - agbno = INT_GET(*XFS_INOBT_PTR_ADDR(block, cur->bc_ptrs[lev], cur), ARCH_CONVERT); + agbno = be32_to_cpu(*XFS_INOBT_PTR_ADDR(block, cur->bc_ptrs[lev], cur)); if ((error = xfs_btree_read_bufs(cur->bc_mp, cur->bc_tp, cur->bc_private.i.agno, agbno, 0, &bp, XFS_INO_BTREE_REF))) @@ -1735,7 +1735,7 @@ xfs_inobt_decrement( block = XFS_BUF_TO_INOBT_BLOCK(bp); if ((error = xfs_btree_check_sblock(cur, block, lev, bp))) return error; - cur->bc_ptrs[lev] = INT_GET(block->bb_numrecs, ARCH_CONVERT); + cur->bc_ptrs[lev] = be16_to_cpu(block->bb_numrecs); } *stat = 1; return 0; @@ -1807,7 +1807,7 @@ xfs_inobt_get_rec( /* * Off the right end or left end, return failure. */ - if (ptr > INT_GET(block->bb_numrecs, ARCH_CONVERT) || ptr <= 0) { + if (ptr > be16_to_cpu(block->bb_numrecs) || ptr <= 0) { *stat = 0; return 0; } @@ -1855,14 +1855,14 @@ xfs_inobt_increment( * Increment the ptr at this level. If we're still in the block * then we're done. */ - if (++cur->bc_ptrs[level] <= INT_GET(block->bb_numrecs, ARCH_CONVERT)) { + if (++cur->bc_ptrs[level] <= be16_to_cpu(block->bb_numrecs)) { *stat = 1; return 0; } /* * If we just went off the right edge of the tree, return failure. */ - if (INT_GET(block->bb_rightsib, ARCH_CONVERT) == NULLAGBLOCK) { + if (be32_to_cpu(block->bb_rightsib) == NULLAGBLOCK) { *stat = 0; return 0; } @@ -1877,7 +1877,7 @@ xfs_inobt_increment( if ((error = xfs_btree_check_sblock(cur, block, lev, bp))) return error; #endif - if (++cur->bc_ptrs[lev] <= INT_GET(block->bb_numrecs, ARCH_CONVERT)) + if (++cur->bc_ptrs[lev] <= be16_to_cpu(block->bb_numrecs)) break; /* * Read-ahead the right block, we're going to read it @@ -1897,7 +1897,7 @@ xfs_inobt_increment( lev > level; ) { xfs_agblock_t agbno; /* block number of btree block */ - agbno = INT_GET(*XFS_INOBT_PTR_ADDR(block, cur->bc_ptrs[lev], cur), ARCH_CONVERT); + agbno = be32_to_cpu(*XFS_INOBT_PTR_ADDR(block, cur->bc_ptrs[lev], cur)); if ((error = xfs_btree_read_bufs(cur->bc_mp, cur->bc_tp, cur->bc_private.i.agno, agbno, 0, &bp, XFS_INO_BTREE_REF))) diff --git a/fs/xfs/xfs_ialloc_btree.h b/fs/xfs/xfs_ialloc_btree.h index 86ed749d4cc..ae3904cb1ee 100644 --- a/fs/xfs/xfs_ialloc_btree.h +++ b/fs/xfs/xfs_ialloc_btree.h @@ -62,8 +62,10 @@ typedef struct xfs_inobt_key xfs_agino_t ir_startino; /* starting inode number */ } xfs_inobt_key_t; -typedef xfs_agblock_t xfs_inobt_ptr_t; /* btree pointer type */ - /* btree block header type */ +/* btree pointer type */ +typedef __be32 xfs_inobt_ptr_t; + +/* btree block header type */ typedef struct xfs_btree_sblock xfs_inobt_block_t; #define XFS_BUF_TO_INOBT_BLOCK(bp) ((xfs_inobt_block_t *)XFS_BUF_PTR(bp)) @@ -86,7 +88,7 @@ typedef struct xfs_btree_sblock xfs_inobt_block_t; #define XFS_INOBT_BLOCK_MAXRECS(lev,cur) ((cur)->bc_mp->m_inobt_mxr[lev != 0]) #define XFS_INOBT_BLOCK_MINRECS(lev,cur) ((cur)->bc_mp->m_inobt_mnr[lev != 0]) #define XFS_INOBT_IS_LAST_REC(cur) \ - ((cur)->bc_ptrs[0] == INT_GET(XFS_BUF_TO_INOBT_BLOCK((cur)->bc_bufs[0])->bb_numrecs, ARCH_CONVERT)) + ((cur)->bc_ptrs[0] == be16_to_cpu(XFS_BUF_TO_INOBT_BLOCK((cur)->bc_bufs[0])->bb_numrecs)) /* * Maximum number of inode btree levels. diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 281cbd45b3d..df0d4572d70 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -1864,8 +1864,8 @@ xfs_iunlink( */ agi = XFS_BUF_TO_AGI(agibp); agi_ok = - INT_GET(agi->agi_magicnum, ARCH_CONVERT) == XFS_AGI_MAGIC && - XFS_AGI_GOOD_VERSION(INT_GET(agi->agi_versionnum, ARCH_CONVERT)); + be32_to_cpu(agi->agi_magicnum) == XFS_AGI_MAGIC && + XFS_AGI_GOOD_VERSION(be32_to_cpu(agi->agi_versionnum)); if (unlikely(XFS_TEST_ERROR(!agi_ok, mp, XFS_ERRTAG_IUNLINK, XFS_RANDOM_IUNLINK))) { XFS_CORRUPTION_ERROR("xfs_iunlink", XFS_ERRLEVEL_LOW, mp, agi); @@ -1880,9 +1880,9 @@ xfs_iunlink( ASSERT(agino != 0); bucket_index = agino % XFS_AGI_UNLINKED_BUCKETS; ASSERT(agi->agi_unlinked[bucket_index]); - ASSERT(INT_GET(agi->agi_unlinked[bucket_index], ARCH_CONVERT) != agino); + ASSERT(be32_to_cpu(agi->agi_unlinked[bucket_index]) != agino); - if (INT_GET(agi->agi_unlinked[bucket_index], ARCH_CONVERT) != NULLAGINO) { + if (be32_to_cpu(agi->agi_unlinked[bucket_index]) != NULLAGINO) { /* * There is already another inode in the bucket we need * to add ourselves to. Add us at the front of the list. @@ -1909,7 +1909,7 @@ xfs_iunlink( * Point the bucket head pointer at the inode being inserted. */ ASSERT(agino != 0); - INT_SET(agi->agi_unlinked[bucket_index], ARCH_CONVERT, agino); + agi->agi_unlinked[bucket_index] = cpu_to_be32(agino); offset = offsetof(xfs_agi_t, agi_unlinked) + (sizeof(xfs_agino_t) * bucket_index); xfs_trans_log_buf(tp, agibp, offset, @@ -1967,8 +1967,8 @@ xfs_iunlink_remove( */ agi = XFS_BUF_TO_AGI(agibp); agi_ok = - INT_GET(agi->agi_magicnum, ARCH_CONVERT) == XFS_AGI_MAGIC && - XFS_AGI_GOOD_VERSION(INT_GET(agi->agi_versionnum, ARCH_CONVERT)); + be32_to_cpu(agi->agi_magicnum) == XFS_AGI_MAGIC && + XFS_AGI_GOOD_VERSION(be32_to_cpu(agi->agi_versionnum)); if (unlikely(XFS_TEST_ERROR(!agi_ok, mp, XFS_ERRTAG_IUNLINK_REMOVE, XFS_RANDOM_IUNLINK_REMOVE))) { XFS_CORRUPTION_ERROR("xfs_iunlink_remove", XFS_ERRLEVEL_LOW, @@ -1986,10 +1986,10 @@ xfs_iunlink_remove( agino = XFS_INO_TO_AGINO(mp, ip->i_ino); ASSERT(agino != 0); bucket_index = agino % XFS_AGI_UNLINKED_BUCKETS; - ASSERT(INT_GET(agi->agi_unlinked[bucket_index], ARCH_CONVERT) != NULLAGINO); + ASSERT(be32_to_cpu(agi->agi_unlinked[bucket_index]) != NULLAGINO); ASSERT(agi->agi_unlinked[bucket_index]); - if (INT_GET(agi->agi_unlinked[bucket_index], ARCH_CONVERT) == agino) { + if (be32_to_cpu(agi->agi_unlinked[bucket_index]) == agino) { /* * We're at the head of the list. Get the inode's * on-disk buffer to see if there is anyone after us @@ -2023,7 +2023,7 @@ xfs_iunlink_remove( */ ASSERT(next_agino != 0); ASSERT(next_agino != agino); - INT_SET(agi->agi_unlinked[bucket_index], ARCH_CONVERT, next_agino); + agi->agi_unlinked[bucket_index] = cpu_to_be32(next_agino); offset = offsetof(xfs_agi_t, agi_unlinked) + (sizeof(xfs_agino_t) * bucket_index); xfs_trans_log_buf(tp, agibp, offset, @@ -2032,7 +2032,7 @@ xfs_iunlink_remove( /* * We need to search the list for the inode being freed. */ - next_agino = INT_GET(agi->agi_unlinked[bucket_index], ARCH_CONVERT); + next_agino = be32_to_cpu(agi->agi_unlinked[bucket_index]); last_ibp = NULL; while (next_agino != agino) { /* diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index a4d186d2db4..f63646ead81 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c @@ -448,7 +448,7 @@ xfs_bulkstat( while (error) { agino += XFS_INODES_PER_CHUNK; if (XFS_AGINO_TO_AGBNO(mp, agino) >= - INT_GET(agi->agi_length, ARCH_CONVERT)) + be32_to_cpu(agi->agi_length)) break; error = xfs_inobt_lookup_ge(cur, agino, 0, 0, &tmp); diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 63268984762..8ab7df76806 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -3160,13 +3160,12 @@ xlog_recover_clear_agi_bucket( } agi = XFS_BUF_TO_AGI(agibp); - if (INT_GET(agi->agi_magicnum, ARCH_CONVERT) != XFS_AGI_MAGIC) { + if (be32_to_cpu(agi->agi_magicnum) != XFS_AGI_MAGIC) { xfs_trans_cancel(tp, XFS_TRANS_ABORT); return; } - ASSERT(INT_GET(agi->agi_magicnum, ARCH_CONVERT) == XFS_AGI_MAGIC); - INT_SET(agi->agi_unlinked[bucket], ARCH_CONVERT, NULLAGINO); + agi->agi_unlinked[bucket] = cpu_to_be32(NULLAGINO); offset = offsetof(xfs_agi_t, agi_unlinked) + (sizeof(xfs_agino_t) * bucket); xfs_trans_log_buf(tp, agibp, offset, @@ -3225,12 +3224,11 @@ xlog_recover_process_iunlinks( XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp))); } agi = XFS_BUF_TO_AGI(agibp); - ASSERT(XFS_AGI_MAGIC == - INT_GET(agi->agi_magicnum, ARCH_CONVERT)); + ASSERT(XFS_AGI_MAGIC == be32_to_cpu(agi->agi_magicnum)); for (bucket = 0; bucket < XFS_AGI_UNLINKED_BUCKETS; bucket++) { - agino = INT_GET(agi->agi_unlinked[bucket], ARCH_CONVERT); + agino = be32_to_cpu(agi->agi_unlinked[bucket]); while (agino != NULLAGINO) { /* @@ -3318,8 +3316,8 @@ xlog_recover_process_iunlinks( XFS_AGI_DADDR(mp))); } agi = XFS_BUF_TO_AGI(agibp); - ASSERT(XFS_AGI_MAGIC == INT_GET( - agi->agi_magicnum, ARCH_CONVERT)); + ASSERT(XFS_AGI_MAGIC == be32_to_cpu( + agi->agi_magicnum)); } } @@ -4022,14 +4020,12 @@ xlog_recover_check_summary( mp, agfbp, agfdaddr); } agfp = XFS_BUF_TO_AGF(agfbp); - ASSERT(XFS_AGF_MAGIC == - INT_GET(agfp->agf_magicnum, ARCH_CONVERT)); - ASSERT(XFS_AGF_GOOD_VERSION( - INT_GET(agfp->agf_versionnum, ARCH_CONVERT))); - ASSERT(INT_GET(agfp->agf_seqno, ARCH_CONVERT) == agno); - - freeblks += INT_GET(agfp->agf_freeblks, ARCH_CONVERT) + - INT_GET(agfp->agf_flcount, ARCH_CONVERT); + ASSERT(XFS_AGF_MAGIC == be32_to_cpu(agfp->agf_magicnum)); + ASSERT(XFS_AGF_GOOD_VERSION(be32_to_cpu(agfp->agf_versionnum))); + ASSERT(be32_to_cpu(agfp->agf_seqno) == agno); + + freeblks += be32_to_cpu(agfp->agf_freeblks) + + be32_to_cpu(agfp->agf_flcount); xfs_buf_relse(agfbp); agidaddr = XFS_AG_DADDR(mp, agno, XFS_AGI_DADDR(mp)); @@ -4040,14 +4036,12 @@ xlog_recover_check_summary( mp, agibp, agidaddr); } agip = XFS_BUF_TO_AGI(agibp); - ASSERT(XFS_AGI_MAGIC == - INT_GET(agip->agi_magicnum, ARCH_CONVERT)); - ASSERT(XFS_AGI_GOOD_VERSION( - INT_GET(agip->agi_versionnum, ARCH_CONVERT))); - ASSERT(INT_GET(agip->agi_seqno, ARCH_CONVERT) == agno); - - itotal += INT_GET(agip->agi_count, ARCH_CONVERT); - ifree += INT_GET(agip->agi_freecount, ARCH_CONVERT); + ASSERT(XFS_AGI_MAGIC == be32_to_cpu(agip->agi_magicnum)); + ASSERT(XFS_AGI_GOOD_VERSION(be32_to_cpu(agip->agi_versionnum))); + ASSERT(be32_to_cpu(agip->agi_seqno) == agno); + + itotal += be32_to_cpu(agip->agi_count); + ifree += be32_to_cpu(agip->agi_freecount); xfs_buf_relse(agibp); } -- cgit v1.2.3-70-g09d2