Commit Graph

38 Commits (1eb159a295261c56d14b962eb3d4763f8ce38807)

Author SHA1 Message Date
Qu Wenruo a2fc3b5113 btrfs-progs: Update the man page of btrfs
Update the man page of "btrfs" command to keep up with new commands.

Now the updated btrfs man page should have all the commands,
and better description sequence, which is the same with "btrfs --help".
Also the paragraph and italic style is unified to improve the readability.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-08-09 14:32:37 +02:00
Anand Jain 7d1478b91a btrfs-progs: label option in btrfs filesystem show is not coded
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-08-09 14:32:36 +02:00
Guangyu Sun 668aedeaa6 btrfs-progs: update man page for btrfs filesystem label
btrfs filesystem label can work on a mounted filesystem, also on a
multi-devices filesystem. And the restriction of label name is
changed, too. The man page should be updated accordingly.

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-08-09 14:32:32 +02:00
Eryu Guan de394eaed5 btrfs-progs: update manpage to add filesystem show command in synopsis
filesystem show was missing in SYNOPSIS section.

Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-08-09 14:32:29 +02:00
Stefan Behrens 6d26357f8e Btrfs-progs: add function to map subvol ID to path
Several tools like btrfs-send and btrfs-receive need to map a
subvolume ID to a filesystem path. The so far existing methods
in btrfs-list.c cause a horrible effort when performing this
operation (and the effort is dependent on the number of
existing subvolumes with quadratic effort). This commit adds a
function that is able to map a subvolume ID to a filesystem path
with an effort that is independent of the number of existing
subvolumes.

In addition to this function, a command line frontend is added as well:
btrfs inspect-internal subvolid-resolve <subvolid> <path>

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
2013-04-23 19:16:25 +02:00
Zhi Yong Wu b0029a96f2 btrfs-progs: add missing qgroup synopsis in btrfs
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
2013-04-09 18:43:32 +02:00
Stefan Behrens 4739e7332c Btrfs-progs: make scrub IO priority configurable
The btrfs tool is changed in order to support command line parameters
to configure the IO priority of the scrub tasks. Also the default is
changed. The default IO priority for scrub is the idle class now.

The behavior is the same as when one would type
'ionice ... btrfs scrub start ...' or 'ionice ... btrfs scrub resume ...'
(without this patch applied).
The only reason for adding this to the btrfs tool is that it was not
documented and not obvious that it worked like this, that all internal
scrub tasks inherited the IO priority values of the btrfs tool that is
starting or resuming the scrub operation.

Note that after applying the patch it is no longer possible to set
the IO priority using ionice since the btrfs tool always configures
the priority in order to run in the idle class by default.

Some basic performance measurements have been done with the goal to
measure which IO priority for scrub gives the best overall disk data
throughput. The kernel was configured to use the CFQ IO scheduler
with default configuration and without support for throttling. The
summary is, that the more the disk head movements are avoided, the
faster the overall disk transfer capacity is, which is not really a
big surprise. Therefore it makes sense that the best data throughput
was measured setting the scrub IO priority and the scrub readahead
IO priority to the idle class priority. Running with idle class IO
priority means that scrub and scrub readahead IO is paused while
other tasks access the disk. Doing the tasks one after the other
instead of concurrently avoids many disk head movements. The
overall data throughput of rotating disks is improved this way.

However, if it is desired to have the scrub task done within a
reasonable time, and if at the same time the filesystem is heavily
loaded, the idle IO priority should be avoided. Otherwise the scrub
operation will never take place and thus never terminate.

The best effort IO priority class with the subclass 7 (the lowest
one in the best effort class) is recommended in the case of always
heavily loaded hard disks. If the filesystem is not loaded all the
time and leaves some idle slots for scrub, the idle class IO priority
is recommended. The idle class now is the default if the scrub
operation is started with the btrfs-progs tools.

Note that the patch that sets the scrub readahead IO priority to the
idle class is a seperate patch, this needs to be done in the kernel.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
2013-03-19 18:23:58 +01:00
David Sterba 641e688375 btrfs-progs: update man pages of subvol list
- rename to match code where applicable
- add missing options
- unify the help strings in short and detailed sections
- fix a few typos

