aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@sandeen.net>2006-09-27 21:02:57 -0400
committerTim Shimmin <tes@sgi.com>2006-09-27 21:02:57 -0400
commit3f89243c5b987dd55f8eec6fd54be05887d69bc6 (patch)
treea642932049eadf9c9eb94bd16f3b1594c11a466b /fs/xfs
parent065d312e15902976d256ddaf396a7950ec0350a8 (diff)
[XFS] Remove several macros that are no longer used anywhere
SGI-PV: 955302 SGI-Modid: xfs-linux-melb:xfs-kern:26749a Signed-off-by: Eric Sandeen <sandeen@sandeen.net> Signed-off-by: Nathan Scott <nathans@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.h2
-rw-r--r--fs/xfs/linux-2.6/xfs_linux.h7
-rw-r--r--fs/xfs/quota/xfs_qm.h6
-rw-r--r--fs/xfs/quota/xfs_quota_priv.h2
-rw-r--r--fs/xfs/xfs_error.h8
-rw-r--r--fs/xfs/xfs_fs.h8
-rw-r--r--fs/xfs/xfs_log.h8
-rw-r--r--fs/xfs/xfs_log_priv.h4
-rw-r--r--fs/xfs/xfs_quota.h2
-rw-r--r--fs/xfs/xfs_sb.h22
10 files changed, 1 insertions, 68 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h
index 2afc6d4a9ee1..9dd235cb0107 100644
--- a/fs/xfs/linux-2.6/xfs_buf.h
+++ b/fs/xfs/linux-2.6/xfs_buf.h
@@ -388,8 +388,6 @@ static inline int XFS_bwrite(xfs_buf_t *bp)
388 return error; 388 return error;
389} 389}
390 390
391#define XFS_bdwrite(bp) xfs_buf_iostart(bp, XBF_DELWRI | XBF_ASYNC)
392
393static inline int xfs_bdwrite(void *mp, xfs_buf_t *bp) 391static inline int xfs_bdwrite(void *mp, xfs_buf_t *bp)
394{ 392{
395 bp->b_strat = xfs_bdstrat_cb; 393 bp->b_strat = xfs_bdstrat_cb;
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h
index a13f75c1a936..14d840208e81 100644
--- a/fs/xfs/linux-2.6/xfs_linux.h
+++ b/fs/xfs/linux-2.6/xfs_linux.h
@@ -148,11 +148,7 @@ BUFFER_FNS(PrivateStart, unwritten);
148 (current->flags = ((current->flags & ~(f)) | (*(sp) & (f)))) 148 (current->flags = ((current->flags & ~(f)) | (*(sp) & (f))))
149 149
150#define NBPP PAGE_SIZE 150#define NBPP PAGE_SIZE
151#define DPPSHFT (PAGE_SHIFT - 9)
152#define NDPP (1 << (PAGE_SHIFT - 9)) 151#define NDPP (1 << (PAGE_SHIFT - 9))
153#define dtop(DD) (((DD) + NDPP - 1) >> DPPSHFT)
154#define dtopt(DD) ((DD) >> DPPSHFT)
155#define dpoff(DD) ((DD) & (NDPP-1))
156 152
157#define NBBY 8 /* number of bits per byte */ 153#define NBBY 8 /* number of bits per byte */
158#define NBPC PAGE_SIZE /* Number of bytes per click */ 154#define NBPC PAGE_SIZE /* Number of bytes per click */
@@ -172,8 +168,6 @@ BUFFER_FNS(PrivateStart, unwritten);
172#define btoct(x) ((__psunsigned_t)(x)>>BPCSHIFT) 168#define btoct(x) ((__psunsigned_t)(x)>>BPCSHIFT)
173#define btoc64(x) (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT) 169#define btoc64(x) (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT)
174#define btoct64(x) ((__uint64_t)(x)>>BPCSHIFT) 170#define btoct64(x) ((__uint64_t)(x)>>BPCSHIFT)
175#define io_btoc(x) (((__psunsigned_t)(x)+(IO_NBPC-1))>>IO_BPCSHIFT)
176#define io_btoct(x) ((__psunsigned_t)(x)>>IO_BPCSHIFT)
177 171
178/* off_t bytes to clicks */ 172/* off_t bytes to clicks */
179#define offtoc(x) (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT) 173#define offtoc(x) (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT)
@@ -186,7 +180,6 @@ BUFFER_FNS(PrivateStart, unwritten);
186#define ctob(x) ((__psunsigned_t)(x)<<BPCSHIFT) 180#define ctob(x) ((__psunsigned_t)(x)<<BPCSHIFT)
187#define btoct(x) ((__psunsigned_t)(x)>>BPCSHIFT) 181#define btoct(x) ((__psunsigned_t)(x)>>BPCSHIFT)
188#define ctob64(x) ((__uint64_t)(x)<<BPCSHIFT) 182#define ctob64(x) ((__uint64_t)(x)<<BPCSHIFT)
189#define io_ctob(x) ((__psunsigned_t)(x)<<IO_BPCSHIFT)
190 183
191/* bytes to clicks */ 184/* bytes to clicks */
192#define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT) 185#define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT)
diff --git a/fs/xfs/quota/xfs_qm.h b/fs/xfs/quota/xfs_qm.h
index 4568deb6da86..689407de0a20 100644
--- a/fs/xfs/quota/xfs_qm.h
+++ b/fs/xfs/quota/xfs_qm.h
@@ -56,12 +56,6 @@ extern kmem_zone_t *qm_dqtrxzone;
56#define XFS_QM_HASHSIZE_HIGH ((NBPP * 4) / sizeof(xfs_dqhash_t)) 56#define XFS_QM_HASHSIZE_HIGH ((NBPP * 4) / sizeof(xfs_dqhash_t))
57 57
58/* 58/*
59 * We output a cmn_err when quotachecking a quota file with more than
60 * this many fsbs.
61 */
62#define XFS_QM_BIG_QCHECK_NBLKS 500
63
64/*
65 * This defines the unit of allocation of dquots. 59 * This defines the unit of allocation of dquots.
66 * Currently, it is just one file system block, and a 4K blk contains 30 60 * Currently, it is just one file system block, and a 4K blk contains 30
67 * (136 * 30 = 4080) dquots. It's probably not worth trying to make 61 * (136 * 30 = 4080) dquots. It's probably not worth trying to make
diff --git a/fs/xfs/quota/xfs_quota_priv.h b/fs/xfs/quota/xfs_quota_priv.h
index b7ddd04aae32..a8b85e2be9d5 100644
--- a/fs/xfs/quota/xfs_quota_priv.h
+++ b/fs/xfs/quota/xfs_quota_priv.h
@@ -75,7 +75,6 @@ static inline int XQMISLCKD(struct xfs_dqhash *h)
75 75
76#define xfs_qm_freelist_lock(qm) XQMLCK(&((qm)->qm_dqfreelist)) 76#define xfs_qm_freelist_lock(qm) XQMLCK(&((qm)->qm_dqfreelist))
77#define xfs_qm_freelist_unlock(qm) XQMUNLCK(&((qm)->qm_dqfreelist)) 77#define xfs_qm_freelist_unlock(qm) XQMUNLCK(&((qm)->qm_dqfreelist))
78#define XFS_QM_IS_FREELIST_LOCKED(qm) XQMISLCKD(&((qm)->qm_dqfreelist))
79 78
80/* 79/*
81 * Hash into a bucket in the dquot hash table, based on <mp, id>. 80 * Hash into a bucket in the dquot hash table, based on <mp, id>.
@@ -170,6 +169,5 @@ for ((dqp) = (qlist)->qh_next; (dqp) != (xfs_dquot_t *)(qlist); \
170#define DQFLAGTO_TYPESTR(d) (((d)->dq_flags & XFS_DQ_USER) ? "USR" : \ 169#define DQFLAGTO_TYPESTR(d) (((d)->dq_flags & XFS_DQ_USER) ? "USR" : \
171 (((d)->dq_flags & XFS_DQ_GROUP) ? "GRP" : \ 170 (((d)->dq_flags & XFS_DQ_GROUP) ? "GRP" : \
172 (((d)->dq_flags & XFS_DQ_PROJ) ? "PRJ":"???"))) 171 (((d)->dq_flags & XFS_DQ_PROJ) ? "PRJ":"???")))
173#define DQFLAGTO_DIRTYSTR(d) (XFS_DQ_IS_DIRTY(d) ? "DIRTY" : "NOTDIRTY")
174 172
175#endif /* __XFS_QUOTA_PRIV_H__ */ 173#endif /* __XFS_QUOTA_PRIV_H__ */
diff --git a/fs/xfs/xfs_error.h b/fs/xfs/xfs_error.h
index bc43163456ef..f90fd500b940 100644
--- a/fs/xfs/xfs_error.h
+++ b/fs/xfs/xfs_error.h
@@ -18,14 +18,6 @@
18#ifndef __XFS_ERROR_H__ 18#ifndef __XFS_ERROR_H__
19#define __XFS_ERROR_H__ 19#define __XFS_ERROR_H__
20 20
21#define XFS_ERECOVER 1 /* Failure to recover log */
22#define XFS_ELOGSTAT 2 /* Failure to stat log in user space */
23#define XFS_ENOLOGSPACE 3 /* Reservation too large */
24#define XFS_ENOTSUP 4 /* Operation not supported */
25#define XFS_ENOLSN 5 /* Can't find the lsn you asked for */
26#define XFS_ENOTFOUND 6
27#define XFS_ENOTXFS 7 /* Not XFS filesystem */
28
29#ifdef DEBUG 21#ifdef DEBUG
30#define XFS_ERROR_NTRAP 10 22#define XFS_ERROR_NTRAP 10
31extern int xfs_etrap[XFS_ERROR_NTRAP]; 23extern int xfs_etrap[XFS_ERROR_NTRAP];
diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h
index 0f0ad1535951..1335449841cd 100644
--- a/fs/xfs/xfs_fs.h
+++ b/fs/xfs/xfs_fs.h
@@ -22,8 +22,6 @@
22 * SGI's XFS filesystem's major stuff (constants, structures) 22 * SGI's XFS filesystem's major stuff (constants, structures)
23 */ 23 */
24 24
25#define XFS_NAME "xfs"
26
27/* 25/*
28 * Direct I/O attribute record used with XFS_IOC_DIOINFO 26 * Direct I/O attribute record used with XFS_IOC_DIOINFO
29 * d_miniosz is the min xfer size, xfer size multiple and file seek offset 27 * d_miniosz is the min xfer size, xfer size multiple and file seek offset
@@ -426,11 +424,7 @@ typedef struct xfs_handle {
426 - (char *) &(handle)) \ 424 - (char *) &(handle)) \
427 + (handle).ha_fid.xfs_fid_len) 425 + (handle).ha_fid.xfs_fid_len)
428 426
429#define XFS_HANDLE_CMP(h1, h2) memcmp(h1, h2, sizeof(xfs_handle_t)) 427/*
430
431#define FSHSIZE sizeof(fsid_t)
432
433/*
434 * Flags for going down operation 428 * Flags for going down operation
435 */ 429 */
436#define XFS_FSOP_GOING_FLAGS_DEFAULT 0x0 /* going down */ 430#define XFS_FSOP_GOING_FLAGS_DEFAULT 0x0 /* going down */
diff --git a/fs/xfs/xfs_log.h b/fs/xfs/xfs_log.h
index eacb3d4987f2..ebbe93f4f97b 100644
--- a/fs/xfs/xfs_log.h
+++ b/fs/xfs/xfs_log.h
@@ -48,16 +48,10 @@ static inline xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2)
48 */ 48 */
49 49
50/* 50/*
51 * Flags to xfs_log_mount
52 */
53#define XFS_LOG_RECOVER 0x1
54
55/*
56 * Flags to xfs_log_done() 51 * Flags to xfs_log_done()
57 */ 52 */
58#define XFS_LOG_REL_PERM_RESERV 0x1 53#define XFS_LOG_REL_PERM_RESERV 0x1
59 54
60
61/* 55/*
62 * Flags to xfs_log_reserve() 56 * Flags to xfs_log_reserve()
63 * 57 *
@@ -70,8 +64,6 @@ static inline xfs_lsn_t _lsn_cmp(xfs_lsn_t lsn1, xfs_lsn_t lsn2)
70#define XFS_LOG_SLEEP 0x0 64#define XFS_LOG_SLEEP 0x0
71#define XFS_LOG_NOSLEEP 0x1 65#define XFS_LOG_NOSLEEP 0x1
72#define XFS_LOG_PERM_RESERV 0x2 66#define XFS_LOG_PERM_RESERV 0x2
73#define XFS_LOG_RESV_ALL (XFS_LOG_NOSLEEP|XFS_LOG_PERM_RESERV)
74
75 67
76/* 68/*
77 * Flags to xfs_log_force() 69 * Flags to xfs_log_force()
diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h
index 34bcbf50789c..7bf5046d8d28 100644
--- a/fs/xfs/xfs_log_priv.h
+++ b/fs/xfs/xfs_log_priv.h
@@ -32,7 +32,6 @@ struct xfs_mount;
32#define XLOG_MIN_ICLOGS 2 32#define XLOG_MIN_ICLOGS 2
33#define XLOG_MED_ICLOGS 4 33#define XLOG_MED_ICLOGS 4
34#define XLOG_MAX_ICLOGS 8 34#define XLOG_MAX_ICLOGS 8
35#define XLOG_CALLBACK_SIZE 10
36#define XLOG_HEADER_MAGIC_NUM 0xFEEDbabe /* Invalid cycle number */ 35#define XLOG_HEADER_MAGIC_NUM 0xFEEDbabe /* Invalid cycle number */
37#define XLOG_VERSION_1 1 36#define XLOG_VERSION_1 1
38#define XLOG_VERSION_2 2 /* Large IClogs, Log sunit */ 37#define XLOG_VERSION_2 2 /* Large IClogs, Log sunit */
@@ -149,9 +148,6 @@ struct xfs_mount;
149#define XLOG_WAS_CONT_TRANS 0x08 /* Cont this trans into new region */ 148#define XLOG_WAS_CONT_TRANS 0x08 /* Cont this trans into new region */
150#define XLOG_END_TRANS 0x10 /* End a continued transaction */ 149#define XLOG_END_TRANS 0x10 /* End a continued transaction */
151#define XLOG_UNMOUNT_TRANS 0x20 /* Unmount a filesystem transaction */ 150#define XLOG_UNMOUNT_TRANS 0x20 /* Unmount a filesystem transaction */
152#define XLOG_SKIP_TRANS (XLOG_COMMIT_TRANS | XLOG_CONTINUE_TRANS | \
153 XLOG_WAS_CONT_TRANS | XLOG_END_TRANS | \
154 XLOG_UNMOUNT_TRANS)
155 151
156#ifdef __KERNEL__ 152#ifdef __KERNEL__
157/* 153/*
diff --git a/fs/xfs/xfs_quota.h b/fs/xfs/xfs_quota.h
index acb853b33ebb..9dcb32aa4e2e 100644
--- a/fs/xfs/xfs_quota.h
+++ b/fs/xfs/xfs_quota.h
@@ -281,8 +281,6 @@ typedef struct xfs_qoff_logformat {
281 XFS_UQUOTA_CHKD|XFS_PQUOTA_ACCT|\ 281 XFS_UQUOTA_CHKD|XFS_PQUOTA_ACCT|\
282 XFS_OQUOTA_ENFD|XFS_OQUOTA_CHKD|\ 282 XFS_OQUOTA_ENFD|XFS_OQUOTA_CHKD|\
283 XFS_GQUOTA_ACCT) 283 XFS_GQUOTA_ACCT)
284#define XFS_MOUNT_QUOTA_MASK (XFS_MOUNT_QUOTA_ALL | XFS_UQUOTA_ACTIVE | \
285 XFS_GQUOTA_ACTIVE | XFS_PQUOTA_ACTIVE)
286 284
287 285
288/* 286/*
diff --git a/fs/xfs/xfs_sb.h b/fs/xfs/xfs_sb.h
index bf168a91ddb8..467854b45c8f 100644
--- a/fs/xfs/xfs_sb.h
+++ b/fs/xfs/xfs_sb.h
@@ -60,10 +60,6 @@ struct xfs_mount;
60 XFS_SB_VERSION_LOGV2BIT | \ 60 XFS_SB_VERSION_LOGV2BIT | \
61 XFS_SB_VERSION_SECTORBIT | \ 61 XFS_SB_VERSION_SECTORBIT | \
62 XFS_SB_VERSION_MOREBITSBIT) 62 XFS_SB_VERSION_MOREBITSBIT)
63#define XFS_SB_VERSION_OKSASHBITS \
64 (XFS_SB_VERSION_NUMBITS | \
65 XFS_SB_VERSION_REALFBITS | \
66 XFS_SB_VERSION_OKSASHFBITS)
67#define XFS_SB_VERSION_OKREALBITS \ 63#define XFS_SB_VERSION_OKREALBITS \
68 (XFS_SB_VERSION_NUMBITS | \ 64 (XFS_SB_VERSION_NUMBITS | \
69 XFS_SB_VERSION_OKREALFBITS | \ 65 XFS_SB_VERSION_OKREALFBITS | \
@@ -81,9 +77,6 @@ struct xfs_mount;
81#define XFS_SB_VERSION2_RESERVED2BIT 0x00000002 77#define XFS_SB_VERSION2_RESERVED2BIT 0x00000002
82#define XFS_SB_VERSION2_RESERVED4BIT 0x00000004 78#define XFS_SB_VERSION2_RESERVED4BIT 0x00000004
83#define XFS_SB_VERSION2_ATTR2BIT 0x00000008 /* Inline attr rework */ 79#define XFS_SB_VERSION2_ATTR2BIT 0x00000008 /* Inline attr rework */
84#define XFS_SB_VERSION2_SASHFBITS 0xff000000 /* Mask: features that
85 require changing
86 PROM and SASH */
87 80
88#define XFS_SB_VERSION2_OKREALFBITS \ 81#define XFS_SB_VERSION2_OKREALFBITS \
89 (XFS_SB_VERSION2_ATTR2BIT) 82 (XFS_SB_VERSION2_ATTR2BIT)
@@ -238,12 +231,6 @@ static inline int xfs_sb_good_version(xfs_sb_t *sbp)
238} 231}
239#endif /* __KERNEL__ */ 232#endif /* __KERNEL__ */
240 233
241#define XFS_SB_GOOD_SASH_VERSION(sbp) \
242 ((((sbp)->sb_versionnum >= XFS_SB_VERSION_1) && \
243 ((sbp)->sb_versionnum <= XFS_SB_VERSION_3)) || \
244 ((XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_4) && \
245 !((sbp)->sb_versionnum & ~XFS_SB_VERSION_OKSASHBITS)))
246
247#define XFS_SB_VERSION_TONEW(v) xfs_sb_version_tonew(v) 234#define XFS_SB_VERSION_TONEW(v) xfs_sb_version_tonew(v)
248static inline unsigned xfs_sb_version_tonew(unsigned v) 235static inline unsigned xfs_sb_version_tonew(unsigned v)
249{ 236{
@@ -461,15 +448,6 @@ static inline void xfs_sb_version_addattr2(xfs_sb_t *sbp)
461 * File system sector to basic block conversions. 448 * File system sector to basic block conversions.
462 */ 449 */
463#define XFS_FSS_TO_BB(mp,sec) ((sec) << (mp)->m_sectbb_log) 450#define XFS_FSS_TO_BB(mp,sec) ((sec) << (mp)->m_sectbb_log)
464#define XFS_BB_TO_FSS(mp,bb) \
465 (((bb) + (XFS_FSS_TO_BB(mp,1) - 1)) >> (mp)->m_sectbb_log)
466#define XFS_BB_TO_FSST(mp,bb) ((bb) >> (mp)->m_sectbb_log)
467
468/*
469 * File system sector to byte conversions.
470 */
471#define XFS_FSS_TO_B(mp,sectno) ((xfs_fsize_t)(sectno) << (mp)->m_sb.sb_sectlog)
472#define XFS_B_TO_FSST(mp,b) (((__uint64_t)(b)) >> (mp)->m_sb.sb_sectlog)
473 451
474/* 452/*
475 * File system block to basic block conversions. 453 * File system block to basic block conversions.