2 * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it would be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * Further, this software is distributed without any warranty that it is
13 * free of the rightful claim of any third person regarding infringement
14 * or the like. Any license provided herein, whether implied or
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.
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.
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
28 * For further information regarding this notice, see:
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
32 #ifndef __XFS_CLNT_H__
33 #define __XFS_CLNT_H__
36 * XFS arguments structure, constructed from the arguments we
37 * are passed via the mount system call.
39 * NOTE: The mount system call is handled differently between
40 * Linux and IRIX. In IRIX we worked work with a binary data
41 * structure coming in across the syscall interface from user
42 * space (the mount userspace knows about each filesystem type
43 * and the set of valid options for it, and converts the users
44 * argument string into a binary structure _before_ making the
45 * system call), and the ABI issues that this implies.
47 * In Linux, we are passed a comma separated set of options;
48 * ie. a NULL terminated string of characters. Userspace mount
49 * code does not have any knowledge of mount options expected by
50 * each filesystem type and so each filesystem parses its mount
51 * options in kernel space.
53 * For the Linux port, we kept this structure pretty much intact
54 * and use it internally (because the existing code groks it).
56 struct xfs_mount_args {
57 int flags; /* flags -> see XFSMNT_... macros below */
58 int logbufs; /* Number of log buffers, -1 to default */
59 int logbufsize; /* Size of log buffers, -1 to default */
60 char fsname[MAXNAMELEN+1]; /* data device name */
61 char rtname[MAXNAMELEN+1]; /* realtime device filename */
62 char logname[MAXNAMELEN+1]; /* journal device filename */
63 char mtpt[MAXNAMELEN+1]; /* filesystem mount point */
64 int sunit; /* stripe unit (BBs) */
65 int swidth; /* stripe width (BBs), multiple of sunit */
66 uchar_t iosizelog; /* log2 of the preferred I/O size */
67 int ihashsize; /* inode hash table size (buckets) */
71 * XFS mount option flags
73 #define XFSMNT_COMPAT_ATTR 0x00000001 /* do not use ATTR2 format */
74 #define XFSMNT_WSYNC 0x00000002 /* safe mode nfs mount
76 #define XFSMNT_INO64 0x00000004 /* move inode numbers up
78 #define XFSMNT_UQUOTA 0x00000008 /* user quota accounting */
79 #define XFSMNT_PQUOTA 0x00000010 /* IRIX prj quota accounting */
80 #define XFSMNT_UQUOTAENF 0x00000020 /* user quota limit
82 #define XFSMNT_PQUOTAENF 0x00000040 /* IRIX project quota limit
84 #define XFSMNT_NOATIME 0x00000100 /* don't modify access
86 #define XFSMNT_NOALIGN 0x00000200 /* don't allocate at
88 #define XFSMNT_RETERR 0x00000400 /* return error to user */
89 #define XFSMNT_NORECOVERY 0x00000800 /* no recovery, implies
91 #define XFSMNT_SHARED 0x00001000 /* shared XFS mount */
92 #define XFSMNT_IOSIZE 0x00002000 /* optimize for I/O size */
93 #define XFSMNT_OSYNCISOSYNC 0x00004000 /* o_sync is REALLY o_sync */
94 /* (osyncisdsync is now default) */
95 #define XFSMNT_32BITINODES 0x00200000 /* restrict inodes to 32
96 * bits of address space */
97 #define XFSMNT_GQUOTA 0x00400000 /* group quota accounting */
98 #define XFSMNT_GQUOTAENF 0x00800000 /* group quota limit
100 #define XFSMNT_NOUUID 0x01000000 /* Ignore fs uuid */
101 #define XFSMNT_DMAPI 0x02000000 /* enable dmapi/xdsm */
102 #define XFSMNT_BARRIER 0x04000000 /* use write barriers */
103 #define XFSMNT_IDELETE 0x08000000 /* inode cluster delete */
104 #define XFSMNT_SWALLOC 0x10000000 /* turn on stripe width
106 #define XFSMNT_IHASHSIZE 0x20000000 /* inode hash table size */
107 #define XFSMNT_DIRSYNC 0x40000000 /* sync creat,link,unlink,rename
108 * symlink,mkdir,rmdir,mknod */
109 #define XFSMNT_COMPAT_IOSIZE 0x80000000 /* don't report large preferred
110 * I/O size in stat() */
112 #endif /* __XFS_CLNT_H__ */