blob: b3215ffe0be86f739eb260e894d30cafb994e1b9 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Copyright (c) 2000-2005 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 */
56struct 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) */
68};
69
70/*
71 * XFS mount option flags
72 */
73#define XFSMNT_CHKLOG 0x00000001 /* check log */
74#define XFSMNT_WSYNC 0x00000002 /* safe mode nfs mount
75 * compatible */
76#define XFSMNT_INO64 0x00000004 /* move inode numbers up
77 * past 2^32 */
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
81 * enforcement */
82#define XFSMNT_PQUOTAENF 0x00000040 /* IRIX project quota limit
83 * enforcement */
84#define XFSMNT_NOATIME 0x00000100 /* don't modify access
85 * times on reads */
86#define XFSMNT_NOALIGN 0x00000200 /* don't allocate at
87 * stripe boundaries*/
88#define XFSMNT_RETERR 0x00000400 /* return error to user */
89#define XFSMNT_NORECOVERY 0x00000800 /* no recovery, implies
90 * read-only mount */
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
99 * enforcement */
100#define XFSMNT_NOUUID 0x01000000 /* Ignore fs uuid */
101#define XFSMNT_DMAPI 0x02000000 /* enable dmapi/xdsm */
102#define XFSMNT_NOLOGFLUSH 0x04000000 /* Don't flush for log blocks */
103#define XFSMNT_IDELETE 0x08000000 /* inode cluster delete */
104#define XFSMNT_SWALLOC 0x10000000 /* turn on stripe width
105 * allocation */
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
110#endif /* __XFS_CLNT_H__ */