Signed-off-by: David Sterba <dsterba@suse.cz>
2013-02-01 17:37:29 +01:00
Anand Jain 437eea9664 Btrfs-progs: add show subcommand to subvol cli
This adds show sub-command to the btrfs subvol cli
to display detailed inforamtion of the given subvol
or snapshot.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
2013-02-01 16:55:06 +01:00
Lukas Czerner 6812036174 Btrfs-progs: add '-o' option into subvolume list command
This commit introduces new option '-o' to list only subvolumes under the
specified path. This does not change subvolume list  behaviour. It has
been default in the past and it is even with this commit.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
2013-02-01 16:55:03 +01:00
Lukas Czerner e599d6c5da Btrfs-progs: move path modification to filters
Commit 8e8e019e91 introduces -a option
which will list all subvolumes with distinguishing between relative and
absolute by prepending absolute patch with "<FS_TREE>".

This commit moves the path modification to a filter code rather than
doing so in path construction in resolve_root(). This gives us more
flexibility in formatting path output.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
2013-02-01 16:55:03 +01:00
Goffredo Baroncelli 1be4621bc9 Update the man page with the new prefixes.
Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
2013-02-01 01:04:15 +01:00
Anand Jain 04af04e64f Btrfs-progs: man btrfs: subcommands must be grouped together
Signed-off-by: Anand Jain <anand.jain@oracle.com>
2013-01-31 19:14:43 +01:00
Stefan Behrens 7e08a9116d Btrfs-progs: add support for device replace procedure
This is the user mode part of the device replace patch series.

The command group "btrfs replace" is added with three commands:
- btrfs replace start srcdev|srcdevid targetdev [-Bfr] mount_point
- btrfs replace status mount_point [-1]
- btrfs replace cancel mount_point

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
2013-01-31 13:47:26 +01:00
Stefan Behrens 5b8826ddfd Btrfs-progs: add command to get/reset device stats via ioctl
"btrfs device stats" is used to retrieve and print the device stats.
"btrfs device stats -z" is used to atomically retrieve, reset and
print the stats.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
2013-01-31 13:47:17 +01:00
Simon Xu 4bd93ea68c btrfs-progs: remove '-h' from btrfs man page
Remove '-h' from btrfs man page as it's not supported by the btrfs utility.

Signed-off-by: Simon Xu <xu.simon@oracle.com>
2013-01-17 18:27:56 +01:00
Simon Xu 6c8bca9ae8 btrfs-progs: remove "device show" from btrfs man page
Remove "device show" from btrfs man page as it's not supported by the
btrfs utility.

Signed-off-by: Simon Xu <xu.simon@oracle.com>
2013-01-17 18:27:56 +01:00
Liu Bo 723e5b0f9a Btrfs-progs: add options to change bufsize in logical to inode translation
Add an option 's' to set bufsize in logical to inode transition, then we are able
to read all the refs to the logical address.
Meanwhile, set a max value 64k for the bufsize.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2012-10-04 20:33:20 -04:00
Anand Jain 6500965277 Btrfs-progs: btrfs subvolume delete could delete subvolumes
With this user will be able to provide more than one subvolume
to delete.
eg: btrfs subvolume delete <subvol1> <subvol2>

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2012-10-04 16:26:34 -04:00
Wang Shilong e86f7198d9 Btrfs-Progs: update '-s' option without a argument.
Since '--sort' options was given ,and we can list snapshots in generation
order by --sort=+/-gen to replace '-s [0|1]' totally.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujistsu.com>
2012-10-04 16:26:33 -04:00
Wang Shilong 8e8e019e91 Btrfs-progs: introduces '-a' option into subvolume list command
We list the subvolumes under current directory according to the input
subvolume.

However, if we still want to list all the subvolumes in the tree, we
can use '-a' option to help us.

There may be two kinds of path: absolute path , relative path .

The absolute path is beginning with "<FS_TREE>"
The relative path is under current path that you input.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
2012-10-04 16:26:33 -04:00
Miao Xie 0f53cf81f6 Btrfs-progs: introduce '-t' option into subvolume list command
This patch introduces '-t' option into subvolume list command. By this
option, we can output the result as a table.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
2012-10-04 16:26:33 -04:00
wangshilong 60d11eca66 Btrfs-progs: introduce -g -c --sort options into btrfs subvol list command
This patch introduces '-g' '-c' '--sort' options

The option '-g' can help you filter the subvolumes by the generation, you may
use it just like:

	btrfs subvol list -g +/-value <path>

'+' means the generation of the subvolumes should >= the value you specified.
'-' means the generation should <= the value
If you don't input either '+' nor '-', this command will list the subvolumes
that their generation equals to the value.

However if you want to find gengeration between value1 and value2
you may use the above like:

        btrfs sub list -g -value1 -g +value2 <path>

The option '-c' can help you filter the subvolumes by the ogeneration, you may
use it just like:

	btrfs subvol list -c +/-value <path>

