xfs_clnt.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. /*
  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. * XFS arguments structure, constructed from the arguments we
  36. * are passed via the mount system call.
  37. *
  38. * NOTE: The mount system call is handled differently between
  39. * Linux and IRIX. In IRIX we worked work with a binary data
  40. * structure coming in across the syscall interface from user
  41. * space (the mount userspace knows about each filesystem type
  42. * and the set of valid options for it, and converts the users
  43. * argument string into a binary structure _before_ making the
  44. * system call), and the ABI issues that this implies.
  45. *
  46. * In Linux, we are passed a comma separated set of options;
  47. * ie. a NULL terminated string of characters. Userspace mount
  48. * code does not have any knowledge of mount options expected by
  49. * each filesystem type and so each filesystem parses its mount
  50. * options in kernel space.
  51. *
  52. * For the Linux port, we kept this structure pretty much intact
  53. * and use it internally (because the existing code groks it).
  54. */
  55. struct xfs_mount_args {
  56. int flags; /* flags -> see XFSMNT_... macros below */
  57. int logbufs; /* Number of log buffers, -1 to default */
  58. int logbufsize; /* Size of log buffers, -1 to default */
  59. char fsname[MAXNAMELEN+1]; /* data device name */
  60. char rtname[MAXNAMELEN+1]; /* realtime device filename */
  61. char logname[MAXNAMELEN+1]; /* journal device filename */
  62. char mtpt[MAXNAMELEN+1]; /* filesystem mount point */
  63. int sunit; /* stripe unit (BBs) */
  64. int swidth; /* stripe width (BBs), multiple of sunit */
  65. uchar_t iosizelog; /* log2 of the preferred I/O size */
  66. int ihashsize; /* inode hash table size (buckets) */
  67. };
  68. /*
  69. * XFS mount option flags
  70. */
  71. #define XFSMNT_CHKLOG 0x00000001 /* check log */
  72. #define XFSMNT_WSYNC 0x00000002 /* safe mode nfs mount
  73. * compatible */
  74. #define XFSMNT_INO64 0x00000004 /* move inode numbers up
  75. * past 2^32 */
  76. #define XFSMNT_UQUOTA 0x00000008 /* user quota accounting */
  77. #define XFSMNT_PQUOTA 0x00000010 /* IRIX prj quota accounting */
  78. #define XFSMNT_UQUOTAENF 0x00000020 /* user quota limit
  79. * enforcement */
  80. #define XFSMNT_PQUOTAENF 0x00000040 /* IRIX project quota limit
  81. * enforcement */
  82. #define XFSMNT_NOATIME 0x00000100 /* don't modify access
  83. * times on reads */
  84. #define XFSMNT_NOALIGN 0x00000200 /* don't allocate at
  85. * stripe boundaries*/
  86. #define XFSMNT_RETERR 0x00000400 /* return error to user */
  87. #define XFSMNT_NORECOVERY 0x00000800 /* no recovery, implies
  88. * read-only mount */
  89. #define XFSMNT_SHARED 0x00001000 /* shared XFS mount */
  90. #define XFSMNT_IOSIZE 0x00002000 /* optimize for I/O size */
  91. #define XFSMNT_OSYNCISOSYNC 0x00004000 /* o_sync is REALLY o_sync */
  92. /* (osyncisdsync is now default) */
  93. #define XFSMNT_32BITINODES 0x00200000 /* restrict inodes to 32
  94. * bits of address space */
  95. #define XFSMNT_GQUOTA 0x00400000 /* group quota accounting */
  96. #define XFSMNT_GQUOTAENF 0x00800000 /* group quota limit
  97. * enforcement */
  98. #define XFSMNT_NOUUID 0x01000000 /* Ignore fs uuid */
  99. #define XFSMNT_DMAPI 0x02000000 /* enable dmapi/xdsm */
  100. #define XFSMNT_NOLOGFLUSH 0x04000000 /* Don't flush for log blocks */
  101. #define XFSMNT_IDELETE 0x08000000 /* inode cluster delete */
  102. #define XFSMNT_SWALLOC 0x10000000 /* turn on stripe width
  103. * allocation */
  104. #define XFSMNT_IHASHSIZE 0x20000000 /* inode hash table size */
  105. #define XFSMNT_DIRSYNC 0x40000000 /* sync creat,link,unlink,rename
  106. * symlink,mkdir,rmdir,mknod */
  107. #endif /* __XFS_CLNT_H__ */