aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_linux.h')
-rw-r--r--fs/xfs/linux-2.6/xfs_linux.h28
1 files changed, 1 insertions, 27 deletions
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h
index 9bf4f7e965c7..3ca39c4e5d2a 100644
--- a/fs/xfs/linux-2.6/xfs_linux.h
+++ b/fs/xfs/linux-2.6/xfs_linux.h
@@ -138,43 +138,17 @@
138 138
139#define spinlock_destroy(lock) 139#define spinlock_destroy(lock)
140 140
141#define NBPP PAGE_SIZE
142#define NDPP (1 << (PAGE_SHIFT - 9))
143
144#define NBBY 8 /* number of bits per byte */ 141#define NBBY 8 /* number of bits per byte */
145#define NBPC PAGE_SIZE /* Number of bytes per click */
146#define BPCSHIFT PAGE_SHIFT /* LOG2(NBPC) if exact */
147 142
148/* 143/*
149 * Size of block device i/o is parameterized here. 144 * Size of block device i/o is parameterized here.
150 * Currently the system supports page-sized i/o. 145 * Currently the system supports page-sized i/o.
151 */ 146 */
152#define BLKDEV_IOSHIFT BPCSHIFT 147#define BLKDEV_IOSHIFT PAGE_CACHE_SHIFT
153#define BLKDEV_IOSIZE (1<<BLKDEV_IOSHIFT) 148#define BLKDEV_IOSIZE (1<<BLKDEV_IOSHIFT)
154/* number of BB's per block device block */ 149/* number of BB's per block device block */
155#define BLKDEV_BB BTOBB(BLKDEV_IOSIZE) 150#define BLKDEV_BB BTOBB(BLKDEV_IOSIZE)
156 151
157/* bytes to clicks */
158#define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT)
159#define btoct(x) ((__psunsigned_t)(x)>>BPCSHIFT)
160#define btoc64(x) (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT)
161#define btoct64(x) ((__uint64_t)(x)>>BPCSHIFT)
162
163/* off_t bytes to clicks */
164#define offtoc(x) (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT)
165#define offtoct(x) ((xfs_off_t)(x)>>BPCSHIFT)
166
167/* clicks to off_t bytes */
168#define ctooff(x) ((xfs_off_t)(x)<<BPCSHIFT)
169
170/* clicks to bytes */
171#define ctob(x) ((__psunsigned_t)(x)<<BPCSHIFT)
172#define btoct(x) ((__psunsigned_t)(x)>>BPCSHIFT)
173#define ctob64(x) ((__uint64_t)(x)<<BPCSHIFT)
174
175/* bytes to clicks */
176#define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT)
177
178#define ENOATTR ENODATA /* Attribute not found */ 152#define ENOATTR ENODATA /* Attribute not found */
179#define EWRONGFS EINVAL /* Mount with wrong filesystem type */ 153#define EWRONGFS EINVAL /* Mount with wrong filesystem type */
180#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */ 154#define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */