Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 2 | * Copyright (c) 2000-2005 Silicon Graphics, Inc. |
| 3 | * All Rights Reserved. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 5 | * This program is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU General Public License as |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 7 | * published by the Free Software Foundation. |
| 8 | * |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 9 | * This program is distributed in the hope that it would be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | * |
Nathan Scott | 7b71876 | 2005-11-02 14:58:39 +1100 | [diff] [blame] | 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write the Free Software Foundation, |
| 16 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | */ |
| 18 | #ifndef __XFS_CLNT_H__ |
| 19 | #define __XFS_CLNT_H__ |
| 20 | |
| 21 | /* |
| 22 | * XFS arguments structure, constructed from the arguments we |
| 23 | * are passed via the mount system call. |
| 24 | * |
| 25 | * NOTE: The mount system call is handled differently between |
| 26 | * Linux and IRIX. In IRIX we worked work with a binary data |
| 27 | * structure coming in across the syscall interface from user |
| 28 | * space (the mount userspace knows about each filesystem type |
| 29 | * and the set of valid options for it, and converts the users |
| 30 | * argument string into a binary structure _before_ making the |
| 31 | * system call), and the ABI issues that this implies. |
| 32 | * |
| 33 | * In Linux, we are passed a comma separated set of options; |
| 34 | * ie. a NULL terminated string of characters. Userspace mount |
| 35 | * code does not have any knowledge of mount options expected by |
| 36 | * each filesystem type and so each filesystem parses its mount |
| 37 | * options in kernel space. |
| 38 | * |
| 39 | * For the Linux port, we kept this structure pretty much intact |
| 40 | * and use it internally (because the existing code groks it). |
| 41 | */ |
| 42 | struct xfs_mount_args { |
| 43 | int flags; /* flags -> see XFSMNT_... macros below */ |
Nathan Scott | e718eeb | 2005-11-02 15:09:22 +1100 | [diff] [blame] | 44 | int flags2; /* flags -> see XFSMNT2_... macros below */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | int logbufs; /* Number of log buffers, -1 to default */ |
| 46 | int logbufsize; /* Size of log buffers, -1 to default */ |
| 47 | char fsname[MAXNAMELEN+1]; /* data device name */ |
| 48 | char rtname[MAXNAMELEN+1]; /* realtime device filename */ |
| 49 | char logname[MAXNAMELEN+1]; /* journal device filename */ |
| 50 | char mtpt[MAXNAMELEN+1]; /* filesystem mount point */ |
| 51 | int sunit; /* stripe unit (BBs) */ |
| 52 | int swidth; /* stripe width (BBs), multiple of sunit */ |
| 53 | uchar_t iosizelog; /* log2 of the preferred I/O size */ |
| 54 | int ihashsize; /* inode hash table size (buckets) */ |
| 55 | }; |
| 56 | |
| 57 | /* |
Nathan Scott | e718eeb | 2005-11-02 15:09:22 +1100 | [diff] [blame] | 58 | * XFS mount option flags -- args->flags1 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 59 | */ |
Nathan Scott | 13059ff | 2006-01-11 15:32:01 +1100 | [diff] [blame] | 60 | #define XFSMNT_ATTR2 0x00000001 /* allow ATTR2 EA format */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 | #define XFSMNT_WSYNC 0x00000002 /* safe mode nfs mount |
| 62 | * compatible */ |
| 63 | #define XFSMNT_INO64 0x00000004 /* move inode numbers up |
| 64 | * past 2^32 */ |
| 65 | #define XFSMNT_UQUOTA 0x00000008 /* user quota accounting */ |
| 66 | #define XFSMNT_PQUOTA 0x00000010 /* IRIX prj quota accounting */ |
| 67 | #define XFSMNT_UQUOTAENF 0x00000020 /* user quota limit |
| 68 | * enforcement */ |
| 69 | #define XFSMNT_PQUOTAENF 0x00000040 /* IRIX project quota limit |
| 70 | * enforcement */ |
Nathan Scott | 764d1f8 | 2006-03-31 13:04:17 +1000 | [diff] [blame] | 71 | #define XFSMNT_QUIET 0x00000080 /* don't report mount errors */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 72 | #define XFSMNT_NOALIGN 0x00000200 /* don't allocate at |
| 73 | * stripe boundaries*/ |
| 74 | #define XFSMNT_RETERR 0x00000400 /* return error to user */ |
| 75 | #define XFSMNT_NORECOVERY 0x00000800 /* no recovery, implies |
| 76 | * read-only mount */ |
| 77 | #define XFSMNT_SHARED 0x00001000 /* shared XFS mount */ |
| 78 | #define XFSMNT_IOSIZE 0x00002000 /* optimize for I/O size */ |
| 79 | #define XFSMNT_OSYNCISOSYNC 0x00004000 /* o_sync is REALLY o_sync */ |
Nathan Scott | e718eeb | 2005-11-02 15:09:22 +1100 | [diff] [blame] | 80 | /* (osyncisdsync is default) */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 81 | #define XFSMNT_32BITINODES 0x00200000 /* restrict inodes to 32 |
| 82 | * bits of address space */ |
| 83 | #define XFSMNT_GQUOTA 0x00400000 /* group quota accounting */ |
| 84 | #define XFSMNT_GQUOTAENF 0x00800000 /* group quota limit |
| 85 | * enforcement */ |
| 86 | #define XFSMNT_NOUUID 0x01000000 /* Ignore fs uuid */ |
| 87 | #define XFSMNT_DMAPI 0x02000000 /* enable dmapi/xdsm */ |
Christoph Hellwig | f538d4d | 2005-11-02 10:26:59 +1100 | [diff] [blame] | 88 | #define XFSMNT_BARRIER 0x04000000 /* use write barriers */ |
Josef Jeff Sipek | 1bd960e | 2008-02-29 13:58:40 +1100 | [diff] [blame] | 89 | #define XFSMNT_IKEEP 0x08000000 /* inode cluster delete */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 90 | #define XFSMNT_SWALLOC 0x10000000 /* turn on stripe width |
| 91 | * allocation */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | #define XFSMNT_DIRSYNC 0x40000000 /* sync creat,link,unlink,rename |
| 93 | * symlink,mkdir,rmdir,mknod */ |
Nathan Scott | e718eeb | 2005-11-02 15:09:22 +1100 | [diff] [blame] | 94 | #define XFSMNT_FLAGS2 0x80000000 /* more flags set in flags2 */ |
| 95 | |
| 96 | /* |
| 97 | * XFS mount option flags -- args->flags2 |
| 98 | */ |
| 99 | #define XFSMNT2_COMPAT_IOSIZE 0x00000001 /* don't report large preferred |
| 100 | * I/O size in stat(2) */ |
David Chinner | 2a82b8b | 2007-07-11 11:09:12 +1000 | [diff] [blame] | 101 | #define XFSMNT2_FILESTREAMS 0x00000002 /* enable the filestreams |
| 102 | * allocator */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 103 | |
| 104 | #endif /* __XFS_CLNT_H__ */ |