btrfs-progs: prop: also allow "none" to disable compression
[platform/upstream/btrfs-progs.git] / Documentation / btrfs-property.asciidoc
1 btrfs-property(8)
2 =================
3
4 NAME
5 ----
6 btrfs-property - get/set/list properties for given btrfs object.
7
8 SYNOPSIS
9 --------
10 *btrfs property* <subcommand> <args>
11
12 DESCRIPTION
13 -----------
14 *btrfs property* is used to get/set/list property for given btrfs object.
15 See the description of *get* subcommand for more information about
16 both btrfs object and property.
17
18 *btrfs property* provides an unified and user-friendly method to tune different
19 btrfs properties instead of using the traditional method like `chattr`(1) or
20 `lsattr`(1).
21
22 SUBCOMMAND
23 ----------
24 *get* [-t <type>] <object> [<name>]::
25 Gets a property from a btrfs object.
26 +
27 A btrfs object, which is set by <object>, can be a btrfs filesystem
28 itself, a btrfs subvolume, an inode(file or directory) inside btrfs,
29 or a device on which a btrfs exists.
30 +
31 The option '-t' can be used to explicitly
32 specify what type of object you meant. This is only needed when a
33 property could be set for more then one object type.
34 +
35 Possible types are 's[ubvol]', 'f[ilesystem]', 'i[node]' and 'd[evice]'.
36 +
37 Set the name of property by 'name'. If no 'name' is specified,
38 all properties for the given object are printed. 'name' is one of
39 the followings.
40
41 ro::::
42 read-only flag of subvolume: true or false
43 label::::
44 label of device
45 compression::::
46 compression algorithm for an inode, possible values: 'lzo', 'zlib', 'zstd'. To
47 disable compression use "" (empty string), 'no' or 'none'.
48
49 *list* [-t <type>] <object>::
50 Lists available properties with their descriptions for the given object.
51 +
52 See the description of *get* subcommand for the meaning of each option.
53
54 *set* [-t <type>] <object> <name> <value>::
55 Sets a property on a btrfs object.
56 +
57 See the description of *get* subcommand for the meaning of each option.
58
59 EXIT STATUS
60 -----------
61 *btrfs property* returns a zero exit status if it succeeds. Non zero is
62 returned in case of failure.
63
64 AVAILABILITY
65 ------------
66 *btrfs* is part of btrfs-progs.
67 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
68 further details.
69
70 SEE ALSO
71 --------
72 `mkfs.btrfs`(8),
73 `lsattr`(1),
74 `chattr`(1)