]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Sync up user/kernel libxfs and headers
authorNathan Scott <nathans@sgi.com>
Fri, 30 Apr 2004 03:16:43 +0000 (03:16 +0000)
committerNathan Scott <nathans@sgi.com>
Fri, 30 Apr 2004 03:16:43 +0000 (03:16 +0000)
include/xfs_ag.h
include/xfs_attr_leaf.h
include/xfs_log_priv.h
include/xfs_mount.h
include/xfs_quota.h
include/xfs_types.h
libxfs/xfs_alloc.c
libxlog/xfs_log_recover.c

index f47e13e3934c577f6a1a62efb56ca19f3cf9e249..96b70f7fba397ba4d035767c4980934e9b50fa5a 100644 (file)
@@ -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
index af0ecf5b35dbdfea4aaca97b0722ac05f58f2f64..97bac75c6064a06e7549a67ab884d7651146ba29 100644 (file)
@@ -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
index c8b55ce4021a118e3b60abcd94bfcdeefaa55573..052de386e9c12b2655cf77063afa91dc7ead74b0 100644 (file)
@@ -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
index 50501d09ddf5f65d5ee37fa0a428b0e313bded8a..ea86fbaffd407a945dc8babb39af8ad9336abc51 100644 (file)
@@ -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);
index d7041e5ac2372aa6a4ff1f908d50f7e0f465dd4f..8cddc16397de2c060104f4a43a8d7586c3d8848f 100644 (file)
@@ -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__ */
index 8a4b6a85b23eae08d2e13ff22317d5086d6814c9..8d6aac75047cc4edba8f5ba71267a7f889870647 100644 (file)
@@ -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 */
index 518be124f799a4ff38137c7faacd0b1e50cbefd8..c77f137c62c13589cefa89a5dd2565584f57b937 100644 (file)
@@ -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
        /*
index e7de0e88b4b4591bedebcd18d23852931c39cd42..18bd478e2c746d71d8dd728c733aaebf22e1f5bf 100644 (file)
@@ -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);