btrfs-progs: docs: update btrfs manual page
[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 '-t <type>' option 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 setting for an inode: lzo, zlib, or "" (empty string)
47
48 *list* [-t <type>] <object>::
49 Lists available properties with their descriptions for the given object.
50 +
51 See the description of *get* subcommand for the meaning of each option.
52
53 *set* [-t <type>] <object> <name> <value>::
54 Sets a property on a btrfs object.
55 +
56 See the description of *get* subcommand for the meaning of each option.
57
58 EXIT STATUS
59 -----------
60 *btrfs property* returns a zero exit status if it succeeds. Non zero is
61 returned in case of failure.
62
63 AVAILABILITY
64 ------------
65 *btrfs* is part of btrfs-progs.
66 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
67 further details.
68
69 SEE ALSO
70 --------
71 `mkfs.btrfs`(8),
72 `lsattr`(1),
73 `chattr`(1)