diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-13 14:40:24 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-13 14:40:24 -0400 |
| commit | 239dab4636f7f5f971ac39b5ca84254cff112cac (patch) | |
| tree | ba16a01035dd13bb87795911da436b6295f9b341 /Documentation/filesystems | |
| parent | f1c410885288e0042099960ee9e0c260dfea4cfb (diff) | |
| parent | c31ad439e8d111bf911c9cc80619cebde411a44d (diff) | |
Merge tag 'for-linus-v3.11-rc1-2' of git://oss.sgi.com/xfs/xfs
Pull more xfs updates from Ben Myers:
"Here are a fix for xfs_fsr, a cleanup in bulkstat, a cleanup in
xfs_open_by_handle, updated mount options documentation, a cleanup in
xfs_bmapi_write, a fix for the size of dquot log reservations, a fix
for sgid inheritance when acls are in use, a fix for cleaning up
quotainfo structures, and some more of the work which allows group and
project quotas to be used together.
We had a few more in this last quota category that we might have liked
to get in, but it looks there are still a few items that need to be
addressed.
- fix for xfs_fsr returning -EINVAL
- cleanup in xfs_bulkstat
- cleanup in xfs_open_by_handle
- update mount options documentation
- clean up local format handling in xfs_bmapi_write
- fix dquot log reservations which were too small
- fix sgid inheritance for subdirectories when default acls are in use
- add project quota fields to various structures
- fix teardown of quotainfo structures when quotas are turned off"
* tag 'for-linus-v3.11-rc1-2' of git://oss.sgi.com/xfs/xfs:
xfs: Fix the logic check for all quotas being turned off
xfs: Add pquota fields where gquota is used.
xfs: fix sgid inheritance for subdirectories inheriting default acls [V3]
xfs: dquot log reservations are too small
xfs: remove local fork format handling from xfs_bmapi_write()
xfs: update mount options documentation
xfs: use get_unused_fd_flags(0) instead of get_unused_fd()
xfs: clean up unused codes at xfs_bulkstat()
xfs: use XFS_BMAP_BMDR_SPACE vs. XFS_BROOT_SIZE_ADJ
Diffstat (limited to 'Documentation/filesystems')
| -rw-r--r-- | Documentation/filesystems/xfs.txt | 317 |
1 files changed, 209 insertions, 108 deletions
diff --git a/Documentation/filesystems/xfs.txt b/Documentation/filesystems/xfs.txt index 83577f0232a0..12525b17d9ed 100644 --- a/Documentation/filesystems/xfs.txt +++ b/Documentation/filesystems/xfs.txt | |||
| @@ -18,6 +18,8 @@ Mount Options | |||
| 18 | ============= | 18 | ============= |
| 19 | 19 | ||
| 20 | When mounting an XFS filesystem, the following options are accepted. | 20 | When mounting an XFS filesystem, the following options are accepted. |
| 21 | For boolean mount options, the names with the (*) suffix is the | ||
| 22 | default behaviour. | ||
| 21 | 23 | ||
| 22 | allocsize=size | 24 | allocsize=size |
| 23 | Sets the buffered I/O end-of-file preallocation size when | 25 | Sets the buffered I/O end-of-file preallocation size when |
| @@ -25,97 +27,128 @@ When mounting an XFS filesystem, the following options are accepted. | |||
| 25 | Valid values for this option are page size (typically 4KiB) | 27 | Valid values for this option are page size (typically 4KiB) |
| 26 | through to 1GiB, inclusive, in power-of-2 increments. | 28 | through to 1GiB, inclusive, in power-of-2 increments. |
| 27 | 29 | ||
| 28 | attr2/noattr2 | 30 | The default behaviour is for dynamic end-of-file |
| 29 | The options enable/disable (default is disabled for backward | 31 | preallocation size, which uses a set of heuristics to |
| 30 | compatibility on-disk) an "opportunistic" improvement to be | 32 | optimise the preallocation size based on the current |
| 31 | made in the way inline extended attributes are stored on-disk. | 33 | allocation patterns within the file and the access patterns |
| 32 | When the new form is used for the first time (by setting or | 34 | to the file. Specifying a fixed allocsize value turns off |
| 33 | removing extended attributes) the on-disk superblock feature | 35 | the dynamic behaviour. |
| 34 | bit field will be updated to reflect this format being in use. | 36 | |
| 37 | attr2 | ||
| 38 | noattr2 | ||
| 39 | The options enable/disable an "opportunistic" improvement to | ||
| 40 | be made in the way inline extended attributes are stored | ||
| 41 | on-disk. When the new form is used for the first time when | ||
| 42 | attr2 is selected (either when setting or removing extended | ||
| 43 | attributes) the on-disk superblock feature bit field will be | ||
| 44 | updated to reflect this format being in use. | ||
| 45 | |||
| 46 | The default behaviour is determined by the on-disk feature | ||
| 47 | bit indicating that attr2 behaviour is active. If either | ||
| 48 | mount option it set, then that becomes the new default used | ||
| 49 | by the filesystem. | ||
| 35 | 50 | ||
| 36 | CRC enabled filesystems always use the attr2 format, and so | 51 | CRC enabled filesystems always use the attr2 format, and so |
| 37 | will reject the noattr2 mount option if it is set. | 52 | will reject the noattr2 mount option if it is set. |
| 38 | 53 | ||
| 39 | barrier | 54 | barrier (*) |
| 40 | Enables the use of block layer write barriers for writes into | 55 | nobarrier |
| 41 | the journal and unwritten extent conversion. This allows for | 56 | Enables/disables the use of block layer write barriers for |
| 42 | drive level write caching to be enabled, for devices that | 57 | writes into the journal and for data integrity operations. |
| 43 | support write barriers. | 58 | This allows for drive level write caching to be enabled, for |
| 59 | devices that support write barriers. | ||
| 44 | 60 | ||
| 45 | discard | 61 | discard |
| 46 | Issue command to let the block device reclaim space freed by the | 62 | nodiscard (*) |
| 47 | filesystem. This is useful for SSD devices, thinly provisioned | 63 | Enable/disable the issuing of commands to let the block |
| 48 | LUNs and virtual machine images, but may have a performance | 64 | device reclaim space freed by the filesystem. This is |
| 49 | impact. | 65 | useful for SSD devices, thinly provisioned LUNs and virtual |
| 50 | 66 | machine images, but may have a performance impact. | |
| 51 | dmapi | 67 | |
| 52 | Enable the DMAPI (Data Management API) event callouts. | 68 | Note: It is currently recommended that you use the fstrim |
| 53 | Use with the "mtpt" option. | 69 | application to discard unused blocks rather than the discard |
| 54 | 70 | mount option because the performance impact of this option | |
| 55 | grpid/bsdgroups and nogrpid/sysvgroups | 71 | is quite severe. |
| 56 | These options define what group ID a newly created file gets. | 72 | |
| 57 | When grpid is set, it takes the group ID of the directory in | 73 | grpid/bsdgroups |
| 58 | which it is created; otherwise (the default) it takes the fsgid | 74 | nogrpid/sysvgroups (*) |
| 59 | of the current process, unless the directory has the setgid bit | 75 | These options define what group ID a newly created file |
| 60 | set, in which case it takes the gid from the parent directory, | 76 | gets. When grpid is set, it takes the group ID of the |
| 61 | and also gets the setgid bit set if it is a directory itself. | 77 | directory in which it is created; otherwise it takes the |
| 62 | 78 | fsgid of the current process, unless the directory has the | |
| 63 | ihashsize=value | 79 | setgid bit set, in which case it takes the gid from the |
| 64 | In memory inode hashes have been removed, so this option has | 80 | parent directory, and also gets the setgid bit set if it is |
| 65 | no function as of August 2007. Option is deprecated. | 81 | a directory itself. |
| 66 | 82 | ||
| 67 | ikeep/noikeep | 83 | filestreams |
| 68 | When ikeep is specified, XFS does not delete empty inode clusters | 84 | Make the data allocator use the filestreams allocation mode |
| 69 | and keeps them around on disk. ikeep is the traditional XFS | 85 | across the entire filesystem rather than just on directories |
| 70 | behaviour. When noikeep is specified, empty inode clusters | 86 | configured to use it. |
| 71 | are returned to the free space pool. The default is noikeep for | 87 | |
| 72 | non-DMAPI mounts, while ikeep is the default when DMAPI is in use. | 88 | ikeep |
| 73 | 89 | noikeep (*) | |
| 74 | inode64 | 90 | When ikeep is specified, XFS does not delete empty inode |
| 75 | Indicates that XFS is allowed to create inodes at any location | 91 | clusters and keeps them around on disk. When noikeep is |
| 76 | in the filesystem, including those which will result in inode | 92 | specified, empty inode clusters are returned to the free |
| 77 | numbers occupying more than 32 bits of significance. This is | 93 | space pool. |
| 78 | the default allocation option. Applications which do not handle | ||
| 79 | inode numbers bigger than 32 bits, should use inode32 option. | ||
| 80 | 94 | ||
| 81 | inode32 | 95 | inode32 |
| 82 | Indicates that XFS is limited to create inodes at locations which | 96 | inode64 (*) |
| 83 | will not result in inode numbers with more than 32 bits of | 97 | When inode32 is specified, it indicates that XFS limits |
| 84 | significance. This is provided for backwards compatibility, since | 98 | inode creation to locations which will not result in inode |
| 85 | 64 bits inode numbers might cause problems for some applications | 99 | numbers with more than 32 bits of significance. |
| 86 | that cannot handle large inode numbers. | 100 | |
| 87 | 101 | When inode64 is specified, it indicates that XFS is allowed | |
| 88 | largeio/nolargeio | 102 | to create inodes at any location in the filesystem, |
| 103 | including those which will result in inode numbers occupying | ||
| 104 | more than 32 bits of significance. | ||
| 105 | |||
| 106 | inode32 is provided for backwards compatibility with older | ||
| 107 | systems and applications, since 64 bits inode numbers might | ||
| 108 | cause problems for some applications that cannot handle | ||
| 109 | large inode numbers. If applications are in use which do | ||
| 110 | not handle inode numbers bigger than 32 bits, the inode32 | ||
| 111 | option should be specified. | ||
| 112 | |||
| 113 | |||
| 114 | largeio | ||
| 115 | nolargeio (*) | ||
| 89 | If "nolargeio" is specified, the optimal I/O reported in | 116 | If "nolargeio" is specified, the optimal I/O reported in |
| 90 | st_blksize by stat(2) will be as small as possible to allow user | 117 | st_blksize by stat(2) will be as small as possible to allow |
| 91 | applications to avoid inefficient read/modify/write I/O. | 118 | user applications to avoid inefficient read/modify/write |
| 92 | If "largeio" specified, a filesystem that has a "swidth" specified | 119 | I/O. This is typically the page size of the machine, as |
| 93 | will return the "swidth" value (in bytes) in st_blksize. If the | 120 | this is the granularity of the page cache. |
| 94 | filesystem does not have a "swidth" specified but does specify | 121 | |
| 95 | an "allocsize" then "allocsize" (in bytes) will be returned | 122 | If "largeio" specified, a filesystem that was created with a |
| 96 | instead. | 123 | "swidth" specified will return the "swidth" value (in bytes) |
| 97 | If neither of these two options are specified, then filesystem | 124 | in st_blksize. If the filesystem does not have a "swidth" |
| 98 | will behave as if "nolargeio" was specified. | 125 | specified but does specify an "allocsize" then "allocsize" |
| 126 | (in bytes) will be returned instead. Otherwise the behaviour | ||
| 127 | is the same as if "nolargeio" was specified. | ||
| 99 | 128 | ||
| 100 | logbufs=value | 129 | logbufs=value |
| 101 | Set the number of in-memory log buffers. Valid numbers range | 130 | Set the number of in-memory log buffers. Valid numbers |
| 102 | from 2-8 inclusive. | 131 | range from 2-8 inclusive. |
| 103 | The default value is 8 buffers for filesystems with a | 132 | |
| 104 | blocksize of 64KiB, 4 buffers for filesystems with a blocksize | 133 | The default value is 8 buffers. |
| 105 | of 32KiB, 3 buffers for filesystems with a blocksize of 16KiB | 134 | |
| 106 | and 2 buffers for all other configurations. Increasing the | 135 | If the memory cost of 8 log buffers is too high on small |
| 107 | number of buffers may increase performance on some workloads | 136 | systems, then it may be reduced at some cost to performance |
| 108 | at the cost of the memory used for the additional log buffers | 137 | on metadata intensive workloads. The logbsize option below |
| 109 | and their associated control structures. | 138 | controls the size of each buffer and so is also relevent to |
| 139 | this case. | ||
| 110 | 140 | ||
| 111 | logbsize=value | 141 | logbsize=value |
| 112 | Set the size of each in-memory log buffer. | 142 | Set the size of each in-memory log buffer. The size may be |
| 113 | Size may be specified in bytes, or in kilobytes with a "k" suffix. | 143 | specified in bytes, or in kilobytes with a "k" suffix. |
| 114 | Valid sizes for version 1 and version 2 logs are 16384 (16k) and | 144 | Valid sizes for version 1 and version 2 logs are 16384 (16k) |
| 115 | 32768 (32k). Valid sizes for version 2 logs also include | 145 | and 32768 (32k). Valid sizes for version 2 logs also |
| 116 | 65536 (64k), 131072 (128k) and 262144 (256k). | 146 | include 65536 (64k), 131072 (128k) and 262144 (256k). The |
| 117 | The default value for machines with more than 32MiB of memory | 147 | logbsize must be an integer multiple of the log |
| 118 | is 32768, machines with less memory use 16384 by default. | 148 | stripe unit configured at mkfs time. |
| 149 | |||
| 150 | The default value for for version 1 logs is 32768, while the | ||
| 151 | default value for version 2 logs is MAX(32768, log_sunit). | ||
| 119 | 152 | ||
| 120 | logdev=device and rtdev=device | 153 | logdev=device and rtdev=device |
| 121 | Use an external log (metadata journal) and/or real-time device. | 154 | Use an external log (metadata journal) and/or real-time device. |
| @@ -124,16 +157,11 @@ When mounting an XFS filesystem, the following options are accepted. | |||
| 124 | optional, and the log section can be separate from the data | 157 | optional, and the log section can be separate from the data |
| 125 | section or contained within it. | 158 | section or contained within it. |
| 126 | 159 | ||
| 127 | mtpt=mountpoint | ||
| 128 | Use with the "dmapi" option. The value specified here will be | ||
| 129 | included in the DMAPI mount event, and should be the path of | ||
| 130 | the actual mountpoint that is used. | ||
| 131 | |||
| 132 | noalign | 160 | noalign |
| 133 | Data allocations will not be aligned at stripe unit boundaries. | 161 | Data allocations will not be aligned at stripe unit |
| 134 | 162 | boundaries. This is only relevant to filesystems created | |
| 135 | noatime | 163 | with non-zero data alignment parameters (sunit, swidth) by |
| 136 | Access timestamps are not updated when a file is read. | 164 | mkfs. |
| 137 | 165 | ||
| 138 | norecovery | 166 | norecovery |
| 139 | The filesystem will be mounted without running log recovery. | 167 | The filesystem will be mounted without running log recovery. |
| @@ -144,8 +172,14 @@ When mounting an XFS filesystem, the following options are accepted. | |||
| 144 | the mount will fail. | 172 | the mount will fail. |
| 145 | 173 | ||
| 146 | nouuid | 174 | nouuid |
| 147 | Don't check for double mounted file systems using the file system uuid. | 175 | Don't check for double mounted file systems using the file |
| 148 | This is useful to mount LVM snapshot volumes. | 176 | system uuid. This is useful to mount LVM snapshot volumes, |
| 177 | and often used in combination with "norecovery" for mounting | ||
| 178 | read-only snapshots. | ||
| 179 | |||
| 180 | noquota | ||
| 181 | Forcibly turns off all quota accounting and enforcement | ||
| 182 | within the filesystem. | ||
| 149 | 183 | ||
| 150 | uquota/usrquota/uqnoenforce/quota | 184 | uquota/usrquota/uqnoenforce/quota |
| 151 | User disk quota accounting enabled, and limits (optionally) | 185 | User disk quota accounting enabled, and limits (optionally) |
| @@ -160,24 +194,64 @@ When mounting an XFS filesystem, the following options are accepted. | |||
| 160 | enforced. Refer to xfs_quota(8) for further details. | 194 | enforced. Refer to xfs_quota(8) for further details. |
| 161 | 195 | ||
| 162 | sunit=value and swidth=value | 196 | sunit=value and swidth=value |
| 163 | Used to specify the stripe unit and width for a RAID device or | 197 | Used to specify the stripe unit and width for a RAID device |
| 164 | a stripe volume. "value" must be specified in 512-byte block | 198 | or a stripe volume. "value" must be specified in 512-byte |
| 165 | units. | 199 | block units. These options are only relevant to filesystems |
| 166 | If this option is not specified and the filesystem was made on | 200 | that were created with non-zero data alignment parameters. |
| 167 | a stripe volume or the stripe width or unit were specified for | 201 | |
| 168 | the RAID device at mkfs time, then the mount system call will | 202 | The sunit and swidth parameters specified must be compatible |
| 169 | restore the value from the superblock. For filesystems that | 203 | with the existing filesystem alignment characteristics. In |
| 170 | are made directly on RAID devices, these options can be used | 204 | general, that means the only valid changes to sunit are |
| 171 | to override the information in the superblock if the underlying | 205 | increasing it by a power-of-2 multiple. Valid swidth values |
| 172 | disk layout changes after the filesystem has been created. | 206 | are any integer multiple of a valid sunit value. |
| 173 | The "swidth" option is required if the "sunit" option has been | 207 | |
| 174 | specified, and must be a multiple of the "sunit" value. | 208 | Typically the only time these mount options are necessary if |
| 209 | after an underlying RAID device has had it's geometry | ||
| 210 | modified, such as adding a new disk to a RAID5 lun and | ||
| 211 | reshaping it. | ||
| 175 | 212 | ||
| 176 | swalloc | 213 | swalloc |
| 177 | Data allocations will be rounded up to stripe width boundaries | 214 | Data allocations will be rounded up to stripe width boundaries |
| 178 | when the current end of file is being extended and the file | 215 | when the current end of file is being extended and the file |
| 179 | size is larger than the stripe width size. | 216 | size is larger than the stripe width size. |
| 180 | 217 | ||
| 218 | wsync | ||
| 219 | When specified, all filesystem namespace operations are | ||
| 220 | executed synchronously. This ensures that when the namespace | ||
| 221 | operation (create, unlink, etc) completes, the change to the | ||
| 222 | namespace is on stable storage. This is useful in HA setups | ||
| 223 | where failover must not result in clients seeing | ||
| 224 | inconsistent namespace presentation during or after a | ||
| 225 | failover event. | ||
| 226 | |||
| 227 | |||
| 228 | Deprecated Mount Options | ||
| 229 | ======================== | ||
| 230 | |||
| 231 | delaylog/nodelaylog | ||
| 232 | Delayed logging is the only logging method that XFS supports | ||
| 233 | now, so these mount options are now ignored. | ||
| 234 | |||
| 235 | Due for removal in 3.12. | ||
| 236 | |||
| 237 | ihashsize=value | ||
| 238 | In memory inode hashes have been removed, so this option has | ||
| 239 | no function as of August 2007. Option is deprecated. | ||
| 240 | |||
| 241 | Due for removal in 3.12. | ||
| 242 | |||
| 243 | irixsgid | ||
| 244 | This behaviour is now controlled by a sysctl, so the mount | ||
| 245 | option is ignored. | ||
| 246 | |||
| 247 | Due for removal in 3.12. | ||
| 248 | |||
| 249 | osyncisdsync | ||
| 250 | osyncisosync | ||
| 251 | O_SYNC and O_DSYNC are fully supported, so there is no need | ||
| 252 | for these options any more. | ||
| 253 | |||
| 254 | Due for removal in 3.12. | ||
| 181 | 255 | ||
| 182 | sysctls | 256 | sysctls |
| 183 | ======= | 257 | ======= |
| @@ -189,15 +263,20 @@ The following sysctls are available for the XFS filesystem: | |||
| 189 | in /proc/fs/xfs/stat. It then immediately resets to "0". | 263 | in /proc/fs/xfs/stat. It then immediately resets to "0". |
| 190 | 264 | ||
| 191 | fs.xfs.xfssyncd_centisecs (Min: 100 Default: 3000 Max: 720000) | 265 | fs.xfs.xfssyncd_centisecs (Min: 100 Default: 3000 Max: 720000) |
| 192 | The interval at which the xfssyncd thread flushes metadata | 266 | The interval at which the filesystem flushes metadata |
| 193 | out to disk. This thread will flush log activity out, and | 267 | out to disk and runs internal cache cleanup routines. |
| 194 | do some processing on unlinked inodes. | ||
| 195 | 268 | ||
| 196 | fs.xfs.xfsbufd_centisecs (Min: 50 Default: 100 Max: 3000) | 269 | fs.xfs.filestream_centisecs (Min: 1 Default: 3000 Max: 360000) |
| 197 | The interval at which xfsbufd scans the dirty metadata buffers list. | 270 | The interval at which the filesystem ages filestreams cache |
| 271 | references and returns timed-out AGs back to the free stream | ||
| 272 | pool. | ||
| 198 | 273 | ||
| 199 | fs.xfs.age_buffer_centisecs (Min: 100 Default: 1500 Max: 720000) | 274 | fs.xfs.speculative_prealloc_lifetime |
| 200 | The age at which xfsbufd flushes dirty metadata buffers to disk. | 275 | (Units: seconds Min: 1 Default: 300 Max: 86400) |
| 276 | The interval at which the background scanning for inodes | ||
| 277 | with unused speculative preallocation runs. The scan | ||
| 278 | removes unused preallocation from clean inodes and releases | ||
| 279 | the unused space back to the free pool. | ||
| 201 | 280 | ||
| 202 | fs.xfs.error_level (Min: 0 Default: 3 Max: 11) | 281 | fs.xfs.error_level (Min: 0 Default: 3 Max: 11) |
| 203 | A volume knob for error reporting when internal errors occur. | 282 | A volume knob for error reporting when internal errors occur. |
| @@ -254,9 +333,31 @@ The following sysctls are available for the XFS filesystem: | |||
| 254 | by the xfs_io(8) chattr command on a directory to be | 333 | by the xfs_io(8) chattr command on a directory to be |
| 255 | inherited by files in that directory. | 334 | inherited by files in that directory. |
| 256 | 335 | ||
| 336 | fs.xfs.inherit_nodefrag (Min: 0 Default: 1 Max: 1) | ||
| 337 | Setting this to "1" will cause the "nodefrag" flag set | ||
| 338 | by the xfs_io(8) chattr command on a directory to be | ||
| 339 | inherited by files in that directory. | ||
| 340 | |||
| 257 | fs.xfs.rotorstep (Min: 1 Default: 1 Max: 256) | 341 | fs.xfs.rotorstep (Min: 1 Default: 1 Max: 256) |
| 258 | In "inode32" allocation mode, this option determines how many | 342 | In "inode32" allocation mode, this option determines how many |
| 259 | files the allocator attempts to allocate in the same allocation | 343 | files the allocator attempts to allocate in the same allocation |
| 260 | group before moving to the next allocation group. The intent | 344 | group before moving to the next allocation group. The intent |
| 261 | is to control the rate at which the allocator moves between | 345 | is to control the rate at which the allocator moves between |
| 262 | allocation groups when allocating extents for new files. | 346 | allocation groups when allocating extents for new files. |
| 347 | |||
| 348 | Deprecated Sysctls | ||
| 349 | ================== | ||
| 350 | |||
| 351 | fs.xfs.xfsbufd_centisecs (Min: 50 Default: 100 Max: 3000) | ||
| 352 | Dirty metadata is now tracked by the log subsystem and | ||
| 353 | flushing is driven by log space and idling demands. The | ||
| 354 | xfsbufd no longer exists, so this syctl does nothing. | ||
| 355 | |||
| 356 | Due for removal in 3.14. | ||
| 357 | |||
| 358 | fs.xfs.age_buffer_centisecs (Min: 100 Default: 1500 Max: 720000) | ||
| 359 | Dirty metadata is now tracked by the log subsystem and | ||
| 360 | flushing is driven by log space and idling demands. The | ||
| 361 | xfsbufd no longer exists, so this syctl does nothing. | ||
| 362 | |||
| 363 | Due for removal in 3.14. | ||
