diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_linux.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_linux.h | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h index dc3752de22d..3ca39c4e5d2 100644 --- a/fs/xfs/linux-2.6/xfs_linux.h +++ b/fs/xfs/linux-2.6/xfs_linux.h | |||
@@ -43,7 +43,6 @@ | |||
43 | 43 | ||
44 | #include <kmem.h> | 44 | #include <kmem.h> |
45 | #include <mrlock.h> | 45 | #include <mrlock.h> |
46 | #include <spin.h> | ||
47 | #include <sv.h> | 46 | #include <sv.h> |
48 | #include <mutex.h> | 47 | #include <mutex.h> |
49 | #include <sema.h> | 48 | #include <sema.h> |
@@ -75,6 +74,7 @@ | |||
75 | #include <linux/notifier.h> | 74 | #include <linux/notifier.h> |
76 | #include <linux/delay.h> | 75 | #include <linux/delay.h> |
77 | #include <linux/log2.h> | 76 | #include <linux/log2.h> |
77 | #include <linux/spinlock.h> | ||
78 | 78 | ||
79 | #include <asm/page.h> | 79 | #include <asm/page.h> |
80 | #include <asm/div64.h> | 80 | #include <asm/div64.h> |
@@ -136,43 +136,19 @@ | |||
136 | #define current_restore_flags_nested(sp, f) \ | 136 | #define current_restore_flags_nested(sp, f) \ |
137 | (current->flags = ((current->flags & ~(f)) | (*(sp) & (f)))) | 137 | (current->flags = ((current->flags & ~(f)) | (*(sp) & (f)))) |
138 | 138 | ||
139 | #define NBPP PAGE_SIZE | 139 | #define spinlock_destroy(lock) |
140 | #define NDPP (1 << (PAGE_SHIFT - 9)) | ||
141 | 140 | ||
142 | #define NBBY 8 /* number of bits per byte */ | 141 | #define NBBY 8 /* number of bits per byte */ |
143 | #define NBPC PAGE_SIZE /* Number of bytes per click */ | ||
144 | #define BPCSHIFT PAGE_SHIFT /* LOG2(NBPC) if exact */ | ||
145 | 142 | ||
146 | /* | 143 | /* |
147 | * Size of block device i/o is parameterized here. | 144 | * Size of block device i/o is parameterized here. |
148 | * Currently the system supports page-sized i/o. | 145 | * Currently the system supports page-sized i/o. |
149 | */ | 146 | */ |
150 | #define BLKDEV_IOSHIFT BPCSHIFT | 147 | #define BLKDEV_IOSHIFT PAGE_CACHE_SHIFT |
151 | #define BLKDEV_IOSIZE (1<<BLKDEV_IOSHIFT) | 148 | #define BLKDEV_IOSIZE (1<<BLKDEV_IOSHIFT) |
152 | /* number of BB's per block device block */ | 149 | /* number of BB's per block device block */ |
153 | #define BLKDEV_BB BTOBB(BLKDEV_IOSIZE) | 150 | #define BLKDEV_BB BTOBB(BLKDEV_IOSIZE) |
154 | 151 | ||
155 | /* bytes to clicks */ | ||
156 | #define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT) | ||
157 | #define btoct(x) ((__psunsigned_t)(x)>>BPCSHIFT) | ||
158 | #define btoc64(x) (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT) | ||
159 | #define btoct64(x) ((__uint64_t)(x)>>BPCSHIFT) | ||
160 | |||
161 | /* off_t bytes to clicks */ | ||
162 | #define offtoc(x) (((__uint64_t)(x)+(NBPC-1))>>BPCSHIFT) | ||
163 | #define offtoct(x) ((xfs_off_t)(x)>>BPCSHIFT) | ||
164 | |||
165 | /* clicks to off_t bytes */ | ||
166 | #define ctooff(x) ((xfs_off_t)(x)<<BPCSHIFT) | ||
167 | |||
168 | /* clicks to bytes */ | ||
169 | #define ctob(x) ((__psunsigned_t)(x)<<BPCSHIFT) | ||
170 | #define btoct(x) ((__psunsigned_t)(x)>>BPCSHIFT) | ||
171 | #define ctob64(x) ((__uint64_t)(x)<<BPCSHIFT) | ||
172 | |||
173 | /* bytes to clicks */ | ||
174 | #define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT) | ||
175 | |||
176 | #define ENOATTR ENODATA /* Attribute not found */ | 152 | #define ENOATTR ENODATA /* Attribute not found */ |
177 | #define EWRONGFS EINVAL /* Mount with wrong filesystem type */ | 153 | #define EWRONGFS EINVAL /* Mount with wrong filesystem type */ |
178 | #define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */ | 154 | #define EFSCORRUPTED EUCLEAN /* Filesystem is corrupted */ |
@@ -205,10 +181,6 @@ | |||
205 | #define xfs_stack_trace() dump_stack() | 181 | #define xfs_stack_trace() dump_stack() |
206 | #define xfs_itruncate_data(ip, off) \ | 182 | #define xfs_itruncate_data(ip, off) \ |
207 | (-vmtruncate(vn_to_inode(XFS_ITOV(ip)), (off))) | 183 | (-vmtruncate(vn_to_inode(XFS_ITOV(ip)), (off))) |
208 | #define xfs_statvfs_fsid(statp, mp) \ | ||
209 | ({ u64 id = huge_encode_dev((mp)->m_ddev_targp->bt_dev); \ | ||
210 | __kernel_fsid_t *fsid = &(statp)->f_fsid; \ | ||
211 | (fsid->val[0] = (u32)id, fsid->val[1] = (u32)(id >> 32)); }) | ||
212 | 184 | ||
213 | 185 | ||
214 | /* Move the kernel do_div definition off to one side */ | 186 | /* Move the kernel do_div definition off to one side */ |