The usage is the same to '-g'

You might want to list subvolumes in order of some items, such as root id, gen
and so on, you can use '--sort'. Now you can sort the subvolumes by root id,
gen, ogen and path.

For example:
If you want to list subvolumes in order of rootid, you can use the option like
that:

	btrfs sub list --sort=+/-rooid <path>

Here, '+' means the result is sorted by ascending order. '-' is by descending
order. If you don't specify either '+' nor '-', the result is sorted by
default - ascending order.

If you want to combine sort items, you do it like that:

	btrfs sub list --sort=-rootid,+path,ogen,gen <path>

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
2012-10-04 16:26:33 -04:00
Zhou Bo af3045cb20 Btrfs-progs: update the manpage entries for the btrfs subvolume list
This patch adds the introduction of the new option '-r' into the man page of
'btrfs subvolume list' command.

Signed-off-by: Zhou Bo <zhoub-fnst@cn.fujitsu.com>
2012-10-04 16:26:33 -04:00
Akira Fujita 24c2ac5eb1 Btrfs-progs: Fix manual of btrfs command
Usage of balancing btrfs is "btrfs filesystem balance",
not "btrfs device balance". And remove unneeded
usage of "btrfs filesystem defrag".
Also fix some typos and over 80 columns.

Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com>
2012-07-03 16:27:46 -04:00
Shawn Bohrer 6cb6eeb11d btrfs-progs: Update resize documentation
The btrfs filesystem resize command defaults to only resizing the
filesystem for devid 1, and must have a devid passed in to resize the
filesystem for the other devices in the filesystem.

Additionally the documentation lacked information on how to actually
resize the underlying partition so this provides a little more detail.

Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com>
2012-07-03 16:27:46 -04:00
Hubert Kario 8a8e5deb85 man: fix btrfs man page formatting
Signed-off-by: Hubert Kario <kario@wit.edu.pl>
2012-07-03 16:27:46 -04:00
Jan Schmidt dcdbc1ce18 Btrfs-progs: added resolve commands to man page
Added "inspect-internal inode-resolve" and "inspect-internal
logical-resolve" to the btrfs(8) man page.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
2011-11-02 15:45:45 -04:00
Goffredo Baroncelli 0dbd99fb3e Scan the devices listed in /proc/partitions
During the commands:
	- btrfs filesystem show
	- btrfs device scan
the devices "scanned" are extracted from /proc/partitions. This
should avoid to scan devices not suitable for a btrfs filesystem like cdrom
and floppy or to scan not existant devices.
The old behavior (scan all the block devices under /dev) may be
forced passing the "--all-devices" switch.
2011-10-25 09:19:00 -04:00
Zhong, Xin a70b0b2bba Btrfs-progs: add "btrfs subvolume get-default" subcommand
Add subcommand to get the default subvolume of btrfs filesystem

V2->V3:
* add man page
* based on http://git.darksatanic.net/repo/btrfs-progs-unstable.git
  integration-20110705

Reviewed-by: Andreas Philipp <philipp.andreas@gmail.com>
Reviewed-by: Goffredo Baroncelli <kreijack@libero.it>
Reported-by: Yang, Yi <yi.y.yang@intel.com>
Signed-off-by: Zhong, Xin <xin.zhong@intel.com>
2011-10-25 09:18:59 -04:00
Jan Schmidt 25439670a6 btrfs-progs: scrub added to manpage
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
2011-10-25 09:18:59 -04:00
Andreas Philipp be1c3b1fda update manpage entries for btrfs subvolume list
Update the manpage entries for the btrfs subvolume list command to
reflect the newly created additional option '-p'.

Signed-off-by: Andreas Philipp <philipp.andreas@gmail.com>
Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
2011-10-25 09:18:59 -04:00
Andreas Philipp de750d7a0d Updated manpage for btrfs subvolume snapshot.
Signed-off-by: Andreas Philipp <philipp.andreas@gmail.com>
Signed-off-by: Hugo Mills <hugo@carfax.org.uk>
2011-10-25 09:18:58 -04:00
Goffredo Baroncelli e8f47cf068 Add the "btrfs filesystem label" command
Hi all,

this patch adds the command "btrfs filesystem label" to change (or show) the
label of a filesystem.
This patch is a subset of the one written previously by Morey Roof. I
included the user space part only. So it is possible only to change/show a
label of a *single device* and *unounted* filesystem.

The reason of excluding the kernel space part, is to simplify the patch in
order to speed the check and then the merging of the patch itself. In fact I
have to point out that in the past there was almost three attempts to propose
this patch, without success neither complaints.

