~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/admin-guide/xfs.rst

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/admin-guide/xfs.rst (Version linux-6.11.5) and /Documentation/admin-guide/xfs.rst (Version linux-5.17.15)


  1 .. SPDX-License-Identifier: GPL-2.0                 1 .. SPDX-License-Identifier: GPL-2.0
  2                                                     2 
  3 ======================                              3 ======================
  4 The SGI XFS Filesystem                              4 The SGI XFS Filesystem
  5 ======================                              5 ======================
  6                                                     6 
  7 XFS is a high performance journaling filesyste      7 XFS is a high performance journaling filesystem which originated
  8 on the SGI IRIX platform.  It is completely mu      8 on the SGI IRIX platform.  It is completely multi-threaded, can
  9 support large files and large filesystems, ext      9 support large files and large filesystems, extended attributes,
 10 variable block sizes, is extent based, and mak     10 variable block sizes, is extent based, and makes extensive use of
 11 Btrees (directories, extents, free space) to a     11 Btrees (directories, extents, free space) to aid both performance
 12 and scalability.                                   12 and scalability.
 13                                                    13 
 14 Refer to the documentation at https://xfs.wiki     14 Refer to the documentation at https://xfs.wiki.kernel.org/
 15 for further details.  This implementation is o     15 for further details.  This implementation is on-disk compatible
 16 with the IRIX version of XFS.                      16 with the IRIX version of XFS.
 17                                                    17 
 18                                                    18 
 19 Mount Options                                      19 Mount Options
 20 =============                                      20 =============
 21                                                    21 
 22 When mounting an XFS filesystem, the following     22 When mounting an XFS filesystem, the following options are accepted.
 23                                                    23 
 24   allocsize=size                                   24   allocsize=size
 25         Sets the buffered I/O end-of-file prea     25         Sets the buffered I/O end-of-file preallocation size when
 26         doing delayed allocation writeout (def     26         doing delayed allocation writeout (default size is 64KiB).
 27         Valid values for this option are page      27         Valid values for this option are page size (typically 4KiB)
 28         through to 1GiB, inclusive, in power-o     28         through to 1GiB, inclusive, in power-of-2 increments.
 29                                                    29 
 30         The default behaviour is for dynamic e     30         The default behaviour is for dynamic end-of-file
 31         preallocation size, which uses a set o     31         preallocation size, which uses a set of heuristics to
 32         optimise the preallocation size based      32         optimise the preallocation size based on the current
 33         allocation patterns within the file an     33         allocation patterns within the file and the access patterns
 34         to the file. Specifying a fixed ``allo     34         to the file. Specifying a fixed ``allocsize`` value turns off
 35         the dynamic behaviour.                     35         the dynamic behaviour.
 36                                                    36 
 37   attr2 or noattr2                                 37   attr2 or noattr2
 38         The options enable/disable an "opportu     38         The options enable/disable an "opportunistic" improvement to
 39         be made in the way inline extended att     39         be made in the way inline extended attributes are stored
 40         on-disk.  When the new form is used fo     40         on-disk.  When the new form is used for the first time when
 41         ``attr2`` is selected (either when set     41         ``attr2`` is selected (either when setting or removing extended
 42         attributes) the on-disk superblock fea     42         attributes) the on-disk superblock feature bit field will be
 43         updated to reflect this format being i     43         updated to reflect this format being in use.
 44                                                    44 
 45         The default behaviour is determined by     45         The default behaviour is determined by the on-disk feature
 46         bit indicating that ``attr2`` behaviou     46         bit indicating that ``attr2`` behaviour is active. If either
 47         mount option is set, then that becomes     47         mount option is set, then that becomes the new default used
 48         by the filesystem.                         48         by the filesystem.
 49                                                    49 
 50         CRC enabled filesystems always use the     50         CRC enabled filesystems always use the ``attr2`` format, and so
 51         will reject the ``noattr2`` mount opti     51         will reject the ``noattr2`` mount option if it is set.
 52                                                    52 
 53   discard or nodiscard (default)                   53   discard or nodiscard (default)
 54         Enable/disable the issuing of commands     54         Enable/disable the issuing of commands to let the block
 55         device reclaim space freed by the file     55         device reclaim space freed by the filesystem.  This is
 56         useful for SSD devices, thinly provisi     56         useful for SSD devices, thinly provisioned LUNs and virtual
 57         machine images, but may have a perform     57         machine images, but may have a performance impact.
 58                                                    58 
 59         Note: It is currently recommended that     59         Note: It is currently recommended that you use the ``fstrim``
 60         application to ``discard`` unused bloc     60         application to ``discard`` unused blocks rather than the ``discard``
 61         mount option because the performance i     61         mount option because the performance impact of this option
 62         is quite severe.                           62         is quite severe.
 63                                                    63 
 64   grpid/bsdgroups or nogrpid/sysvgroups (defau     64   grpid/bsdgroups or nogrpid/sysvgroups (default)
 65         These options define what group ID a n     65         These options define what group ID a newly created file
 66         gets.  When ``grpid`` is set, it takes     66         gets.  When ``grpid`` is set, it takes the group ID of the
 67         directory in which it is created; othe     67         directory in which it is created; otherwise it takes the
 68         ``fsgid`` of the current process, unle     68         ``fsgid`` of the current process, unless the directory has the
 69         ``setgid`` bit set, in which case it t     69         ``setgid`` bit set, in which case it takes the ``gid`` from the
 70         parent directory, and also gets the ``     70         parent directory, and also gets the ``setgid`` bit set if it is
 71         a directory itself.                        71         a directory itself.
 72                                                    72 
 73   filestreams                                      73   filestreams
 74         Make the data allocator use the filest     74         Make the data allocator use the filestreams allocation mode
 75         across the entire filesystem rather th     75         across the entire filesystem rather than just on directories
 76         configured to use it.                      76         configured to use it.
 77                                                    77 
 78   ikeep or noikeep (default)                       78   ikeep or noikeep (default)
 79         When ``ikeep`` is specified, XFS does      79         When ``ikeep`` is specified, XFS does not delete empty inode
 80         clusters and keeps them around on disk     80         clusters and keeps them around on disk.  When ``noikeep`` is
 81         specified, empty inode clusters are re     81         specified, empty inode clusters are returned to the free
 82         space pool.                                82         space pool.
 83                                                    83 
 84   inode32 or inode64 (default)                     84   inode32 or inode64 (default)
 85         When ``inode32`` is specified, it indi     85         When ``inode32`` is specified, it indicates that XFS limits
 86         inode creation to locations which will     86         inode creation to locations which will not result in inode
 87         numbers with more than 32 bits of sign     87         numbers with more than 32 bits of significance.
 88                                                    88 
 89         When ``inode64`` is specified, it indi     89         When ``inode64`` is specified, it indicates that XFS is allowed
 90         to create inodes at any location in th     90         to create inodes at any location in the filesystem,
 91         including those which will result in i     91         including those which will result in inode numbers occupying
 92         more than 32 bits of significance.         92         more than 32 bits of significance.
 93                                                    93 
 94         ``inode32`` is provided for backwards      94         ``inode32`` is provided for backwards compatibility with older
 95         systems and applications, since 64 bit     95         systems and applications, since 64 bits inode numbers might
 96         cause problems for some applications t     96         cause problems for some applications that cannot handle
 97         large inode numbers.  If applications      97         large inode numbers.  If applications are in use which do
 98         not handle inode numbers bigger than 3     98         not handle inode numbers bigger than 32 bits, the ``inode32``
 99         option should be specified.                99         option should be specified.
100                                                   100 
101   largeio or nolargeio (default)                  101   largeio or nolargeio (default)
102         If ``nolargeio`` is specified, the opt    102         If ``nolargeio`` is specified, the optimal I/O reported in
103         ``st_blksize`` by **stat(2)** will be     103         ``st_blksize`` by **stat(2)** will be as small as possible to allow
104         user applications to avoid inefficient    104         user applications to avoid inefficient read/modify/write
105         I/O.  This is typically the page size     105         I/O.  This is typically the page size of the machine, as
106         this is the granularity of the page ca    106         this is the granularity of the page cache.
107                                                   107 
108         If ``largeio`` is specified, a filesys    108         If ``largeio`` is specified, a filesystem that was created with a
109         ``swidth`` specified will return the `    109         ``swidth`` specified will return the ``swidth`` value (in bytes)
110         in ``st_blksize``. If the filesystem d    110         in ``st_blksize``. If the filesystem does not have a ``swidth``
111         specified but does specify an ``allocs    111         specified but does specify an ``allocsize`` then ``allocsize``
112         (in bytes) will be returned instead. O    112         (in bytes) will be returned instead. Otherwise the behaviour
113         is the same as if ``nolargeio`` was sp    113         is the same as if ``nolargeio`` was specified.
114                                                   114 
115   logbufs=value                                   115   logbufs=value
116         Set the number of in-memory log buffer    116         Set the number of in-memory log buffers.  Valid numbers
117         range from 2-8 inclusive.                 117         range from 2-8 inclusive.
118                                                   118 
119         The default value is 8 buffers.           119         The default value is 8 buffers.
120                                                   120 
121         If the memory cost of 8 log buffers is    121         If the memory cost of 8 log buffers is too high on small
122         systems, then it may be reduced at som    122         systems, then it may be reduced at some cost to performance
123         on metadata intensive workloads. The `    123         on metadata intensive workloads. The ``logbsize`` option below
124         controls the size of each buffer and s    124         controls the size of each buffer and so is also relevant to
125         this case.                                125         this case.
126                                                   126 
127   logbsize=value                                  127   logbsize=value
128         Set the size of each in-memory log buf    128         Set the size of each in-memory log buffer.  The size may be
129         specified in bytes, or in kilobytes wi    129         specified in bytes, or in kilobytes with a "k" suffix.
130         Valid sizes for version 1 and version     130         Valid sizes for version 1 and version 2 logs are 16384 (16k)
131         and 32768 (32k).  Valid sizes for vers    131         and 32768 (32k).  Valid sizes for version 2 logs also
132         include 65536 (64k), 131072 (128k) and    132         include 65536 (64k), 131072 (128k) and 262144 (256k). The
133         logbsize must be an integer multiple o    133         logbsize must be an integer multiple of the log
134         stripe unit configured at **mkfs(8)**     134         stripe unit configured at **mkfs(8)** time.
135                                                   135 
136         The default value for version 1 logs i    136         The default value for version 1 logs is 32768, while the
137         default value for version 2 logs is MA    137         default value for version 2 logs is MAX(32768, log_sunit).
138                                                   138 
139   logdev=device and rtdev=device                  139   logdev=device and rtdev=device
140         Use an external log (metadata journal)    140         Use an external log (metadata journal) and/or real-time device.
141         An XFS filesystem has up to three part    141         An XFS filesystem has up to three parts: a data section, a log
142         section, and a real-time section.  The    142         section, and a real-time section.  The real-time section is
143         optional, and the log section can be s    143         optional, and the log section can be separate from the data
144         section or contained within it.           144         section or contained within it.
145                                                   145 
146   noalign                                         146   noalign
147         Data allocations will not be aligned a    147         Data allocations will not be aligned at stripe unit
148         boundaries. This is only relevant to f    148         boundaries. This is only relevant to filesystems created
149         with non-zero data alignment parameter    149         with non-zero data alignment parameters (``sunit``, ``swidth``) by
150         **mkfs(8)**.                              150         **mkfs(8)**.
151                                                   151 
152   norecovery                                      152   norecovery
153         The filesystem will be mounted without    153         The filesystem will be mounted without running log recovery.
154         If the filesystem was not cleanly unmo    154         If the filesystem was not cleanly unmounted, it is likely to
155         be inconsistent when mounted in ``nore    155         be inconsistent when mounted in ``norecovery`` mode.
156         Some files or directories may not be a    156         Some files or directories may not be accessible because of this.
157         Filesystems mounted ``norecovery`` mus    157         Filesystems mounted ``norecovery`` must be mounted read-only or
158         the mount will fail.                      158         the mount will fail.
159                                                   159 
160   nouuid                                          160   nouuid
161         Don't check for double mounted file sy    161         Don't check for double mounted file systems using the file
162         system ``uuid``.  This is useful to mo    162         system ``uuid``.  This is useful to mount LVM snapshot volumes,
163         and often used in combination with ``n    163         and often used in combination with ``norecovery`` for mounting
164         read-only snapshots.                      164         read-only snapshots.
165                                                   165 
166   noquota                                         166   noquota
167         Forcibly turns off all quota accountin    167         Forcibly turns off all quota accounting and enforcement
168         within the filesystem.                    168         within the filesystem.
169                                                   169 
170   uquota/usrquota/uqnoenforce/quota               170   uquota/usrquota/uqnoenforce/quota
171         User disk quota accounting enabled, an    171         User disk quota accounting enabled, and limits (optionally)
172         enforced.  Refer to **xfs_quota(8)** f    172         enforced.  Refer to **xfs_quota(8)** for further details.
173                                                   173 
174   gquota/grpquota/gqnoenforce                     174   gquota/grpquota/gqnoenforce
175         Group disk quota accounting enabled an    175         Group disk quota accounting enabled and limits (optionally)
176         enforced.  Refer to **xfs_quota(8)** f    176         enforced.  Refer to **xfs_quota(8)** for further details.
177                                                   177 
178   pquota/prjquota/pqnoenforce                     178   pquota/prjquota/pqnoenforce
179         Project disk quota accounting enabled     179         Project disk quota accounting enabled and limits (optionally)
180         enforced.  Refer to **xfs_quota(8)** f    180         enforced.  Refer to **xfs_quota(8)** for further details.
181                                                   181 
182   sunit=value and swidth=value                    182   sunit=value and swidth=value
183         Used to specify the stripe unit and wi    183         Used to specify the stripe unit and width for a RAID device
184         or a stripe volume.  "value" must be s    184         or a stripe volume.  "value" must be specified in 512-byte
185         block units. These options are only re    185         block units. These options are only relevant to filesystems
186         that were created with non-zero data a    186         that were created with non-zero data alignment parameters.
187                                                   187 
188         The ``sunit`` and ``swidth`` parameter    188         The ``sunit`` and ``swidth`` parameters specified must be compatible
189         with the existing filesystem alignment    189         with the existing filesystem alignment characteristics.  In
190         general, that means the only valid cha    190         general, that means the only valid changes to ``sunit`` are
191         increasing it by a power-of-2 multiple    191         increasing it by a power-of-2 multiple. Valid ``swidth`` values
192         are any integer multiple of a valid ``    192         are any integer multiple of a valid ``sunit`` value.
193                                                   193 
194         Typically the only time these mount op    194         Typically the only time these mount options are necessary if
195         after an underlying RAID device has ha !! 195         after an underlying RAID device has had it's geometry
196         modified, such as adding a new disk to    196         modified, such as adding a new disk to a RAID5 lun and
197         reshaping it.                             197         reshaping it.
198                                                   198 
199   swalloc                                         199   swalloc
200         Data allocations will be rounded up to    200         Data allocations will be rounded up to stripe width boundaries
201         when the current end of file is being     201         when the current end of file is being extended and the file
202         size is larger than the stripe width s    202         size is larger than the stripe width size.
203                                                   203 
204   wsync                                           204   wsync
205         When specified, all filesystem namespa    205         When specified, all filesystem namespace operations are
206         executed synchronously. This ensures t    206         executed synchronously. This ensures that when the namespace
207         operation (create, unlink, etc) comple    207         operation (create, unlink, etc) completes, the change to the
208         namespace is on stable storage. This i    208         namespace is on stable storage. This is useful in HA setups
209         where failover must not result in clie    209         where failover must not result in clients seeing
210         inconsistent namespace presentation du    210         inconsistent namespace presentation during or after a
211         failover event.                           211         failover event.
212                                                   212 
213 Deprecation of V4 Format                          213 Deprecation of V4 Format
214 ========================                          214 ========================
215                                                   215 
216 The V4 filesystem format lacks certain feature    216 The V4 filesystem format lacks certain features that are supported by
217 the V5 format, such as metadata checksumming,     217 the V5 format, such as metadata checksumming, strengthened metadata
218 verification, and the ability to store timesta    218 verification, and the ability to store timestamps past the year 2038.
219 Because of this, the V4 format is deprecated.     219 Because of this, the V4 format is deprecated.  All users should upgrade
220 by backing up their files, reformatting, and r    220 by backing up their files, reformatting, and restoring from the backup.
221                                                   221 
222 Administrators and users can detect a V4 files    222 Administrators and users can detect a V4 filesystem by running xfs_info
223 against a filesystem mountpoint and checking f    223 against a filesystem mountpoint and checking for a string containing
224 "crc=".  If no such string is found, please up    224 "crc=".  If no such string is found, please upgrade xfsprogs to the
225 latest version and try again.                     225 latest version and try again.
226                                                   226 
227 The deprecation will take place in two parts.     227 The deprecation will take place in two parts.  Support for mounting V4
228 filesystems can now be disabled at kernel buil    228 filesystems can now be disabled at kernel build time via Kconfig option.
229 The option will default to yes until September    229 The option will default to yes until September 2025, at which time it
230 will be changed to default to no.  In Septembe    230 will be changed to default to no.  In September 2030, support will be
231 removed from the codebase entirely.               231 removed from the codebase entirely.
232                                                   232 
233 Note: Distributors may choose to withdraw V4 f    233 Note: Distributors may choose to withdraw V4 format support earlier than
234 the dates listed above.                           234 the dates listed above.
235                                                   235 
236 Deprecated Mount Options                          236 Deprecated Mount Options
237 ========================                          237 ========================
238                                                   238 
239 ============================    ============== !! 239 ===========================     ================
240   Name                          Removal Schedu    240   Name                          Removal Schedule
241 ============================    ============== !! 241 ===========================     ================
242 Mounting with V4 filesystem     September 2030    242 Mounting with V4 filesystem     September 2030
243 Mounting ascii-ci filesystem    September 2030 << 
244 ikeep/noikeep                   September 2025    243 ikeep/noikeep                   September 2025
245 attr2/noattr2                   September 2025    244 attr2/noattr2                   September 2025
246 ============================    ============== !! 245 ===========================     ================
247                                                   246 
248                                                   247 
249 Removed Mount Options                             248 Removed Mount Options
250 =====================                             249 =====================
251                                                   250 
252 ===========================     =======           251 ===========================     =======
253   Name                          Removed           252   Name                          Removed
254 ===========================     =======           253 ===========================     =======
255   delaylog/nodelaylog           v4.0              254   delaylog/nodelaylog           v4.0
256   ihashsize                     v4.0              255   ihashsize                     v4.0
257   irixsgid                      v4.0              256   irixsgid                      v4.0
258   osyncisdsync/osyncisosync     v4.0              257   osyncisdsync/osyncisosync     v4.0
259   barrier                       v4.19             258   barrier                       v4.19
260   nobarrier                     v4.19             259   nobarrier                     v4.19
261 ===========================     =======           260 ===========================     =======
262                                                   261 
263 sysctls                                           262 sysctls
264 =======                                           263 =======
265                                                   264 
266 The following sysctls are available for the XF    265 The following sysctls are available for the XFS filesystem:
267                                                   266 
268   fs.xfs.stats_clear            (Min: 0  Defau    267   fs.xfs.stats_clear            (Min: 0  Default: 0  Max: 1)
269         Setting this to "1" clears accumulated    268         Setting this to "1" clears accumulated XFS statistics
270         in /proc/fs/xfs/stat.  It then immedia    269         in /proc/fs/xfs/stat.  It then immediately resets to "0".
271                                                   270 
272   fs.xfs.xfssyncd_centisecs     (Min: 100  Def    271   fs.xfs.xfssyncd_centisecs     (Min: 100  Default: 3000  Max: 720000)
273         The interval at which the filesystem f    272         The interval at which the filesystem flushes metadata
274         out to disk and runs internal cache cl    273         out to disk and runs internal cache cleanup routines.
275                                                   274 
276   fs.xfs.filestream_centisecs   (Min: 1  Defau    275   fs.xfs.filestream_centisecs   (Min: 1  Default: 3000  Max: 360000)
277         The interval at which the filesystem a    276         The interval at which the filesystem ages filestreams cache
278         references and returns timed-out AGs b    277         references and returns timed-out AGs back to the free stream
279         pool.                                     278         pool.
280                                                   279 
281   fs.xfs.speculative_prealloc_lifetime            280   fs.xfs.speculative_prealloc_lifetime
282         (Units: seconds   Min: 1  Default: 300    281         (Units: seconds   Min: 1  Default: 300  Max: 86400)
283         The interval at which the background s    282         The interval at which the background scanning for inodes
284         with unused speculative preallocation     283         with unused speculative preallocation runs. The scan
285         removes unused preallocation from clea    284         removes unused preallocation from clean inodes and releases
286         the unused space back to the free pool    285         the unused space back to the free pool.
287                                                   286 
288   fs.xfs.speculative_cow_prealloc_lifetime        287   fs.xfs.speculative_cow_prealloc_lifetime
289         This is an alias for speculative_preal    288         This is an alias for speculative_prealloc_lifetime.
290                                                   289 
291   fs.xfs.error_level            (Min: 0  Defau    290   fs.xfs.error_level            (Min: 0  Default: 3  Max: 11)
292         A volume knob for error reporting when    291         A volume knob for error reporting when internal errors occur.
293         This will generate detailed messages &    292         This will generate detailed messages & backtraces for filesystem
294         shutdowns, for example.  Current thres    293         shutdowns, for example.  Current threshold values are:
295                                                   294 
296                 XFS_ERRLEVEL_OFF:       0         295                 XFS_ERRLEVEL_OFF:       0
297                 XFS_ERRLEVEL_LOW:       1         296                 XFS_ERRLEVEL_LOW:       1
298                 XFS_ERRLEVEL_HIGH:      5         297                 XFS_ERRLEVEL_HIGH:      5
299                                                   298 
300   fs.xfs.panic_mask             (Min: 0  Defau !! 299   fs.xfs.panic_mask             (Min: 0  Default: 0  Max: 256)
301         Causes certain error conditions to cal    300         Causes certain error conditions to call BUG(). Value is a bitmask;
302         OR together the tags which represent e    301         OR together the tags which represent errors which should cause panics:
303                                                   302 
304                 XFS_NO_PTAG                       303                 XFS_NO_PTAG                     0
305                 XFS_PTAG_IFLUSH                   304                 XFS_PTAG_IFLUSH                 0x00000001
306                 XFS_PTAG_LOGRES                   305                 XFS_PTAG_LOGRES                 0x00000002
307                 XFS_PTAG_AILDELETE                306                 XFS_PTAG_AILDELETE              0x00000004
308                 XFS_PTAG_ERROR_REPORT             307                 XFS_PTAG_ERROR_REPORT           0x00000008
309                 XFS_PTAG_SHUTDOWN_CORRUPT         308                 XFS_PTAG_SHUTDOWN_CORRUPT       0x00000010
310                 XFS_PTAG_SHUTDOWN_IOERROR         309                 XFS_PTAG_SHUTDOWN_IOERROR       0x00000020
311                 XFS_PTAG_SHUTDOWN_LOGERROR        310                 XFS_PTAG_SHUTDOWN_LOGERROR      0x00000040
312                 XFS_PTAG_FSBLOCK_ZERO             311                 XFS_PTAG_FSBLOCK_ZERO           0x00000080
313                 XFS_PTAG_VERIFIER_ERROR           312                 XFS_PTAG_VERIFIER_ERROR         0x00000100
314                                                   313 
315         This option is intended for debugging     314         This option is intended for debugging only.
316                                                   315 
317   fs.xfs.irix_symlink_mode      (Min: 0  Defau    316   fs.xfs.irix_symlink_mode      (Min: 0  Default: 0  Max: 1)
318         Controls whether symlinks are created     317         Controls whether symlinks are created with mode 0777 (default)
319         or whether their mode is affected by t    318         or whether their mode is affected by the umask (irix mode).
320                                                   319 
321   fs.xfs.irix_sgid_inherit      (Min: 0  Defau    320   fs.xfs.irix_sgid_inherit      (Min: 0  Default: 0  Max: 1)
322         Controls files created in SGID directo    321         Controls files created in SGID directories.
323         If the group ID of the new file does n    322         If the group ID of the new file does not match the effective group
324         ID or one of the supplementary group I    323         ID or one of the supplementary group IDs of the parent dir, the
325         ISGID bit is cleared if the irix_sgid_    324         ISGID bit is cleared if the irix_sgid_inherit compatibility sysctl
326         is set.                                   325         is set.
327                                                   326 
328   fs.xfs.inherit_sync           (Min: 0  Defau    327   fs.xfs.inherit_sync           (Min: 0  Default: 1  Max: 1)
329         Setting this to "1" will cause the "sy    328         Setting this to "1" will cause the "sync" flag set
330         by the **xfs_io(8)** chattr command on    329         by the **xfs_io(8)** chattr command on a directory to be
331         inherited by files in that directory.     330         inherited by files in that directory.
332                                                   331 
333   fs.xfs.inherit_nodump         (Min: 0  Defau    332   fs.xfs.inherit_nodump         (Min: 0  Default: 1  Max: 1)
334         Setting this to "1" will cause the "no    333         Setting this to "1" will cause the "nodump" flag set
335         by the **xfs_io(8)** chattr command on    334         by the **xfs_io(8)** chattr command on a directory to be
336         inherited by files in that directory.     335         inherited by files in that directory.
337                                                   336 
338   fs.xfs.inherit_noatime        (Min: 0  Defau    337   fs.xfs.inherit_noatime        (Min: 0  Default: 1  Max: 1)
339         Setting this to "1" will cause the "no    338         Setting this to "1" will cause the "noatime" flag set
340         by the **xfs_io(8)** chattr command on    339         by the **xfs_io(8)** chattr command on a directory to be
341         inherited by files in that directory.     340         inherited by files in that directory.
342                                                   341 
343   fs.xfs.inherit_nosymlinks     (Min: 0  Defau    342   fs.xfs.inherit_nosymlinks     (Min: 0  Default: 1  Max: 1)
344         Setting this to "1" will cause the "no    343         Setting this to "1" will cause the "nosymlinks" flag set
345         by the **xfs_io(8)** chattr command on    344         by the **xfs_io(8)** chattr command on a directory to be
346         inherited by files in that directory.     345         inherited by files in that directory.
347                                                   346 
348   fs.xfs.inherit_nodefrag       (Min: 0  Defau    347   fs.xfs.inherit_nodefrag       (Min: 0  Default: 1  Max: 1)
349         Setting this to "1" will cause the "no    348         Setting this to "1" will cause the "nodefrag" flag set
350         by the **xfs_io(8)** chattr command on    349         by the **xfs_io(8)** chattr command on a directory to be
351         inherited by files in that directory.     350         inherited by files in that directory.
352                                                   351 
353   fs.xfs.rotorstep              (Min: 1  Defau    352   fs.xfs.rotorstep              (Min: 1  Default: 1  Max: 256)
354         In "inode32" allocation mode, this opt    353         In "inode32" allocation mode, this option determines how many
355         files the allocator attempts to alloca    354         files the allocator attempts to allocate in the same allocation
356         group before moving to the next alloca    355         group before moving to the next allocation group.  The intent
357         is to control the rate at which the al    356         is to control the rate at which the allocator moves between
358         allocation groups when allocating exte    357         allocation groups when allocating extents for new files.
359                                                   358 
360 Deprecated Sysctls                                359 Deprecated Sysctls
361 ==================                                360 ==================
362                                                   361 
363 ===========================================       362 ===========================================     ================
364   Name                                            363   Name                                          Removal Schedule
365 ===========================================       364 ===========================================     ================
366 fs.xfs.irix_sgid_inherit                          365 fs.xfs.irix_sgid_inherit                        September 2025
367 fs.xfs.irix_symlink_mode                          366 fs.xfs.irix_symlink_mode                        September 2025
368 fs.xfs.speculative_cow_prealloc_lifetime          367 fs.xfs.speculative_cow_prealloc_lifetime        September 2025
369 ===========================================       368 ===========================================     ================
370                                                   369 
371                                                   370 
372 Removed Sysctls                                   371 Removed Sysctls
373 ===============                                   372 ===============
374                                                   373 
375 =============================   =======           374 =============================   =======
376   Name                          Removed           375   Name                          Removed
377 =============================   =======           376 =============================   =======
378   fs.xfs.xfsbufd_centisec       v4.0              377   fs.xfs.xfsbufd_centisec       v4.0
379   fs.xfs.age_buffer_centisecs   v4.0              378   fs.xfs.age_buffer_centisecs   v4.0
380 =============================   =======           379 =============================   =======
381                                                   380 
382 Error handling                                    381 Error handling
383 ==============                                    382 ==============
384                                                   383 
385 XFS can act differently according to the type     384 XFS can act differently according to the type of error found during its
386 operation. The implementation introduces the f    385 operation. The implementation introduces the following concepts to the error
387 handler:                                          386 handler:
388                                                   387 
389  -failure speed:                                  388  -failure speed:
390         Defines how fast XFS should propagate     389         Defines how fast XFS should propagate an error upwards when a specific
391         error is found during the filesystem o    390         error is found during the filesystem operation. It can propagate
392         immediately, after a defined number of    391         immediately, after a defined number of retries, after a set time period,
393         or simply retry forever.                  392         or simply retry forever.
394                                                   393 
395  -error classes:                                  394  -error classes:
396         Specifies the subsystem the error conf    395         Specifies the subsystem the error configuration will apply to, such as
397         metadata IO or memory allocation. Diff    396         metadata IO or memory allocation. Different subsystems will have
398         different error handlers for which beh    397         different error handlers for which behaviour can be configured.
399                                                   398 
400  -error handlers:                                 399  -error handlers:
401         Defines the behavior for a specific er    400         Defines the behavior for a specific error.
402                                                   401 
403 The filesystem behavior during an error can be    402 The filesystem behavior during an error can be set via ``sysfs`` files. Each
404 error handler works independently - the first     403 error handler works independently - the first condition met by an error handler
405 for a specific class will cause the error to b    404 for a specific class will cause the error to be propagated rather than reset and
406 retried.                                          405 retried.
407                                                   406 
408 The action taken by the filesystem when the er    407 The action taken by the filesystem when the error is propagated is context
409 dependent - it may cause a shut down in the ca    408 dependent - it may cause a shut down in the case of an unrecoverable error,
410 it may be reported back to userspace, or it ma    409 it may be reported back to userspace, or it may even be ignored because
411 there's nothing useful we can with the error o    410 there's nothing useful we can with the error or anyone we can report it to (e.g.
412 during unmount).                                  411 during unmount).
413                                                   412 
414 The configuration files are organized into the    413 The configuration files are organized into the following hierarchy for each
415 mounted filesystem:                               414 mounted filesystem:
416                                                   415 
417   /sys/fs/xfs/<dev>/error/<class>/<error>/        416   /sys/fs/xfs/<dev>/error/<class>/<error>/
418                                                   417 
419 Where:                                            418 Where:
420   <dev>                                           419   <dev>
421         The short device name of the mounted f    420         The short device name of the mounted filesystem. This is the same device
422         name that shows up in XFS kernel error    421         name that shows up in XFS kernel error messages as "XFS(<dev>): ..."
423                                                   422 
424   <class>                                         423   <class>
425         The subsystem the error configuration     424         The subsystem the error configuration belongs to. As of 4.9, the defined
426         classes are:                              425         classes are:
427                                                   426 
428                 - "metadata": applies metadata    427                 - "metadata": applies metadata buffer write IO
429                                                   428 
430   <error>                                         429   <error>
431         The individual error handler configura    430         The individual error handler configurations.
432                                                   431 
433                                                   432 
434 Each filesystem has "global" error configurati    433 Each filesystem has "global" error configuration options defined in their top
435 level directory:                                  434 level directory:
436                                                   435 
437   /sys/fs/xfs/<dev>/error/                        436   /sys/fs/xfs/<dev>/error/
438                                                   437 
439   fail_at_unmount               (Min:  0  Defa    438   fail_at_unmount               (Min:  0  Default:  1  Max: 1)
440         Defines the filesystem error behavior     439         Defines the filesystem error behavior at unmount time.
441                                                   440 
442         If set to a value of 1, XFS will overr    441         If set to a value of 1, XFS will override all other error configurations
443         during unmount and replace them with "    442         during unmount and replace them with "immediate fail" characteristics.
444         i.e. no retries, no retry timeout. Thi    443         i.e. no retries, no retry timeout. This will always allow unmount to
445         succeed when there are persistent erro    444         succeed when there are persistent errors present.
446                                                   445 
447         If set to 0, the configured retry beha    446         If set to 0, the configured retry behaviour will continue until all
448         retries and/or timeouts have been exha    447         retries and/or timeouts have been exhausted. This will delay unmount
449         completion when there are persistent e    448         completion when there are persistent errors, and it may prevent the
450         filesystem from ever unmounting fully     449         filesystem from ever unmounting fully in the case of "retry forever"
451         handler configurations.                   450         handler configurations.
452                                                   451 
453         Note: there is no guarantee that fail_    452         Note: there is no guarantee that fail_at_unmount can be set while an
454         unmount is in progress. It is possible    453         unmount is in progress. It is possible that the ``sysfs`` entries are
455         removed by the unmounting filesystem b    454         removed by the unmounting filesystem before a "retry forever" error
456         handler configuration causes unmount t    455         handler configuration causes unmount to hang, and hence the filesystem
457         must be configured appropriately befor    456         must be configured appropriately before unmount begins to prevent
458         unmount hangs.                            457         unmount hangs.
459                                                   458 
460 Each filesystem has specific error class handl    459 Each filesystem has specific error class handlers that define the error
461 propagation behaviour for specific errors. The    460 propagation behaviour for specific errors. There is also a "default" error
462 handler defined, which defines the behaviour f    461 handler defined, which defines the behaviour for all errors that don't have
463 specific handlers defined. Where multiple retr    462 specific handlers defined. Where multiple retry constraints are configured for
464 a single error, the first retry configuration     463 a single error, the first retry configuration that expires will cause the error
465 to be propagated. The handler configurations a    464 to be propagated. The handler configurations are found in the directory:
466                                                   465 
467   /sys/fs/xfs/<dev>/error/<class>/<error>/        466   /sys/fs/xfs/<dev>/error/<class>/<error>/
468                                                   467 
469   max_retries                   (Min: -1  Defa    468   max_retries                   (Min: -1  Default: Varies  Max: INTMAX)
470         Defines the allowed number of retries     469         Defines the allowed number of retries of a specific error before
471         the filesystem will propagate the erro    470         the filesystem will propagate the error. The retry count for a given
472         error context (e.g. a specific metadat    471         error context (e.g. a specific metadata buffer) is reset every time
473         there is a successful completion of th    472         there is a successful completion of the operation.
474                                                   473 
475         Setting the value to "-1" will cause X    474         Setting the value to "-1" will cause XFS to retry forever for this
476         specific error.                           475         specific error.
477                                                   476 
478         Setting the value to "0" will cause XF    477         Setting the value to "0" will cause XFS to fail immediately when the
479         specific error is reported.               478         specific error is reported.
480                                                   479 
481         Setting the value to "N" (where 0 < N     480         Setting the value to "N" (where 0 < N < Max) will make XFS retry the
482         operation "N" times before propagating    481         operation "N" times before propagating the error.
483                                                   482 
484   retry_timeout_seconds         (Min:  -1  Def    483   retry_timeout_seconds         (Min:  -1  Default:  Varies  Max: 1 day)
485         Define the amount of time (in seconds)    484         Define the amount of time (in seconds) that the filesystem is
486         allowed to retry its operations when t    485         allowed to retry its operations when the specific error is
487         found.                                    486         found.
488                                                   487 
489         Setting the value to "-1" will allow X    488         Setting the value to "-1" will allow XFS to retry forever for this
490         specific error.                           489         specific error.
491                                                   490 
492         Setting the value to "0" will cause XF    491         Setting the value to "0" will cause XFS to fail immediately when the
493         specific error is reported.               492         specific error is reported.
494                                                   493 
495         Setting the value to "N" (where 0 < N     494         Setting the value to "N" (where 0 < N < Max) will allow XFS to retry the
496         operation for up to "N" seconds before    495         operation for up to "N" seconds before propagating the error.
497                                                   496 
498 **Note:** The default behaviour for a specific    497 **Note:** The default behaviour for a specific error handler is dependent on both
499 the class and error context. For example, the     498 the class and error context. For example, the default values for
500 "metadata/ENODEV" are "0" rather than "-1" so     499 "metadata/ENODEV" are "0" rather than "-1" so that this error handler defaults
501 to "fail immediately" behaviour. This is done     500 to "fail immediately" behaviour. This is done because ENODEV is a fatal,
502 unrecoverable error no matter how many times t    501 unrecoverable error no matter how many times the metadata IO is retried.
503                                                   502 
504 Workqueue Concurrency                             503 Workqueue Concurrency
505 =====================                             504 =====================
506                                                   505 
507 XFS uses kernel workqueues to parallelize meta    506 XFS uses kernel workqueues to parallelize metadata update processes.  This
508 enables it to take advantage of storage hardwa    507 enables it to take advantage of storage hardware that can service many IO
509 operations simultaneously.  This interface exp    508 operations simultaneously.  This interface exposes internal implementation
510 details of XFS, and as such is explicitly not     509 details of XFS, and as such is explicitly not part of any userspace API/ABI
511 guarantee the kernel may give userspace.  Thes    510 guarantee the kernel may give userspace.  These are undocumented features of
512 the generic workqueue implementation XFS uses     511 the generic workqueue implementation XFS uses for concurrency, and they are
513 provided here purely for diagnostic and tuning    512 provided here purely for diagnostic and tuning purposes and may change at any
514 time in the future.                               513 time in the future.
515                                                   514 
516 The control knobs for a filesystem's workqueue    515 The control knobs for a filesystem's workqueues are organized by task at hand
517 and the short name of the data device.  They a    516 and the short name of the data device.  They all can be found in:
518                                                   517 
519   /sys/bus/workqueue/devices/${task}!${device}    518   /sys/bus/workqueue/devices/${task}!${device}
520                                                   519 
521 ================  ===========                     520 ================  ===========
522   Task            Description                     521   Task            Description
523 ================  ===========                     522 ================  ===========
524   xfs_iwalk-$pid  Inode scans of the entire fi    523   xfs_iwalk-$pid  Inode scans of the entire filesystem. Currently limited to
525                   mount time quotacheck.          524                   mount time quotacheck.
526   xfs-gc          Background garbage collectio    525   xfs-gc          Background garbage collection of disk space that have been
527                   speculatively allocated beyo    526                   speculatively allocated beyond EOF or for staging copy on
528                   write operations.               527                   write operations.
529 ================  ===========                     528 ================  ===========
530                                                   529 
531 For example, the knobs for the quotacheck work    530 For example, the knobs for the quotacheck workqueue for /dev/nvme0n1 would be
532 found in /sys/bus/workqueue/devices/xfs_iwalk-    531 found in /sys/bus/workqueue/devices/xfs_iwalk-1111!nvme0n1/.
533                                                   532 
534 The interesting knobs for XFS workqueues are a    533 The interesting knobs for XFS workqueues are as follows:
535                                                   534 
536 ============     ===========                      535 ============     ===========
537   Knob           Description                      536   Knob           Description
538 ============     ===========                      537 ============     ===========
539   max_active     Maximum number of background     538   max_active     Maximum number of background threads that can be started to
540                  run the work.                    539                  run the work.
541   cpumask        CPUs upon which the threads a    540   cpumask        CPUs upon which the threads are allowed to run.
542   nice           Relative priority of scheduli    541   nice           Relative priority of scheduling the threads.  These are the
543                  same nice levels that can be     542                  same nice levels that can be applied to userspace processes.
544 ============     ===========                      543 ============     ===========
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php