diff options
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_linux.h')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_linux.h | 56 |
1 files changed, 13 insertions, 43 deletions
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h index 68c5d885ed9c..44fed10af0dd 100644 --- a/fs/xfs/linux-2.6/xfs_linux.h +++ b/fs/xfs/linux-2.6/xfs_linux.h | |||
@@ -1,33 +1,19 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
3 | * All Rights Reserved. | ||
3 | * | 4 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or |
5 | * under the terms of version 2 of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
6 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
7 | * | 8 | * |
8 | * This program is distributed in the hope that it would be useful, but | 9 | * This program is distributed in the hope that it would be useful, |
9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | ||
11 | * | 13 | * |
12 | * Further, this software is distributed without any warranty that it is | 14 | * You should have received a copy of the GNU General Public License |
13 | * free of the rightful claim of any third person regarding infringement | 15 | * along with this program; if not, write the Free Software Foundation, |
14 | * or the like. Any license provided herein, whether implied or | 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
15 | * otherwise, applies only to this software file. Patent licenses, if | ||
16 | * any, provided herein do not apply to combinations of this program with | ||
17 | * other software, or any other product whatsoever. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License along | ||
20 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
21 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
22 | * | ||
23 | * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, | ||
24 | * Mountain View, CA 94043, or: | ||
25 | * | ||
26 | * http://www.sgi.com | ||
27 | * | ||
28 | * For further information regarding this notice, see: | ||
29 | * | ||
30 | * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ | ||
31 | */ | 17 | */ |
32 | #ifndef __XFS_LINUX__ | 18 | #ifndef __XFS_LINUX__ |
33 | #define __XFS_LINUX__ | 19 | #define __XFS_LINUX__ |
@@ -197,10 +183,6 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh) | |||
197 | /* bytes to clicks */ | 183 | /* bytes to clicks */ |
198 | #define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT) | 184 | #define btoc(x) (((__psunsigned_t)(x)+(NBPC-1))>>BPCSHIFT) |
199 | 185 | ||
200 | #ifndef CELL_CAPABLE | ||
201 | #define FSC_NOTIFY_NAME_CHANGED(vp) | ||
202 | #endif | ||
203 | |||
204 | #ifndef ENOATTR | 186 | #ifndef ENOATTR |
205 | #define ENOATTR ENODATA /* Attribute not found */ | 187 | #define ENOATTR ENODATA /* Attribute not found */ |
206 | #endif | 188 | #endif |
@@ -235,30 +217,18 @@ static inline void set_buffer_unwritten_io(struct buffer_head *bh) | |||
235 | #define Q_XSETPQLIM XQM_CMD(10) /* set projects disk limits */ | 217 | #define Q_XSETPQLIM XQM_CMD(10) /* set projects disk limits */ |
236 | #define Q_XGETPQUOTA XQM_CMD(11) /* get projects disk limits */ | 218 | #define Q_XGETPQUOTA XQM_CMD(11) /* get projects disk limits */ |
237 | 219 | ||
238 | /* IRIX uses a dynamic sizing algorithm (ndquot = 200 + numprocs*2) */ | 220 | #define dfltprid 0 |
239 | /* we may well need to fine-tune this if it ever becomes an issue. */ | ||
240 | #define DQUOT_MAX_HEURISTIC 1024 /* NR_DQUOTS */ | ||
241 | #define ndquot DQUOT_MAX_HEURISTIC | ||
242 | |||
243 | /* IRIX uses the current size of the name cache to guess a good value */ | ||
244 | /* - this isn't the same but is a good enough starting point for now. */ | ||
245 | #define DQUOT_HASH_HEURISTIC files_stat.nr_files | ||
246 | |||
247 | /* IRIX inodes maintain the project ID also, zero this field on Linux */ | ||
248 | #define DEFAULT_PROJID 0 | ||
249 | #define dfltprid DEFAULT_PROJID | ||
250 | |||
251 | #define MAXPATHLEN 1024 | 221 | #define MAXPATHLEN 1024 |
252 | 222 | ||
253 | #define MIN(a,b) (min(a,b)) | 223 | #define MIN(a,b) (min(a,b)) |
254 | #define MAX(a,b) (max(a,b)) | 224 | #define MAX(a,b) (max(a,b)) |
255 | #define howmany(x, y) (((x)+((y)-1))/(y)) | 225 | #define howmany(x, y) (((x)+((y)-1))/(y)) |
256 | #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) | 226 | #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) |
257 | #define qsort(a,n,s,fn) sort(a,n,s,fn,NULL) | ||
258 | 227 | ||
259 | /* | 228 | /* |
260 | * Various platform dependent calls that don't fit anywhere else | 229 | * Various platform dependent calls that don't fit anywhere else |
261 | */ | 230 | */ |
231 | #define xfs_sort(a,n,s,fn) sort(a,n,s,fn,NULL) | ||
262 | #define xfs_stack_trace() dump_stack() | 232 | #define xfs_stack_trace() dump_stack() |
263 | #define xfs_itruncate_data(ip, off) \ | 233 | #define xfs_itruncate_data(ip, off) \ |
264 | (-vmtruncate(LINVFS_GET_IP(XFS_ITOV(ip)), (off))) | 234 | (-vmtruncate(LINVFS_GET_IP(XFS_ITOV(ip)), (off))) |