Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'xfs-5.3-merge-13' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs cleanups from Darrick Wong:
"We had a few more lateish cleanup patches come in for 5.3 -- a couple
of syncups with the userspace libxfs code and a conversion of the XFS
administrator's guide to ReST format.

Summary:

- Bring fs/xfs/libxfs/xfs_trans_inode.c in sync with userspace
libxfs.

- Convert the xfs administrator guide to rst and move it into the
official admin guide under Documentation"

* tag 'xfs-5.3-merge-13' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
Documentation: filesystem: Convert xfs.txt to ReST
xfs: sync up xfs_trans_inode with userspace
xfs: move xfs_trans_inode.c to libxfs/

+73 -73
+1
Documentation/admin-guide/index.rst
··· 77 77 blockdev/index 78 78 ext4 79 79 binderfs 80 + xfs 80 81 pm/index 81 82 thunderbolt 82 83 LSM/index
+1 -1
Documentation/filesystems/dax.txt
··· 76 76 These filesystems may be used for inspiration: 77 77 - ext2: see Documentation/filesystems/ext2.txt 78 78 - ext4: see Documentation/filesystems/ext4/ 79 - - xfs: see Documentation/filesystems/xfs.txt 79 + - xfs: see Documentation/admin-guide/xfs.rst 80 80 81 81 82 82 Handling Media Errors
+64 -68
Documentation/filesystems/xfs.txt Documentation/admin-guide/xfs.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0 1 2 3 + ====================== 2 4 The SGI XFS Filesystem 3 5 ====================== 4 6 ··· 20 18 ============= 21 19 22 20 When mounting an XFS filesystem, the following options are accepted. 23 - For boolean mount options, the names with the (*) suffix is the 24 - default behaviour. 25 21 26 22 allocsize=size 27 23 Sets the buffered I/O end-of-file preallocation size when ··· 31 31 preallocation size, which uses a set of heuristics to 32 32 optimise the preallocation size based on the current 33 33 allocation patterns within the file and the access patterns 34 - to the file. Specifying a fixed allocsize value turns off 34 + to the file. Specifying a fixed ``allocsize`` value turns off 35 35 the dynamic behaviour. 36 36 37 - attr2 38 - noattr2 37 + attr2 or noattr2 39 38 The options enable/disable an "opportunistic" improvement to 40 39 be made in the way inline extended attributes are stored 41 40 on-disk. When the new form is used for the first time when 42 - attr2 is selected (either when setting or removing extended 41 + ``attr2`` is selected (either when setting or removing extended 43 42 attributes) the on-disk superblock feature bit field will be 44 43 updated to reflect this format being in use. 45 44 46 45 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 46 + bit indicating that ``attr2`` behaviour is active. If either 47 + mount option is set, then that becomes the new default used 49 48 by the filesystem. 50 49 51 - CRC enabled filesystems always use the attr2 format, and so 52 - will reject the noattr2 mount option if it is set. 50 + CRC enabled filesystems always use the ``attr2`` format, and so 51 + will reject the ``noattr2`` mount option if it is set. 53 52 54 - discard 55 - nodiscard (*) 53 + discard or nodiscard (default) 56 54 Enable/disable the issuing of commands to let the block 57 55 device reclaim space freed by the filesystem. This is 58 56 useful for SSD devices, thinly provisioned LUNs and virtual 59 57 machine images, but may have a performance impact. 60 58 61 - Note: It is currently recommended that you use the fstrim 62 - application to discard unused blocks rather than the discard 59 + Note: It is currently recommended that you use the ``fstrim`` 60 + application to ``discard`` unused blocks rather than the ``discard`` 63 61 mount option because the performance impact of this option 64 62 is quite severe. 65 63 66 - grpid/bsdgroups 67 - nogrpid/sysvgroups (*) 64 + grpid/bsdgroups or nogrpid/sysvgroups (default) 68 65 These options define what group ID a newly created file 69 - gets. When grpid is set, it takes the group ID of the 66 + gets. When ``grpid`` is set, it takes the group ID of the 70 67 directory in which it is created; otherwise it takes the 71 - fsgid of the current process, unless the directory has the 72 - setgid bit set, in which case it takes the gid from the 73 - parent directory, and also gets the setgid bit set if it is 68 + ``fsgid`` of the current process, unless the directory has the 69 + ``setgid`` bit set, in which case it takes the ``gid`` from the 70 + parent directory, and also gets the ``setgid`` bit set if it is 74 71 a directory itself. 75 72 76 73 filestreams ··· 75 78 across the entire filesystem rather than just on directories 76 79 configured to use it. 77 80 78 - ikeep 79 - noikeep (*) 80 - When ikeep is specified, XFS does not delete empty inode 81 - clusters and keeps them around on disk. When noikeep is 81 + ikeep or noikeep (default) 82 + When ``ikeep`` is specified, XFS does not delete empty inode 83 + clusters and keeps them around on disk. When ``noikeep`` is 82 84 specified, empty inode clusters are returned to the free 83 85 space pool. 84 86 85 - inode32 86 - inode64 (*) 87 - When inode32 is specified, it indicates that XFS limits 87 + inode32 or inode64 (default) 88 + When ``inode32`` is specified, it indicates that XFS limits 88 89 inode creation to locations which will not result in inode 89 90 numbers with more than 32 bits of significance. 90 91 91 - When inode64 is specified, it indicates that XFS is allowed 92 + When ``inode64`` is specified, it indicates that XFS is allowed 92 93 to create inodes at any location in the filesystem, 93 94 including those which will result in inode numbers occupying 94 - more than 32 bits of significance. 95 + more than 32 bits of significance. 95 96 96 - inode32 is provided for backwards compatibility with older 97 + ``inode32`` is provided for backwards compatibility with older 97 98 systems and applications, since 64 bits inode numbers might 98 99 cause problems for some applications that cannot handle 99 100 large inode numbers. If applications are in use which do 100 - not handle inode numbers bigger than 32 bits, the inode32 101 + not handle inode numbers bigger than 32 bits, the ``inode32`` 101 102 option should be specified. 102 103 103 - 104 - largeio 105 - nolargeio (*) 106 - If "nolargeio" is specified, the optimal I/O reported in 107 - st_blksize by stat(2) will be as small as possible to allow 104 + largeio or nolargeio (default) 105 + If ``nolargeio`` is specified, the optimal I/O reported in 106 + ``st_blksize`` by **stat(2)** will be as small as possible to allow 108 107 user applications to avoid inefficient read/modify/write 109 108 I/O. This is typically the page size of the machine, as 110 109 this is the granularity of the page cache. 111 110 112 - If "largeio" specified, a filesystem that was created with a 113 - "swidth" specified will return the "swidth" value (in bytes) 114 - in st_blksize. If the filesystem does not have a "swidth" 115 - specified but does specify an "allocsize" then "allocsize" 111 + If ``largeio`` is specified, a filesystem that was created with a 112 + ``swidth`` specified will return the ``swidth`` value (in bytes) 113 + in ``st_blksize``. If the filesystem does not have a ``swidth`` 114 + specified but does specify an ``allocsize`` then ``allocsize`` 116 115 (in bytes) will be returned instead. Otherwise the behaviour 117 - is the same as if "nolargeio" was specified. 116 + is the same as if ``nolargeio`` was specified. 118 117 119 118 logbufs=value 120 119 Set the number of in-memory log buffers. Valid numbers ··· 120 127 121 128 If the memory cost of 8 log buffers is too high on small 122 129 systems, then it may be reduced at some cost to performance 123 - on metadata intensive workloads. The logbsize option below 130 + on metadata intensive workloads. The ``logbsize`` option below 124 131 controls the size of each buffer and so is also relevant to 125 132 this case. 126 133 ··· 131 138 and 32768 (32k). Valid sizes for version 2 logs also 132 139 include 65536 (64k), 131072 (128k) and 262144 (256k). The 133 140 logbsize must be an integer multiple of the log 134 - stripe unit configured at mkfs time. 141 + stripe unit configured at **mkfs(8)** time. 135 142 136 143 The default value for for version 1 logs is 32768, while the 137 144 default value for version 2 logs is MAX(32768, log_sunit). ··· 146 153 noalign 147 154 Data allocations will not be aligned at stripe unit 148 155 boundaries. This is only relevant to filesystems created 149 - with non-zero data alignment parameters (sunit, swidth) by 150 - mkfs. 156 + with non-zero data alignment parameters (``sunit``, ``swidth``) by 157 + **mkfs(8)**. 151 158 152 159 norecovery 153 160 The filesystem will be mounted without running log recovery. 154 161 If the filesystem was not cleanly unmounted, it is likely to 155 - be inconsistent when mounted in "norecovery" mode. 162 + be inconsistent when mounted in ``norecovery`` mode. 156 163 Some files or directories may not be accessible because of this. 157 - Filesystems mounted "norecovery" must be mounted read-only or 164 + Filesystems mounted ``norecovery`` must be mounted read-only or 158 165 the mount will fail. 159 166 160 167 nouuid 161 168 Don't check for double mounted file systems using the file 162 - system uuid. This is useful to mount LVM snapshot volumes, 163 - and often used in combination with "norecovery" for mounting 169 + system ``uuid``. This is useful to mount LVM snapshot volumes, 170 + and often used in combination with ``norecovery`` for mounting 164 171 read-only snapshots. 165 172 166 173 noquota ··· 169 176 170 177 uquota/usrquota/uqnoenforce/quota 171 178 User disk quota accounting enabled, and limits (optionally) 172 - enforced. Refer to xfs_quota(8) for further details. 179 + enforced. Refer to **xfs_quota(8)** for further details. 173 180 174 181 gquota/grpquota/gqnoenforce 175 182 Group disk quota accounting enabled and limits (optionally) 176 - enforced. Refer to xfs_quota(8) for further details. 183 + enforced. Refer to **xfs_quota(8)** for further details. 177 184 178 185 pquota/prjquota/pqnoenforce 179 186 Project disk quota accounting enabled and limits (optionally) 180 - enforced. Refer to xfs_quota(8) for further details. 187 + enforced. Refer to **xfs_quota(8)** for further details. 181 188 182 189 sunit=value and swidth=value 183 190 Used to specify the stripe unit and width for a RAID device ··· 185 192 block units. These options are only relevant to filesystems 186 193 that were created with non-zero data alignment parameters. 187 194 188 - The sunit and swidth parameters specified must be compatible 195 + The ``sunit`` and ``swidth`` parameters specified must be compatible 189 196 with the existing filesystem alignment characteristics. In 190 - general, that means the only valid changes to sunit are 191 - increasing it by a power-of-2 multiple. Valid swidth values 192 - are any integer multiple of a valid sunit value. 197 + general, that means the only valid changes to ``sunit`` are 198 + increasing it by a power-of-2 multiple. Valid ``swidth`` values 199 + are any integer multiple of a valid ``sunit`` value. 193 200 194 201 Typically the only time these mount options are necessary if 195 202 after an underlying RAID device has had it's geometry ··· 214 221 Deprecated Mount Options 215 222 ======================== 216 223 224 + =========================== ================ 217 225 Name Removal Schedule 218 - ---- ---------------- 226 + =========================== ================ 227 + =========================== ================ 219 228 220 229 221 230 Removed Mount Options 222 231 ===================== 223 232 233 + =========================== ======= 224 234 Name Removed 225 - ---- ------- 235 + =========================== ======= 226 236 delaylog/nodelaylog v4.0 227 237 ihashsize v4.0 228 238 irixsgid v4.0 229 239 osyncisdsync/osyncisosync v4.0 230 240 barrier v4.19 231 241 nobarrier v4.19 232 - 242 + =========================== ======= 233 243 234 244 sysctls 235 245 ======= ··· 298 302 299 303 fs.xfs.inherit_sync (Min: 0 Default: 1 Max: 1) 300 304 Setting this to "1" will cause the "sync" flag set 301 - by the xfs_io(8) chattr command on a directory to be 305 + by the **xfs_io(8)** chattr command on a directory to be 302 306 inherited by files in that directory. 303 307 304 308 fs.xfs.inherit_nodump (Min: 0 Default: 1 Max: 1) 305 309 Setting this to "1" will cause the "nodump" flag set 306 - by the xfs_io(8) chattr command on a directory to be 310 + by the **xfs_io(8)** chattr command on a directory to be 307 311 inherited by files in that directory. 308 312 309 313 fs.xfs.inherit_noatime (Min: 0 Default: 1 Max: 1) 310 314 Setting this to "1" will cause the "noatime" flag set 311 - by the xfs_io(8) chattr command on a directory to be 315 + by the **xfs_io(8)** chattr command on a directory to be 312 316 inherited by files in that directory. 313 317 314 318 fs.xfs.inherit_nosymlinks (Min: 0 Default: 1 Max: 1) 315 319 Setting this to "1" will cause the "nosymlinks" flag set 316 - by the xfs_io(8) chattr command on a directory to be 320 + by the **xfs_io(8)** chattr command on a directory to be 317 321 inherited by files in that directory. 318 322 319 323 fs.xfs.inherit_nodefrag (Min: 0 Default: 1 Max: 1) 320 324 Setting this to "1" will cause the "nodefrag" flag set 321 - by the xfs_io(8) chattr command on a directory to be 325 + by the **xfs_io(8)** chattr command on a directory to be 322 326 inherited by files in that directory. 323 327 324 328 fs.xfs.rotorstep (Min: 1 Default: 1 Max: 256) ··· 364 368 -error handlers: 365 369 Defines the behavior for a specific error. 366 370 367 - The filesystem behavior during an error can be set via sysfs files. Each 371 + The filesystem behavior during an error can be set via ``sysfs`` files. Each 368 372 error handler works independently - the first condition met by an error handler 369 373 for a specific class will cause the error to be propagated rather than reset and 370 374 retried. ··· 415 419 handler configurations. 416 420 417 421 Note: there is no guarantee that fail_at_unmount can be set while an 418 - unmount is in progress. It is possible that the sysfs entries are 422 + unmount is in progress. It is possible that the ``sysfs`` entries are 419 423 removed by the unmounting filesystem before a "retry forever" error 420 424 handler configuration causes unmount to hang, and hence the filesystem 421 425 must be configured appropriately before unmount begins to prevent ··· 424 428 Each filesystem has specific error class handlers that define the error 425 429 propagation behaviour for specific errors. There is also a "default" error 426 430 handler defined, which defines the behaviour for all errors that don't have 427 - specific handlers defined. Where multiple retry constraints are configuredi for 431 + specific handlers defined. Where multiple retry constraints are configured for 428 432 a single error, the first retry configuration that expires will cause the error 429 433 to be propagated. The handler configurations are found in the directory: 430 434 ··· 459 463 Setting the value to "N" (where 0 < N < Max) will allow XFS to retry the 460 464 operation for up to "N" seconds before propagating the error. 461 465 462 - Note: The default behaviour for a specific error handler is dependent on both 466 + **Note:** The default behaviour for a specific error handler is dependent on both 463 467 the class and error context. For example, the default values for 464 468 "metadata/ENODEV" are "0" rather than "-1" so that this error handler defaults 465 469 to "fail immediately" behaviour. This is done because ENODEV is a fatal,
+1 -2
MAINTAINERS
··· 17651 17651 W: http://xfs.org/ 17652 17652 T: git git://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git 17653 17653 S: Supported 17654 - F: Documentation/filesystems/xfs.txt 17654 + F: Documentation/admin-guide/xfs.rst 17655 17655 F: Documentation/ABI/testing/sysfs-fs-xfs 17656 - F: Documentation/filesystems/xfs.txt 17657 17656 F: Documentation/filesystems/xfs-delayed-logging-design.txt 17658 17657 F: Documentation/filesystems/xfs-self-describing-metadata.txt 17659 17658 F: fs/xfs/
+2 -2
fs/xfs/Makefile
··· 49 49 xfs_refcount_btree.o \ 50 50 xfs_sb.o \ 51 51 xfs_symlink_remote.o \ 52 + xfs_trans_inode.o \ 52 53 xfs_trans_resv.o \ 53 54 xfs_types.o \ 54 55 ) ··· 108 107 xfs_rmap_item.o \ 109 108 xfs_log_recover.o \ 110 109 xfs_trans_ail.o \ 111 - xfs_trans_buf.o \ 112 - xfs_trans_inode.o 110 + xfs_trans_buf.o 113 111 114 112 # optional features 115 113 xfs-$(CONFIG_XFS_QUOTA) += xfs_dquot.o \
+4
fs/xfs/xfs_trans_inode.c fs/xfs/libxfs/xfs_trans_inode.c
··· 66 66 inode->i_mtime = tv; 67 67 if (flags & XFS_ICHGTIME_CHG) 68 68 inode->i_ctime = tv; 69 + if (flags & XFS_ICHGTIME_CREATE) { 70 + ip->i_d.di_crtime.t_sec = (int32_t)tv.tv_sec; 71 + ip->i_d.di_crtime.t_nsec = (int32_t)tv.tv_nsec; 72 + } 69 73 } 70 74 71 75 /*