bd005331ec5e15872c968fc0a91ab726abaec963
[platform/upstream/btrfs-progs.git] / Documentation / btrfs-man5.asciidoc
1 btrfs-man5(5)
2 ==============
3
4 NAME
5 ----
6 btrfs-man5 - topics about the BTRFS filesystem (mount options, supported file attributes and other)
7
8 DESCRIPTION
9 -----------
10 This document describes topics related to BTRFS that are not specific to the
11 tools.  Currently covers:
12
13 1. mount options
14
15 2. filesystem features
16
17 3. file attributes
18
19 4. control device
20
21
22 MOUNT OPTIONS
23 -------------
24
25 This section describes mount options specific to BTRFS.  For the generic mount
26 options please refer to `mount`(8) manpage. The options are sorted alphabetically
27 (discarding the 'no' prefix).
28
29 *acl*::
30 *noacl*::
31 (default: on)
32 +
33 Enable/disable support for Posix Access Control Lists (ACLs).  See the
34 `acl`(5) manual page for more information about ACLs.
35 +
36 The support for ACL is build-time configurable (BTRFS_FS_POSIX_ACL) and
37 mount fails if 'acl' is requested but the feature is not compiled in.
38
39 *autodefrag*::
40 *noautodefrag*::
41 (since: 3.0, default: off)
42 +
43 Enable automatic file defragmentation.
44 When enabled, small random writes into files (in a range of tens of kilobytes,
45 currently it's 64K) are detected and queued up for the defragmentation process.
46 Not well suited for large database workloads.
47 +
48 The read latency may increase due to reading the adjacent blocks that make up the
49 range for defragmentation, successive write will merge the blocks in the new
50 location.
51 +
52 WARNING: Defragmenting with Linux kernel versions < 3.9 or ≥ 3.14-rc2 as
53 well as with Linux stable kernel versions ≥ 3.10.31, ≥ 3.12.12 or
54 ≥ 3.13.4 will break up the ref-links of CoW data (for example files
55 copied with `cp --reflink`, snapshots or de-duplicated data).
56 This may cause considerable increase of space usage depending on the
57 broken up ref-links.
58
59 *barrier*::
60 *nobarrier*::
61 (default: on)
62 +
63 Ensure that all IO write operations make it through the device cache and are stored
64 permanently when the filesystem is at it's consistency checkpoint. This
65 typically means that a flush command is sent to the device that will
66 synchronize all pending data and ordinary metadata blocks, then writes the
67 superblock and issues another flush.
68 +
69 The write flushes incur a slight hit and also prevent the IO block
70 scheduler to reorder requests in a more effective way. Disabling barriers gets
71 rid of that penalty but will most certainly lead to a corrupted filesystem in
72 case of a crash or power loss. The ordinary metadata blocks could be yet
73 unwritten at the time the new superblock is stored permanently, expecting that
74 the block pointers to metadata were stored permanently before.
75 +
76 On a device with a volatile battery-backed write-back cache, the 'nobarrier'
77 option will not lead to filesystem corruption as the pending blocks are
78 supposed to make it to the permanent storage.
79
80 *check_int*::
81 *check_int_data*::
82 *check_int_print_mask='value'*::
83 (since: 3.0, default: off)
84 +
85 These debugging options control the behavior of the integrity checking
86 module (the BTRFS_FS_CHECK_INTEGRITY config option required). The main goal is
87 to verify that all blocks from a given transaction period are properly linked.
88 +
89 'check_int' enables the integrity checker module, which examines all
90 block write requests to ensure on-disk consistency, at a large
91 memory and CPU cost.
92 +
93 'check_int_data' includes extent data in the integrity checks, and
94 implies the 'check_int' option.
95 +
96 'check_int_print_mask' takes a bitmask of BTRFSIC_PRINT_MASK_* values
97 as defined in 'fs/btrfs/check-integrity.c', to control the integrity
98 checker module behavior.
99 +
100 See comments at the top of 'fs/btrfs/check-integrity.c'
101 for more information.
102
103 *clear_cache*::
104 Force clearing and rebuilding of the disk space cache if something
105 has gone wrong. See also: 'space_cache'.
106
107 *commit='seconds'*::
108 (since: 3.12, default: 30)
109 +
110 Set the interval of periodic transaction commit when data are synchronized
111 to permanent storage. Higher interval values lead to larger amount of unwritten
112 data, which has obvious consequences when the system crashes.
113 The upper bound is not forced, but a warning is printed if it's more than 300
114 seconds (5 minutes). Use with care.
115
116 *compress*::
117 *compress='type'*::
118 *compress-force*::
119 *compress-force='type'*::
120 (default: off)
121 +
122 Control BTRFS file data compression.  Type may be specified as 'zlib',
123 'lzo', 'zstd' or 'no' (for no compression, used for remounting).  If no type
124 is specified, 'zlib' is used.  If 'compress-force' is specified,
125 the compression will allways be attempted, but the data may end up uncompressed
126 if the compression would make them larger.
127 +
128 Otherwise some simple heuristics are applied to detect an incompressible file.
129 If the first blocks written to a file are not compressible, the whole file is
130 permanently marked to skip compression. As this is too simple, the
131 'compress-force' is a workaround that will compress most of the files at the
132 cost of some wasted CPU cycles on failed attempts. The heuristics of 'compress'
133 will improve in the future so this will not be necessary.
134 +
135 NOTE: If compression is enabled, 'nodatacow' and 'nodatasum' are disabled.
136
137 *datacow*::
138 *nodatacow*::
139 (default: on)
140 +
141 Enable data copy-on-write for newly created files.
142 'Nodatacow' implies 'nodatasum', and disables 'compression'. All files created
143 under 'nodatacow' are also set the NOCOW file attribute (see `chattr`(1)).
144 +
145 NOTE: If 'nodatacow' or 'nodatasum' are enabled, compression is disabled.
146 +
147 Updates in-place improve performance for workloads that do frequent overwrites,
148 at the cost of potential partial writes, in case the write is interruted
149 (system crash, device failure).
150
151 *datasum*::
152 *nodatasum*::
153 (default: on)
154 +
155 Enable data checksumming for newly created files.
156 'Datasum' implies 'datacow', ie. the normal mode of operation. All files created
157 under 'nodatasum' inherit the "no checksums" property, however there's no
158 corresponding file attribute (see `chattr`(1)).
159 +
160 NOTE: If 'nodatacow' or 'nodatasum' are enabled, compression is disabled.
161 +
162 There is a slight performance gain when checksums are turned off, the
163 correspoinding metadata blocks holding the checksums do not need to updated.
164 The cost of checksumming of the blocks in memory is much lower than the IO,
165 modern CPUs feature hardware support of the checksumming algorithm.
166
167 *degraded*::
168 (default: off)
169 +
170 Allow mounts with less devices than the RAID profile constraints
171 require.  A read-write mount (or remount) may fail when there are too many devices
172 missing, for example if a stripe member is completely missing from RAID0.
173 +
174 Since 4.14, the constraint checks have been improved and are verified on the
175 chunk level, not an the device level. This allows degraded mounts of
176 filesystems with mixed RAID profiles for data and metadata, even if the
177 device number constraints would not be satisfied for some of the prifles.
178 +
179 Example: metadata -- raid1, data -- single, devices -- /dev/sda, /dev/sdb
180 +
181 Suppose the data are completely stored on 'sda', then missing 'sdb' will not
182 prevent the mount, even if 1 missing device would normally prevent (any)
183 'single' profile to mount. In case some of the data chunks are stored on 'sdb',
184 then the constraint of single/data is not satisfied and the filesystem
185 cannot be mounted.
186
187 *device='devicepath'*::
188 Specify a path to a device that will be scanned for BTRFS filesystem during
189 mount. This is usually done automatically by a device manager (like udev) or
190 using the *btrfs device scan* command (eg. run from the initial ramdisk). In
191 cases where this is not possible the 'device' mount option can help.
192 +
193 NOTE: booting eg. a RAID1 system may fail even if all filesystem's 'device'
194 paths are provided as the actual device nodes may not be discovered by the
195 system at that point.
196
197 *discard*::
198 *nodiscard*::
199 (default: off)
200 +
201 Enable discarding of freed file blocks using the TRIM operation.  This is useful
202 for SSD devices, thinly provisioned LUNs or virtual machine images where the
203 backing device understands the operation. Depending on support of the
204 underlying device, the operation may severely hurt performance in case the TRIM
205 operation is synchronous (eg. with SATA devices up to revision 3.0).
206 +
207 If discarding is not necessary to be done at the block freeing time, there's
208 `fstrim`(8) tool that lets the filesystem discard all free blocks in a batch,
209 possibly not much interfering with other operations. Also, the the device may
210 ignore the TRIM command if the range is too small, so running the batch discard
211 can actually discard the blocks.
212
213 *enospc_debug*::
214 *noenospc_debug*::
215 (default: off)
216 +
217 Enable verbose output for some ENOSPC conditions. It's safe to use but can
218 be noisy if the system reaches near-full state.
219
220 *fatal_errors='action'*::
221 (since: 3.4, default: bug)
222 +
223 Action to take when encountering a fatal error.
224 +
225 *bug*::::
226 'BUG()' on a fatal error, the system will stay in the crashed state and may be
227 still partially usable, but reboot is required for full operation
228 +
229 *panic*::::
230 'panic()' on a fatal error, depending on other system configuration, this may
231 be followed by a reboot. Please refer to the documentation of kernel boot
232 parameters, eg. 'panic', 'oops' or 'crashkernel'.
233
234 *flushoncommit*::
235 *noflushoncommit*::
236 (default: off)
237 +
238 This option forces any data dirtied by a write in a prior transaction to commit
239 as part of the current commit, effectively a full filesystem sync.
240 +
241 This makes the committed state a fully consistent view of the file system from
242 the application's perspective (i.e. it includes all completed file system
243 operations). This was previously the behavior only when a snapshot was
244 created.
245 +
246 When off, the filesystem is consistent but buffered writes may last more than
247 one transaction commit.
248
249 *fragment='type'*::
250 (depends on compile-time option BTRFS_DEBUG, since: 4.4, default: off)
251 +
252 A debugging helper to intentionally fragment given 'type' of block groups. The
253 type can be 'data', 'metadata' or 'all'. This mount option should not be used
254 outside of debugging environments and is not recognized if the kernel config
255 option 'BTRFS_DEBUG' is not enabled.
256
257 *inode_cache*::
258 *noinode_cache*::
259 (since: 3.0, default: off)
260 +
261 Enable free inode number caching. Not recommended to use unless files on your
262 filesystem get assigned inode numbers that are approaching 2^64^. Normally, new
263 files in each subvolume get assigned incrementally (plus one from the last
264 time) and are not reused. The mount option turns on caching of the existing
265 inode numbers and reuse of inode numbers of deleted files.
266 +
267 This option may slow down your system at first run, or after mounting without
268 the option.
269 +
270 NOTE: Defaults to off due to a potential overflow problem when the free space
271 checksums don't fit inside a single page.
272 +
273 Don't use this option unless you really need it. The inode number limit
274 on 64bit system is 2^64^, which is practically enough for the whole filesystem
275 lifetime. Due to implemention of linux VFS layer, the inode numbers on 32bit
276 systems are only 32 bits wide. This lowers the limit significantly and makes
277 it possible to reach it. In such case, this mount option will help.
278 Alternatively, files with high inode numbers can be copied to a new subvolume
279 which will effectively start the inode numbers from the beginning again.
280
281 *logreplay*::
282 *nologreplay*::
283 (default: on, even read-only)
284 +
285 Enable/disable log replay at mount time. See also 'treelog'.
286 +
287 WARNING: currently, the tree log is replayed even with a read-only mount! To
288 disable that behaviour, mount also with 'nologreplay'.
289
290 *max_inline='bytes'*::
291 (default: min(2048, page size) )
292 +
293 Specify the maximum amount of space, that can be inlined in
294 a metadata B-tree leaf.  The value is specified in bytes, optionally
295 with a K suffix (case insensitive).  In practice, this value
296 is limited by the filesystem block size (named 'sectorsize' at mkfs time),
297 and memory page size of the system. In case of sectorsize limit, there's
298 some space unavailable due to leaf headers.  For example, a 4k sectorsize,
299 maximum size of inline data is about 3900 bytes.
300 +
301 Inlining can be completely turned off by specifying 0. This will increase data
302 block slack if file sizes are much smaller than block size but will reduce
303 metadata consumption in return.
304 +
305 NOTE: the default value has changed to 2048 in kernel 4.6.
306
307 *metadata_ratio='value'*::
308 (default: 0, internal logic)
309 +
310 Specifies that 1 metadata chunk should be allocated after every 'value' data
311 chunks. Default behaviour depends on internal logic, some percent of unused
312 metadata space is attempted to be maintained but is not always possible if
313 there's not enough space left for chunk allocation. The option could be useful to
314 override the internal logic in favor of the metadata allocation if the expected
315 workload is supposed to be metadata intense (snapshots, reflinks, xattrs,
316 inlined files).
317
318 *norecovery*::
319 (since: 4.5, default: off)
320 +
321 Do not attempt any data recovery at mount time. This will disable 'logreplay'
322 and avoids other write operations.
323 +
324 NOTE: The opposite option 'recovery' used to have different meaning but was
325 changed for consistency with other filesystems, where 'norecovery' is used for
326 skipping log replay. BTRFS does the same and in general will try to avoid any
327 write operations.
328
329 *rescan_uuid_tree*::
330 (since: 3.12, default: off)
331 +
332 Force check and rebuild procedure of the UUID tree. This should not
333 normally be needed.
334
335 *skip_balance*::
336 (since: 3.3, default: off)
337 +
338 Skip automatic resume of an interrupted balance operation. The operation can
339 later be resumed with *btrfs balance resume*, or the paused state can be
340 removed with *btrfs balance cancel*. The default behaviour is to resume an
341 interrupted balance immediately after a volume is mounted.
342
343 *space_cache*::
344 *space_cache='version'*::
345 *nospace_cache*::
346 ('nospace_cache' since: 3.2, 'space_cache=v1' and 'space_cache=v2' since 4.5, default: 'space_cache=v1')
347 +
348 Options to control the free space cache. The free space cache greatly improves
349 performance when reading block group free space into memory. However, managing
350 the space cache consumes some resources, including a small amount of disk
351 space.
352 +
353 There are two implementations of the free space cache. The original
354 one, referred to as 'v1', is the safe default. The 'v1' space cache can be
355 disabled at mount time with 'nospace_cache' without clearing.
356 +
357 On very large filesystems (many terabytes) and certain workloads, the
358 performance of the 'v1' space cache may degrade drastically. The 'v2'
359 implementation, which adds a new B-tree called the free space tree, addresses
360 this issue. Once enabled, the 'v2' space cache will always be used and cannot
361 be disabled unless it is cleared. Use 'clear_cache,space_cache=v1' or
362 'clear_cache,nospace_cache' to do so. If 'v2' is enabled, kernels without 'v2'
363 support will only be able to mount the filesystem in read-only mode. The
364 `btrfs`(8) command currently only has read-only support for 'v2'. A read-write
365 command may be run on a 'v2' filesystem by clearing the cache, running the
366 command, and then remounting with 'space_cache=v2'.
367 +
368 If a version is not explicitly specified, the default implementation will be
369 chosen, which is 'v1'.
370
371 *ssd*::
372 *ssd_spread*::
373 *nossd*::
374 (default: SSD autodetected)
375 +
376 Options to control SSD allocation schemes.  By default, BTRFS will
377 enable or disable SSD optimizations depending on status of a device with
378 respect to rotational or non-rotational type. This is determined by the
379 contents of '/sys/block/DEV/queue/rotational'). If it is 1, the 'ssd' option is
380 turned on.  The option 'nossd' will disable the autodetection.
381 +
382 The optimizations make use of the absence of the seek penalty that's inherent
383 for the rotational devices. The blocks can be typically written faster and
384 are not offloaded to separate threads.
385 +
386 NOTE: Since 4.14, the block layout optimizations have been dropped. This used
387 to help with first generations of SSD devices. Their FTL (flash translation
388 layer) was not effective and the optimization was supposed to improve the wear
389 by better aligning blocks. This is no longer true with modern SSD devices and
390 the optimization had no real benefit. Furthermore it caused increased
391 fragmentation. The layout tuning has been kept intact for the option
392 'ssd_spread'.
393 +
394 The 'ssd_spread' mount option attempts to allocate into bigger and aligned
395 chunks of unused space, and may perform better on low-end SSDs.  'ssd_spread'
396 implies 'ssd', enabling all other SSD heuristics as well. The option 'nossd'
397 will disable all SSD options.
398
399 *subvol='path'*::
400 Mount subvolume from 'path' rather than the toplevel subvolume. The
401 'path' is always treated as relative to the the toplevel subvolume.
402 This mount option overrides the default subvolume set for the given filesystem.
403
404 *subvolid='subvolid'*::
405 Mount subvolume specified by a 'subvolid' number rather than the toplevel
406 subvolume.  You can use *btrfs subvolume list* of *btrfs subvolume show* to see
407 subvolume ID numbers.
408 This mount option overrides the default subvolume set for the given filesystem.
409 +
410 NOTE: if both 'subvolid' and 'subvol' are specified, they must point at the
411 same subvolume, otherwise the mount will fail.
412
413 *thread_pool='number'*::
414 (default: min(NRCPUS + 2, 8) )
415 +
416 The number of worker threads to start. NRCPUS is number of on-line CPUs
417 detected at the time of mount. Small number leads to less parallelism in
418 processing data and metadata, higher numbers could lead to a performance hit
419 due to increased locking contention, process scheduling, cache-line bouncing or
420 costly data transfers between local CPU memories.
421
422 *treelog*::
423 *notreelog*::
424 (default: on)
425 +
426 Enable the tree logging used for 'fsync' and 'O_SYNC' writes. The tree log
427 stores changes without the need of a full filesystem sync. The log operations
428 are flushed at sync and transaction commit. If the system crashes between two
429 such syncs, the pending tree log operations are replayed during mount.
430 +
431 WARNING: currently, the tree log is replayed even with a read-only mount! To
432 disable that behaviour, also mount with 'nologreplay'.
433 +
434 The tree log could contain new files/directories, these would not exist on
435 a mounted filesystem if the log is not replayed.
436
437 *usebackuproot*::
438 *nousebackuproot*::
439 (since: 4.6, default: off)
440 +
441 Enable autorecovery attempts if a bad tree root is found at mount time.
442 Currently this scans a backup list of several previous tree roots and tries to
443 use the first readable. This can be used with read-only mounts as well.
444 +
445 NOTE: This option has replaced 'recovery'.
446
447 *user_subvol_rm_allowed*::
448 (default: off)
449 +
450 Allow subvolumes to be deleted by their respective owner. Otherwise, only the
451 root user can do that.
452 +
453 NOTE: historically, any user could create a snapshot even if he was not owner
454 of the source subvolume, the subvolume deletion has been restricted for that
455 reason. The subvolume creation has been restricted but this mount option is
456 still required. This is a usability issue and will be addressed in the future.
457
458 DEPRECATED MOUNT OPTIONS
459 ~~~~~~~~~~~~~~~~~~~~~~~~
460
461 List of mount options that have been removed, kept for backward compatibility.
462
463 *alloc_start='bytes'*::
464 (default: 1M, minimum: 1M, deprecated since: 4.13)
465 +
466 Debugging option to force all block allocations above a certain
467 byte threshold on each block device.  The value is specified in
468 bytes, optionally with a K, M, or G suffix (case insensitive).
469
470 *recovery*::
471 (since: 3.2, default: off, deprecated since: 4.5)
472 +
473 NOTE: this option has been replaced by 'usebackuproot' and should not be used
474 but will work on 4.5+ kernels.
475
476 *subvolrootid='objectid'*::
477 (irrelevant since: 3.2, formally deprecated since: 3.10)
478 +
479 A workaround option from times (pre 3.2) when it was not possible to mount a
480 subvolume that did not reside directly under the toplevel subvolume.
481
482 NOTES ON GENERIC MOUNT OPTIONS
483 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
484
485 Some of the general mount options from `mount`(8) that affect BTRFS and are
486 worth mentioning.
487
488 *noatime*::
489 under read intensive work-loads, specifying 'noatime' significantly improves
490 performance because no new access time information needs to be written. Without
491 this option, the default is 'relatime', which only reduces the number of
492 inode atime updates in comparison to the traditional 'strictatime'. The worst
493 case for atime updates under 'relatime' occurs when many files are read whose
494 atime is older than 24 h and which are freshly snapshotted. In that case the
495 atime is updated 'and' COW happens - for each file - in bulk. See also
496 https://lwn.net/Articles/499293/ - 'Atime and btrfs: a bad combination? (LWN, 2012-05-31)'.
497 +
498 Note that 'noatime' may break applications that rely on atime uptimes like
499 the venerable Mutt (unless you use maildir mailboxes).
500
501
502 FILESYSTEM FEATURES
503 -------------------
504
505 The basic set of filesystem features gets extended over time. The backward
506 compatibility is maintained and the features are optional, need to be
507 explicitly asked for so accidental use will not create incompatibilities.
508
509 There are several classes and the respective tools to manage the features:
510
511 at mkfs time only::
512 This is namely for core structures, like the b-tree nodesize, see
513 `mkfs.btrfs`(8) for more details.
514
515 after mkfs, on an unmounted filesystem::
516 Features that may optimize internal structures or add new structures to support
517 new functionality, see `btrfstune`(8). The command *btrfs inspect-internal
518 dump-super device* will dump a superblock, you can map the value of
519 'incompat_flags' to the features listed below
520
521 after mkfs, on a mounted filesystem::
522 The features of a filesystem (with a given UUID) are listed in
523 `/sys/fs/btrfs/UUID/features/`, one file per feature. The status is stored
524 inside the file. The value '1' is for enabled and active, while '0' means the
525 feature was enabled at mount time but turned off afterwards.
526 +
527 Whether a particular feature can be turned on a mounted filesystem can be found
528 in the directory `/sys/fs/btrfs/features/`, one file per feature. The value '1'
529 means the feature can be enabled.
530
531 List of features (see also `mkfs.btrfs`(8) section 'FILESYSTEM FEATURES'):
532
533 *big_metadata*::
534 (since: 3.4)
535 +
536 the filesystem uses 'nodesize' for metadata blocks, this can be bigger than the
537 page size
538
539 *compress_lzo*::
540 (since: 2.6.38)
541 +
542 the 'lzo' compression has been used on the filesystem, either as a mount option
543 or via *btrfs filesystem defrag*.
544
545 *compress_zstd*::
546 (since: 4.14)
547 +
548 the 'zstd' compression has been used on the filesystem, either as a mount option
549 or via *btrfs filesystem defrag*.
550
551 *default_subvol*::
552 (since: 2.6.34)
553 +
554 the default subvolume has been set on the filesystem
555
556 *extended_iref*::
557 (since: 3.7)
558 +
559 increased hardlink limit per file in a directory to 65536, older kernels
560 supported a varying number of hardlinks depending on the sum of all file name
561 sizes that can be stored into one metadata block
562
563 *mixed_backref*::
564 (since: 2.6.31)
565 +
566 the last major disk format change, improved backreferences, now default
567
568 *mixed_groups*::
569 (since: 2.6.37)
570 +
571 mixed data and metadata block groups, ie. the data and metadata are not
572 separated and occupy the same block groups, this mode is suitable for small
573 volumes as there are no constraints how the remaining space should be used
574 (compared to the split mode, where empty metadata space cannot be used for data
575 and vice versa)
576 +
577 on the other hand, the final layout is quite unpredictable and possibly highly
578 fragmented, which means worse performance
579
580 *no_holes*::
581 (since: 3.14)
582 +
583 improved representation of file extents where holes are not explicitly
584 stored as an extent, saves a few percent of metadata if sparse files are used
585
586 *raid56*::
587 (since: 3.9)
588 +
589 the filesystem contains or contained a raid56 profile of block groups
590
591 *skinny_metadata*::
592 (since: 3.10)
593 +
594 reduced-size metadata for extent references, saves a few percent of metadata
595
596 FILE ATTRIBUTES
597 ---------------
598 The btrfs filesystem supports setting the following file attributes using the
599 `chattr`(1) utility:
600
601 *a*::
602 'append only', new writes are always written at the end of the file
603
604 *A*::
605 'no atime updates'
606
607 *c*::
608 'compress data', all data written after this attribute is set will be compressed.
609 Please note that compression is also affected by the mount options or the parent
610 directory attributes.
611 +
612 When set on a directory, all newly created files will inherit this attribute.
613
614 *C*::
615 'no copy-on-write', file modifications are done in-place
616 +
617 When set on a directory, all newly created files will inherit this attribute.
618 +
619 NOTE: due to implementation limitations, this flag can be set/unset only on
620 empty files.
621
622 *d*::
623 'no dump', makes sense with 3rd party tools like `dump`(8), on BTRFS the
624 attribute can be set/unset but no other special handling is done
625
626 *D*::
627 'synchronous directory updates', for more details search `open`(2) for 'O_SYNC'
628 and 'O_DSYNC'
629
630 *i*::
631 'immutable', no file data and metadata changes allowed even to the root user as
632 long as this attribute is set (obviously the exception is unsetting the attribute)
633
634 *S*::
635 'synchronous updates', for more details search `open`(2) for 'O_SYNC' and
636 'O_DSYNC'
637
638 *X*::
639 'no compression', permanently turn off compression on the given file, other
640 compression mount options will not affect that
641 +
642 When set on a directory, all newly created files will inherit this attribute.
643
644 No other attributes are supported.  For the complete list please refer to the
645 `chattr`(1) manual page.
646
647 CONTROL DEVICE
648 --------------
649
650 There's a character special device `/dev/btrfs-control` with major and minor
651 numbers 10 and 234 (the device can be found under the 'misc' category).
652
653 --------------------
654 $ ls -l /dev/btrfs-control
655 crw------- 1 root root 10, 234 Jan  1 12:00 /dev/btrfs-control
656 --------------------
657
658 The device accepts some ioctl calls that can perform following actions on the
659 filesystem module:
660
661 * scan devices for btrfs filesystem (ie. to let multi-device filesystems mount
662   automatically) and register them with the kernel module
663 * similar to scan, but also wait until the device scanning process is finished
664   for a given filesystem
665 * get the supported features (can be also found under '/sys/fs/btrfs/features')
666
667 The device is usually created by a system device node manager (eg. udev), but
668 can be created manually:
669
670 --------------------
671 # mknod --mode=600 c 10 234 /dev/btrfs-control
672 --------------------
673
674 The control device is not strictly required but the device scanning will not
675 work and a workaround would need to be used to mount a multi-device filesystem.
676 The mount option 'device' can trigger the device scanning during mount.
677
678 SEE ALSO
679 --------
680 `acl`(5),
681 `btrfs`(8),
682 `chattr`(1),
683 `fstrim`(8),
684 `ioctl`(2),
685 `mkfs.btrfs`(8),
686 `mount`(8)