1 /*
2  * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
3  *
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.
7  *
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.
11  *
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.
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  */
32 #ifndef __XFS_CLNT_H__
33 #define __XFS_CLNT_H__
34 
35 /*
36  * XFS arguments structure, constructed from the arguments we
37  * are passed via the mount system call.
38  *
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.
46  *
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.
52  *
53  * For the Linux port, we kept this structure pretty much intact
54  * and use it internally (because the existing code groks it).
55  */
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 };
68 
69 /*
70  * XFS mount option flags
71  */
72 #define	XFSMNT_CHKLOG		0x00000001	/* check log */
73 #define	XFSMNT_WSYNC		0x00000002	/* safe mode nfs mount
74 						 * compatible */
75 #define	XFSMNT_INO64		0x00000004	/* move inode numbers up
76 						 * past 2^32 */
77 #define XFSMNT_UQUOTA		0x00000008	/* user quota accounting */
78 #define XFSMNT_PQUOTA		0x00000010	/* IRIX prj quota accounting */
79 #define XFSMNT_UQUOTAENF	0x00000020	/* user quota limit
80 						 * enforcement */
81 #define XFSMNT_PQUOTAENF	0x00000040	/* IRIX project quota limit
82 						 * enforcement */
83 #define XFSMNT_NOATIME		0x00000100	/* don't modify access
84 						 * times on reads */
85 #define XFSMNT_NOALIGN		0x00000200	/* don't allocate at
86 						 * stripe boundaries*/
87 #define XFSMNT_RETERR		0x00000400	/* return error to user */
88 #define XFSMNT_NORECOVERY	0x00000800	/* no recovery, implies
89 						 * read-only mount */
90 #define XFSMNT_SHARED		0x00001000	/* shared XFS mount */
91 #define XFSMNT_IOSIZE		0x00002000	/* optimize for I/O size */
92 #define XFSMNT_OSYNCISOSYNC	0x00004000	/* o_sync is REALLY o_sync */
93 						/* (osyncisdsync is now default) */
94 #define XFSMNT_32BITINODES	0x00200000	/* restrict inodes to 32
95 						 * bits of address space */
96 #define XFSMNT_GQUOTA		0x00400000	/* group quota accounting */
97 #define XFSMNT_GQUOTAENF	0x00800000	/* group quota limit
98 						 * enforcement */
99 #define XFSMNT_NOUUID		0x01000000	/* Ignore fs uuid */
100 #define XFSMNT_DMAPI		0x02000000	/* enable dmapi/xdsm */
101 #define XFSMNT_NOLOGFLUSH	0x04000000	/* Don't flush for log blocks */
102 #define XFSMNT_IDELETE		0x08000000	/* inode cluster delete */
103 #define XFSMNT_SWALLOC		0x10000000	/* turn on stripe width
104 						 * allocation */
105 
106 #endif	/* __XFS_CLNT_H__ */
107