From: Nathan Scott Date: Fri, 30 Apr 2004 03:16:43 +0000 (+0000) Subject: Sync up user/kernel libxfs and headers X-Git-Tag: v2.7.0~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0e364f6dbf6baf78629f28682177da6fc06bd94;p=thirdparty%2Fxfsprogs-dev.git Sync up user/kernel libxfs and headers --- diff --git a/include/xfs_ag.h b/include/xfs_ag.h index f47e13e39..96b70f7fb 100644 --- a/include/xfs_ag.h +++ b/include/xfs_ag.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003 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 diff --git a/include/xfs_attr_leaf.h b/include/xfs_attr_leaf.h index af0ecf5b3..97bac75c6 100644 --- a/include/xfs_attr_leaf.h +++ b/include/xfs_attr_leaf.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2002-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000, 2002-2003 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 diff --git a/include/xfs_log_priv.h b/include/xfs_log_priv.h index c8b55ce40..052de386e 100644 --- a/include/xfs_log_priv.h +++ b/include/xfs_log_priv.h @@ -57,12 +57,9 @@ struct xfs_mount; #define XLOG_RECORD_BSHIFT 14 /* 16384 == 1 << 14 */ #define XLOG_BIG_RECORD_BSHIFT 15 /* 32k == 1 << 15 */ #define XLOG_MAX_RECORD_BSHIFT 18 /* 256k == 1 << 18 */ -#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XLOG_BTOLRBB) -int xlog_btolrbb(int b); -#define XLOG_BTOLRBB(b) xlog_btolrbb(b) -#else -#define XLOG_BTOLRBB(b) (((b)+XLOG_RECORD_BSIZE-1) >> XLOG_RECORD_BSHIFT) -#endif +#define XLOG_BTOLSUNIT(log, b) (((b)+(log)->l_mp->m_sb.sb_logsunit-1) / \ + (log)->l_mp->m_sb.sb_logsunit) +#define XLOG_LSUNITTOB(log, su) ((su) * (log)->l_mp->m_sb.sb_logsunit) #define XLOG_HEADER_SIZE 512 @@ -531,7 +528,6 @@ typedef struct log { uint l_flags; uint l_quotaoffs_flag; /* XFS_DQ_*, for QUOTAOFFs */ struct xfs_buf_cancel **l_buf_cancel_table; - int l_stripemask; /* log stripe mask */ int l_iclog_hsize; /* size of iclog header */ int l_iclog_heads; /* # of iclog header sectors */ uint l_sectbb_log; /* log2 of sector size in BBs */ @@ -558,6 +554,7 @@ extern void xlog_put_bp(struct xfs_buf *); extern int xlog_bread(xlog_t *, xfs_daddr_t, int, struct xfs_buf *); extern xfs_caddr_t xlog_align(xlog_t *, xfs_daddr_t, int, struct xfs_buf *); +/* iclog tracing */ #define XLOG_TRACE_GRAB_FLUSH 1 #define XLOG_TRACE_REL_FLUSH 2 #define XLOG_TRACE_SLEEP_FLUSH 3 diff --git a/include/xfs_mount.h b/include/xfs_mount.h index 50501d09d..ea86fbaff 100644 --- a/include/xfs_mount.h +++ b/include/xfs_mount.h @@ -571,8 +571,8 @@ extern void xfs_check_frozen(xfs_mount_t *, bhv_desc_t *, int); extern struct vfsops xfs_vfsops; extern struct vnodeops xfs_vnodeops; -extern struct xfs_dmops xfs_dmcore_xfs; -extern struct xfs_qmops xfs_qmcore_xfs; +extern struct xfs_dmops xfs_dmcore_stub; +extern struct xfs_qmops xfs_qmcore_stub; extern struct xfs_ioops xfs_iocore_xfs; extern int xfs_init(void); diff --git a/include/xfs_quota.h b/include/xfs_quota.h index d7041e5ac..8cddc1639 100644 --- a/include/xfs_quota.h +++ b/include/xfs_quota.h @@ -347,9 +347,6 @@ extern int xfs_qm_dqcheck(xfs_disk_dquot_t *, xfs_dqid_t, uint, uint, char *); extern struct bhv_vfsops xfs_qmops; -extern void xfs_qm_init(void); -extern void xfs_qm_exit(void); - #endif /* __KERNEL__ */ #endif /* __XFS_QUOTA_H__ */ diff --git a/include/xfs_types.h b/include/xfs_types.h index 8a4b6a85b..8d6aac750 100644 --- a/include/xfs_types.h +++ b/include/xfs_types.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2003 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 @@ -75,24 +75,6 @@ typedef __uint64_t __psunsigned_t; #error BITS_PER_LONG must be 32 or 64 #endif -/* - * Some types are conditional depending on the target system. - * XFS_BIG_BLKNOS needs block layer disk addresses to be 64 bits. - * XFS_BIG_INUMS needs the VFS inode number to be 64 bits, as well - * as requiring XFS_BIG_BLKNOS to be set. - */ -#if defined(CONFIG_LBD) || (defined(HAVE_SECTOR_T) && (BITS_PER_LONG == 64)) -# define XFS_BIG_BLKNOS 1 -# if BITS_PER_LONG == 64 -# define XFS_BIG_INUMS 1 -# else -# define XFS_BIG_INUMS 0 -# endif -#else -# define XFS_BIG_BLKNOS 0 -# define XFS_BIG_INUMS 0 -#endif - #endif /* __KERNEL__ */ typedef __uint32_t xfs_agblock_t; /* blockno in alloc. group */ diff --git a/libxfs/xfs_alloc.c b/libxfs/xfs_alloc.c index 518be124f..c77f137c6 100644 --- a/libxfs/xfs_alloc.c +++ b/libxfs/xfs_alloc.c @@ -687,14 +687,8 @@ xfs_alloc_ag_vextent_near( /* * Randomly don't execute the first algorithm. */ - static int seed; /* randomizing seed value */ int dofirst; /* set to do first algorithm */ - timespec_t now; /* current time */ - if (!seed) { - nanotime(&now); - seed = (int)now.tv_sec ^ (int)now.tv_nsec; - } dofirst = random() & 1; #endif /* diff --git a/libxlog/xfs_log_recover.c b/libxlog/xfs_log_recover.c index e7de0e88b..18bd478e2 100644 --- a/libxlog/xfs_log_recover.c +++ b/libxlog/xfs_log_recover.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 2000-2004 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 @@ -1193,7 +1193,7 @@ xlog_valid_rec_header( xlog_rec_header_t *rhead, xfs_daddr_t blkno) { - int bblks; + int hlen; if (unlikely( (INT_GET(rhead->h_magicno, ARCH_CONVERT) != @@ -1212,8 +1212,8 @@ xlog_valid_rec_header( } /* LR body must have data or it wouldn't have been written */ - bblks = INT_GET(rhead->h_len, ARCH_CONVERT); - if (unlikely( bblks <= 0 || bblks > INT_MAX )) { + hlen = INT_GET(rhead->h_len, ARCH_CONVERT); + if (unlikely( hlen <= 0 || hlen > INT_MAX )) { XFS_ERROR_REPORT("xlog_valid_rec_header(2)", XFS_ERRLEVEL_LOW, log->l_mp); return XFS_ERROR(EFSCORRUPTED); @@ -1375,7 +1375,7 @@ xlog_do_recovery_pass( error = xlog_bread(log, 0, wrapped_hblks, hbp); if (error) goto bread_err2; - XFS_BUF_SET_PTR(hbp, bufaddr, hblks); + XFS_BUF_SET_PTR(hbp, bufaddr, BBTOB(hblks)); if (!offset) offset = xlog_align(log, 0, wrapped_hblks, hbp); @@ -1433,8 +1433,7 @@ xlog_do_recovery_pass( if ((error = xlog_bread(log, wrapped_hblks, bblks - split_bblks, dbp))) goto bread_err2; - XFS_BUF_SET_PTR(dbp, bufaddr, - XLOG_BIG_RECORD_BSIZE); + XFS_BUF_SET_PTR(dbp, bufaddr, h_size); if (!offset) offset = xlog_align(log, wrapped_hblks, bblks - split_bblks, dbp);