Chris, let me know how you want to proceed. I know that you are very busy,
and you prefer to work to stabilize btrfs instead adding new feature. But I
think that changing a label is a *essential* feature for a filesystem
managing tool. Think about a mount by LABEL.

To show a label

$ btrfs filesystem label <device>

To set a label

$ btrfs filesystem label <device> <newlabel>

Please guys, give a look to the source.
Comments are welcome.

You can pull the source from the branch "label" of the repository
http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git

Regards
G.Baroncelli

Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-10-25 09:18:31 -04:00
Goffredo Baroncelli 87d3875d4e Update/clean up btrfs help and man page V2
Hi all,

enclose you can find a patch which improves the help of the btrfs commands,
 updates the INSTALL file  and  the btrfs (command) man page.

Regarding the help of the btrfs command:
- moved the "subvolume set-default" command in the "subvolume" commands group
- removed a wrong new line
- small tweak on the basis of Andreas suggestion

Regarding the btrfs command man page:
- renaming the command "device balance" in "filesystem balance" (thanks to
Andreas Phillipp to highlight that)
- adding the entry "subvolume find-new"
- document the switches of the command "filesystem defrag"
- document the <devid> facility of the command "filesystem resize"
- small tweak on the basis of Andreas suggestion

Regarding the INSTALL file, which was very old, I removed the reference of the
old btrfsctl utility and changed the examples using the btrfs command.
I removed the old (and now wrong) statement about the inability to delete a
subvolume/snapshot

Chris, you can pull the patch from the branch "help_cleanup" of the following
repository.

http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git

(or you can browse the changes at
http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git/?p=btrfs-
progs-unstable-all.git;a=summary)

The patch is very simple: only updates the man page, the INSTALL file and
 moves/updates some lines in the help of btrfs command. Comments are welcome.

Regards
G.Baroncelli

 INSTALL        |   29 ++++++++++++++++++++---------
 btrfs.c        |   24 ++++++++++++------------
 man/btrfs.8.in |   45 +++++++++++++++++++++++++--------------------
 3 files changed, 57 insertions(+), 41 deletions(-)

 all the block devices.
 .TP
@@ -138,21 +143,21 @@ can expand the partition before enlarging the filesystem
and shrink the
 partition after reducing the size of the filesystem.
 .TP

-\fBfilesystem show\fR [<uuid>|<label>]\fR
-Show the btrfs filesystem with some additional info. If no UUID or label is
-passed, \fBbtrfs\fR show info of all the btrfs filesystem.
+\fBfilesystem show\fR [<device>|<uuid>|<label>]\fR
+Show the btrfs filesystem with some additional info. If no argument is
+passed, \fBbtrfs\fR shows info of all the btrfs filesystems.
 .TP

-\fBdevice balance\fR \fI<path>\fR
+\fBfilesystem balance\fR \fI<path>\fR
 Balance the chunks of the filesystem identified by \fI<path>\fR
 across the devices.
 .TP

-\fBdevice add\fR\fI <dev> [<dev>..] <path>\fR
+\fBdevice add\fR\fI <device> [<device>...] <path>\fR
 Add device(s) to the filesystem identified by \fI<path>\fR.
 .TP

-\fBdevice delete\fR\fI <dev> [<dev>..] <path>\fR
+\fBdevice delete\fR\fI <device> [<device>...] <path>\fR
 Remove device(s) from a filesystem identified by \fI<path>\fR.
 .PP

Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-10-25 09:18:31 -04:00
Li Zefan a418b24318 Update for lzo support
[Btrfs-Progs][V2] Update for lzo support

- Add incompat flag, otherwise btrfs-progs will report error
  when operating on btrfs filesystems mounted with lzo option.

- Update man page.

- Allow to turn on lzo compression for defrag operation:

  # btrfs filesystem defragment -c[zlib, lzo] <file>

  Note: "-c zlib" will fail, because that's how getopt() works
  for optional arguments.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-10-25 09:18:31 -04:00
Hubert Kario 0646719841 update man page to new defragment command interface
Update

        btrfs filesystem defragment

command explanation. Add explanation of advanced parameters and notes
about general usage.

Add few notes about the

        btrfs <command> --help

usage, fix related grammar.

Signed-off-by: Hubert Kario <kario@wit.edu.pl>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-10-25 09:18:31 -04:00
Goffredo Baroncelli 35401ac190 Update the btrfs man page with the new commands 2010-03-11 22:09:46 -05:00