btrfs-progs: Fix self-reference of man btrfs-subvolume
[platform/upstream/btrfs-progs.git] / Documentation / btrfs-inspect-internal.asciidoc
1 btrfs-inspect-internal(8)
2 =========================
3
4 NAME
5 ----
6 btrfs-inspect-internal - query various internal information
7
8 SYNOPSIS
9 --------
10 *btrfs inspect-internal* <subcommand> <args>
11
12 DESCRIPTION
13 -----------
14
15 This command group provides an interface to query internal information. The
16 functionality ranges from a simple UI to an ioctl or a more complex query that
17 assembles the result from several internal structures. The latter usually
18 requires calls to privileged ioctls.
19
20 SUBCOMMAND
21 ----------
22 *inode-resolve* [-v] <ino> <path>::
23 (needs root privileges)
24 +
25 resolve paths to all files with given inode number 'ino' in a given subvolume
26 at 'path', ie. all hardlinks
27 +
28 `Options`
29 +
30 -v::::
31 verbose mode, print count of returned paths and ioctl() return value
32
33 *logical-resolve* [-Pv] [-s <bufsize>] <logical> <path>::
34 (needs root privileges)
35 +
36 resolve paths to all files at given 'logical' address in the linear filesystem space
37 +
38 `Options`
39 +
40 -P::::
41 skip the path resolving and print the inodes instead
42 -v::::
43 verbose mode, print count of returned paths and all ioctl() return values
44 -s <bufsize>::::
45 set internal buffer for storing the file names to 'bufsize', default is 4096, maximum 64k
46
47 *min-dev-size* [options] <path>::
48 (needs root privileges)
49 +
50 return the minimum size the device can be shrunk to, without performing any
51 resize operation, this may be useful before executing the actual resize operation
52 +
53 `Options`
54 +
55 --id <id>::::
56 specify the device 'id' to query, default is 1 if this option is not used
57
58 *rootid* <path>::
59 for a given file or directory, return the containing tree root id, for a
60 subvolume itself return it's own tree id (ie. subvol id)
61 +
62 NOTE: The result is undefined for the so-called empty subvolumes (identified by
63 inode number 2), but such subvolume does not contain any files anyway
64
65 *subvolid-resolve* <subvolid> <path>::
66 (needs root privileges)
67 +
68 resolve the absolute path of a the subvolume id 'subvolid'
69
70 EXIT STATUS
71 -----------
72 *btrfs inspect-internal* returns a zero exit status if it succeeds. Non zero is
73 returned in case of failure.
74
75 AVAILABILITY
76 ------------
77 *btrfs* is part of btrfs-progs.
78 Please refer to the btrfs wiki http://btrfs.wiki.kernel.org for
79 further details.
80
81 SEE ALSO
82 --------
83 `mkfs.btrfs`(8),
84 `btrfs-debug-tree`(8)