Skip to content

Commit 7e2ce5a

Browse files
committed
btrfs-progs: docs: update file attributes
Note about inheritable flags, annotate to what the attributes apply. [ci skip] Signed-off-by: David Sterba <dsterba@suse.com>
1 parent e97a6f5 commit 7e2ce5a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Documentation/ch-file-attributes.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,25 @@ that:
1212
no standard tool to change the bits, there's support in :manref:`xfs_io(8)` as
1313
command **xfs_io -c chattr**
1414

15+
Attributes have constraints associated and not all combinations can be set, the
16+
order of setting them also matters. Most attributes apply to files and
17+
directories but the semantics may differ. For directories the attribute may
18+
only mean to set this attribute to all new files (*inheritable* in the list
19+
below). Some attributes need root privileges to be set.
20+
1521
Attributes
1622
^^^^^^^^^^
1723

1824
a
25+
(file, dir, root)
1926
*append only*, new writes are always written at the end of the file
2027

2128
A
29+
(file, dir)
2230
*no atime updates*
2331

2432
c
33+
(file, dir, inherited)
2534
*compress data*, all data written after this attribute is set will be compressed.
2635
Please note that compression is also affected by the mount options or the parent
2736
directory attributes.
@@ -30,6 +39,7 @@ c
3039
This attribute cannot be set with 'm' at the same time.
3140

3241
C
42+
(file, dir, inherited)
3343
*no copy-on-write*, file data modifications are done in-place
3444

3545
When set on a directory, all newly created files will inherit this attribute.
@@ -39,18 +49,22 @@ C
3949
empty files.
4050

4151
d
52+
(file)
4253
*no dump*, makes sense with 3rd party tools like :manref:`dump(8)`, on BTRFS the
4354
attribute can be set/unset but no other special handling is done
4455

4556
D
57+
(dir)
4658
*synchronous directory updates*, for more details search :manref:`open(2)` for *O_SYNC*
4759
and *O_DSYNC*
4860

4961
i
62+
(file, dir, root)
5063
*immutable*, no file data and metadata changes allowed even to the root user as
5164
long as this attribute is set (obviously the exception is unsetting the attribute)
5265

5366
m
67+
(file, dir)
5468
*no compression*, permanently turn off compression on the given file. Any
5569
compression mount options will not affect this file. (:manref:`chattr(1)` support added in
5670
1.46.2)
@@ -59,9 +73,14 @@ m
5973
This attribute cannot be set with *c* at the same time.
6074

6175
S
76+
(file)
6277
*synchronous updates*, for more details search :manref:`open(2)` for *O_SYNC* and
6378
*O_DSYNC*
6479

80+
V
81+
(file, read-only)
82+
*fs-verity enabled* on the file
83+
6584
No other attributes are supported. For the complete list please refer to the
6685
:manref:`chattr(1)` manual page.
6786

0 commit comments

Comments
 (0)