Commit graph

631 commits

Author SHA1 Message Date
David Sterba 9f6c055e38 btrfs-progs: dump-tree: add options to dump checksums
Add new options to dumps checksums in node headers and in the checksum
items:

  $ btrfs inspect dump-tree --csum-headers image
  root tree
  leaf 471515136 items 19 free space 12186 generation 15 owner ROOT_TREE
  leaf 471515136 flags 0x1(WRITTEN) backref revision 1 csum 0x756b2d54
  fs uuid df0348df-5773-47dd-81e9-a18221461239

For nodes/leaves it's appended on the 2nd line of the header.

Checksum items are stored in leaves as EXTENT_CSUM key type, with offset
value as the logical offset starting. As the array would be hard to
parse or match, each offset value is printed with the checksum. For
crc32c it's 4 values on a line, for xxhash it's 2 and for the long
256bit checksums it's one checksum per line.

  $ btrfs inspect dump-tree --csum-items image
  leaf 5423104 items 1 free space 30 generation 6 owner CSUM_TREE
  leaf 5423104 flags 0x1(WRITTEN) backref revision 1
  fs uuid bd7c981e-16ff-4081-a734-3ef5d50cafc1
  chunk uuid 13f4c76c-7845-4984-88ed-f01b52e05cf8
	  item 0 key (EXTENT_CSUM EXTENT_CSUM 22020096) itemoff 55 itemsize 16228
		  range start 22020096 end 38637568 length 16617472
		  [22020096] 0x8941f998 [22024192] 0x8941f998 [22028288] 0x8941f998 [22032384] 0x8941f998
		  [22036480] 0x8941f998 [22040576] 0x8941f998 [22044672] 0x8941f998 [22048768] 0x8941f998
		  ...

  $ btrfs inspect dump-tree --csum-items image
  leaf 5718016 items 1 free space 7746 generation 6 owner CSUM_TREE
  leaf 5718016 flags 0x1(WRITTEN) backref revision 1
  fs uuid f453a5b4-8b4a-4fbf-90a2-2925e4fe2335
  chunk uuid eb1da63b-248b-44c2-82da-71b2564bf50e
	  item 0 key (EXTENT_CSUM EXTENT_CSUM 52387840) itemoff 7771 itemsize 8512
		  range start 52387840 end 53477376 length 1089536
		  [52387840] 0x686ede9288c391e7e05026e56f2f91bfd879987a040ea98445dabc76f55b8e5f
		  [52391936] 0x686ede9288c391e7e05026e56f2f91bfd879987a040ea98445dabc76f55b8e5f
		  ...

The options are not on by default, the header checksum is not important
for the structures. Data checksums can be quite big so that would make
the dump long and without any actual data to match against.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-06-19 22:07:49 +02:00
David Sterba e034d2bbaa btrfs-prog: docs: add recent new mount options and features
Signed-off-by: David Sterba <dsterba@suse.com>
2021-05-08 00:58:51 +02:00
David Sterba 1af37385e2 btrfs-progs: docs: move inode_cache to deprecated options
The inode_cache mount option does nothing since 5.11, update the docs.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-05-08 00:58:50 +02:00
David Sterba 016aa9102a btrfs-progs: docs: how to use swapfile from fstab
This was asked on reddit, how to automatically mount a swapfile from
fstab. As this is not completely obvious, document it with an example.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-05-06 16:41:44 +02:00
David Sterba 743d280915 btrfs-progs: docs: update chattr attribute for NOCOMPRESS
There were plans to add X as flag to set/unset the btrfs NOCOMPRESS
attribute but that never materialized. In e2fsprogs the letter 'm' has
been assigned to the same functionality and released in version 1.46.2.

Update the docs and mention that the compression options are
conflicting.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-05-06 16:41:44 +02:00
David Sterba 4a9b83c7a4 btrfs-progs: docs: add more general ioctl description
Add general paragraphs and establish per-ioctl argument description
formatting, using [horizontal] where the struct member and the
description are on the same line, unlike ordinary ::.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-03-24 22:20:19 +01:00
David Sterba cbadf0f1ae btrfs-progs: docs: change wording about required fsck
Make running the 'fsck' more explicit and add the commands with
recommended options.

Issue: #348
Signed-off-by: David Sterba <dsterba@suse.com>
2021-03-23 17:04:22 +01:00
David Sterba 922797e155 btrfs-progs: docs: add section about raid56
Used sources:

- wiki
- IRC discussions
- https://lore.kernel.org/linux-btrfs/20200627032414.GX10769@hungrycats.org

Signed-off-by: David Sterba <dsterba@suse.com>
2021-03-04 21:14:41 +01:00
David Sterba 2aeaea41a8 btrfs-progs: docs: add raid1c34 profiles to balance convert
The extended raid1 profiles are missing from the list.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-03-04 21:14:41 +01:00
David Sterba 2910ca8009 btrfs-progs: balance: use --force to override timeout for raid56 conversions
Enhance --force to also skip the timeout, similar to what --full-balance
does. As this is only to warn about RAID56 that won't be necessary in
the future, don't add a separate option. The warning is still printed.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-03-04 21:14:41 +01:00
David Sterba fc6818a46c btrfs-progs: docs: add section about seeding device
Issue: #341
Signed-off-by: David Sterba <dsterba@suse.com>
2021-03-01 16:47:15 +01:00
chrysn a7eca5cfe4 btrfs-progs: doc: snapshot -r and -i can be used together
This aligns the man page with the usage output of the tool, the notation
in the help text could be confusing as it reads like -r and -i are
mutually exclusive.

Signed-off-by: Christian Amsüss <chrysn@fsfe.org>
Signed-off-by: David Sterba <dsterba@suse.com>
2021-02-19 20:14:35 +01:00
Daniel Xu c11874ae81 btrfs-progs: rescue: add create-control-device subcommand
Add a new subcommand 'btrfs rescue create-control-device' that creates
/dev/btrfs-control. This is helpful on systems that may not have `mknod`
installed and the device node is missing for some reason.

Issue: #223
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
[ update docs ]
Signed-off-by: David Sterba <dsterba@suse.com>
2021-02-19 16:19:37 +01:00
David Sterba b691968d18 btrfs-progs: docs: clarify scrub requiring mounted filesystem
That scrub works only on a mounted filesystem is not clear in connection
with the possibility to start scrub on a given device. Update the manual
page and mention the mount requirement where approrpriate.

Issue: #335
Signed-off-by: David Sterba <dsterba@suse.com>
2021-01-29 15:12:34 +01:00
David Sterba f93d67ece1 btrfs-progs: docs: document command line conventions
First draft of the command line conventions regarding options, wording,
style and formatting.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-01-18 20:53:23 +01:00
Eric Semeniuc d2316fdfd2 btrfs-progs: docs: grammar and typo fix for btrfs check
Pull-request: #9
Signed-off-by: David Sterba <dsterba@suse.com>
2021-01-18 17:49:23 +01:00
Adam Borowski c615287cc0 btrfs-progs: a bunch of typo fixes
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: David Sterba <dsterba@suse.com>
2021-01-13 22:33:10 +01:00
Nikolay Borisov 04f1977832 btrfs-progs: check: add option to remove ino cache
Inode cache feature is going to be removed in kernel 5.11. After this
kernel version items left on disk by this feature will take some extra
space. Testing showed that the size is actually negligible but for
completeness' sake give ability to users to remove such left-overs.

This is achieved by iterating every fs root and removing respective
items as well as relevant csum extents since the ino cache used the csum
tree for csums.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-12-16 17:08:53 +01:00
David Sterba 5f7191135f btrfs-progs: fix short/long unit size options
The two variants of unit options are not suitable for all commands, the
short options could interfere with existing options or limit future
extensions.

In 'filesystem du' the short options are not documented neither in help
text, nor in documentation so fix the code

In 'scrub status' it's the same but the documentation needs to be fixed
as well.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-12-16 17:08:52 +01:00
David Sterba 022168c32d btrfs-progs: subvol show: fix required arguments in help texts
The help text and documentation of the --rootid and --uuid parameters
is wrong as it does not say there's a required parameter. Add it and
enhance the docs to clarify what the options do.

Issue: #317
Signed-off-by: David Sterba <dsterba@suse.com>
2020-12-16 17:08:52 +01:00
David Sterba ffd1601236 btrfs-progs: docs: document fs exclusive operations
Signed-off-by: David Sterba <dsterba@suse.com>
2020-12-16 17:08:52 +01:00
David Sterba e198c6674a btrfs-progs: add enqueue parameter for exclusive ops
The exclusive ops will not start if there's one already running. Now
that we have the sysfs export (since kernel 5.10) to check if there's
one already running, use it to allow enqueueing of the operations as a
convenience.

Supported enqueuing:

  btrfs balance start --enqueue
  btrfs filesystem resize --enqueue
  btrfs device add --enqueue
  btrfs device delete --enqueue
  btrfs replace start --enqueue

This patch implements the functionality based on Goldwyn's patch
https://lore.kernel.org/linux-btrfs/?q=20200825150338.32610-4-rgoldwyn%40suse.de
but on top of previous preparatory patches.

Note that 'filesystem resize' options could confuse getopt as the
negative size change looks like a series of short options and there's no
way to make getopt ignore the short options, so there's a custom option
parser.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-12-16 17:08:12 +01:00
Sidong Yang 0c77d2cd03 btrfs-progs: fi usage: add avail info from statfs()
Add available space information from statfs(). This can be different from
'Free (estimated)' in some cases. This patch provide more information
about filesystem usage like below.

Overall:
    Device size:                   5.00GiB
    Device allocated:              1.02GiB
    Device unallocated:            3.98GiB
    Device missing:                  0.00B
    Used:                         88.00KiB
    Free (estimated):              4.48GiB      (min: 2.49GiB)
    Free (statfs, df)              4.48GiB
    Data ratio:                       1.00
    Metadata ratio:                   2.00
    Global reserve:              832.00KiB      (used: 0.00B)
    Multiple profiles:                  no

Issue: #306
Signed-off-by: Sidong Yang <realwakka@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-12-10 17:10:30 +01:00
Tomasz Torcz 90e64aae4b btrfs-progs: docs: add info about "single" profile requirements for swapfile
The limitation is there since first commit implementing swapfiles support.

Pull-request: #315
Signed-off-by: Tomasz Torcz <tomek@pipebreaker.pl>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-12-10 17:10:30 +01:00
David Sterba c4b84f1c5d btrfs-progs: docs: fix mknod arguments of the control device
The provided does not work, the name argument is in the wrong place.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-11-06 14:35:10 +01:00
David Sterba cc2dd28136 btrfs-progs: docs: add missing option to scrub status
Signed-off-by: David Sterba <dsterba@suse.com>
2020-11-04 22:44:55 +01:00
David Sterba d60d48fce5 btrfs-progs: scrub status: add unit mode options
Add long options for size units, affecting total and currently scrubbed
bytes. The rate depends on the device speed and could be
disproportionate to the size so it is not affected, except the --raw
option that is in bytes without unit suffix.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-11-04 22:44:36 +01:00
Sidong Yang 4179885cf9 btrfs-progs: docs: add qgroup examples
This patch adds examples section in btrfs-qgroup documentation.
The example make a quota group that has two subvolumes as children.

Signed-off-by: Sidong Yang <realwakka@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-10-02 20:12:09 +02:00
Forza-tng fbe95d714f btrfs-progs: docs: update limits for minimal device size
Add limits:

  # mkfs.btrfs loop.img
  btrfs-progs v5.7
  See http://btrfs.wiki.kernel.org for more information.

  ERROR: 'loop.img' is too small to make a usable filesystem
  ERROR: minimum size for each btrfs device is 114294784

  # mkfs.btrfs --mixed loop.img
  btrfs-progs v5.7
  See http://btrfs.wiki.kernel.org for more information.

  ERROR: 'loop.img' is too small to make a usable filesystem
  ERROR: minimum size for each btrfs device is 16777216

Pull-request: #287
Author: Forza-tng <Forza-tng@users.noreply.github.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-10-02 20:12:09 +02:00
Boris Burkov 92d92e99b7 btrfs-progs: mkfs: support free space tree as -R option
Add a runtime feature (-R) flag for the free space tree. A filesystem
that is mkfs'd with -R free-space-tree then mounted with no options has
the same contents as one mkfs'd without the option, then mounted with
'-o space_cache=v2'.

The only tricky thing is in exactly how to call the tree creation code.
Using btrfs_create_free_space_tree as is did not quite work, because an
extra reference to the eb (root->commit_root) is leaked, which mkfs
complains about with a warning. I opted to follow how the uuid tree is
created by adding it to the dirty roots list for cleanup by
commit_tree_roots in commit_transaction. As a result,
btrfs_create_free_space_tree no longer exactly matches the version in
the kernel sources.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-09-08 22:06:04 +02:00
Marcos Paulo de Souza 56e8e90219 btrfs-progs: docs: remove nonexistent nousebackuproot option
Since it's inclusion in b3751c131a ("btrfs-progs: docs: update
btrfs-man5"), this option has never been available in kernel as
usebackuproot is a one-time mount option.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-08-31 17:01:03 +02:00
David Sterba 9f5df56f73 btrfs-progs: docs: update profiles
- add missing raid1c34 profiles to the list of supported profiles
- document defaults change in 5.8
- update wording

Signed-off-by: David Sterba <dsterba@suse.com>
2020-07-22 11:36:59 +02:00
David Sterba ffd3b4cda2 btrfs-progs: docs: note when subvolume cannot be deleted
Signed-off-by: David Sterba <dsterba@suse.com>
2020-07-14 15:04:05 +02:00
David Sterba b677e6bb03 btrfs-progs: docs: remove deprecated alloc_start and subvolrootid
The options have been deprecated for a long time, the kernel mount
options are being removed too (in 5.9).

Signed-off-by: David Sterba <dsterba@suse.com>
2020-07-03 14:21:17 +02:00
David Sterba 4bd94dba8a btrfs-progs: mkfs: remove alloc start options and docs
The option -A was used long time ago for debugging and marked as
obsolete since 4.14.1. Remove the option and set the alloc start to the
default value 1MiB.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-07-02 22:24:34 +02:00
David Sterba 27a65e016e btrfs-progs: deprecate subcommand specific verbose/quiet options
Many subcommands have their own verbosity options that are being
superseded by the global options. Update the help text to reflect that
where applicable.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-06-29 17:45:40 +02:00
David Sterba 94dbcc2958 btrfs-progs: docs: update bootloader section
Add reference to u-boot and primary super block offset.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-06-18 11:41:57 +02:00
David Sterba f1a1184f2c btrfs-progs: fi defrag: clarify recursive mode
Directory symlinks are not followed in the recursive mode, add that to
the documentation.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-06-17 22:11:12 +02:00
David Sterba 9532249690 btrfs-progs: docs: clarify balance regarding extent sharing
Based on user questions, the word 'rewrite' may sound confusing as the
defragmetation also rewrites data but break extent sharing, while
balance does not do that.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-06-17 21:19:21 +02:00
David Sterba 7e3f269cb9 btrfs-progs: docs: remove option logreplay
There's no such option 'logreplay', only 'nologreplay'. Remove it from
the list and update the help text.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-06-10 17:27:11 +02:00
David Sterba 70e3d52d7b btrfs-progs: docs: add discard=async to mount options
Document the new discard mode.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-06-09 22:19:10 +02:00
David Sterba 62ee9a50bf btrfs-progs: docs: update conventions
Rename to asciidoc as that's the format we use for manual page source.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-06-09 22:19:09 +02:00
David Sterba b79683252a btrfs-progs: docs: update balance
- note the faster cancellation
- redundancy reduction
- system also gets converted with metadata conversion

Signed-off-by: David Sterba <dsterba@suse.com>
2020-06-09 22:19:09 +02:00
David Sterba 0015e8ff26 btrfs-progs: docs: clarify file attributes and flags
Signed-off-by: David Sterba <dsterba@suse.com>
2020-06-09 22:19:09 +02:00
David Sterba 7462b0af16 btrfs-progs: docs: update list of features exported in sysfs
List remaining entries in /sys/fs/btrfs/features available in kernel
5.6.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-06-09 22:19:09 +02:00
David Sterba ba689a384f btrfs-progs: docs: update 'fi us' examples
Add description of each line, update the per-type output.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-05-29 12:42:49 +02:00
Qu Wenruo 6ee4ab24da btrfs-progs: mkfs: introduce quota runtime feature
Add support for enabling quotas at mkfs time. The qgroup accounting will
be consistent, ie. works with --rootdir.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-05-28 19:59:56 +02:00
Qu Wenruo 5ac6e02665 btrfs-progs: mkfs: add -R|--runtime-features option
Just like -O|--features, introduce -R|--runtime-features to enable
features that are now enabled on a mounted filesystem

Currently only mkfs is supported, convert is not supported yet.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-05-28 19:59:56 +02:00
David Sterba 0fc5b550e3 btrfs-progs: docs: update section about multiple block group profiles
Signed-off-by: David Sterba <dsterba@suse.com>
2020-05-05 17:08:20 +02:00
David Sterba d617327acb btrfs-progs: docs: clarify mount options
Issue: 246
Signed-off-by: David Sterba <dsterba@suse.com>
2020-05-04 20:49:01 +02:00
Alexandru Ungureanu 6ffdd00e79 btrfs-progs: docs: add example on deleting a subvolume
Perhaps a rather trivial example but I find it helpful to see usage
examples. Maybe it will help others.

Pull-request: #244
Author: Alexandru Ungureanu <khakcarot@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-05-04 20:48:58 +02:00
Alexandru Ungureanu 378a1ab8ff btrfs-progs: docs: improved asciidoc syntax to fix rendering issues
This example in device replace doesn't render properly in browsers,
think it's just misuse of syntax. Unfortunately, the github preview
renderer doesn't seem to catch that. Otherwise, manual page and html
rendering is ok.

The syntax uses Example delimited block:

.Heading
====
contents
====

Pull-request: #245
Author: Alexandru Ungureanu <khakcarot@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-05-04 20:48:52 +02:00
Goffredo Baroncelli 24dcafc491 btrfs-progs: docs: add section about multiple profiles
Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-05-04 20:48:35 +02:00
Adam Borowski 3d379b1341 btrfs-progs: lots of typo fixes (codespell)
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-31 18:37:38 +02:00
David Sterba d028b3998e btrfs-progs: dump-tree: rename to option to --hide-names
Previously, no filenames/xattrs would be printed with --nofilename, but
to keep the format of dump, print a placeholder instead of all names.
This is:

* directory entries (files, directories, subvolumes)
* default subvolume
* extended attributes (name, value)
* hardlink names if stored inside another item

Note that lengths are not hidden because they can be calculated from the
item size anyway.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-20 22:05:27 +01:00
Qu Wenruo 4d4e7d7c9f btrfs-progs: dump-tree: Introduce --nofilename option
In the mail list, it's pretty common that a developer is asking dump tree
output from the reporter, it's better to protect those kind reporters by
hiding the filename if the reporter wants.

This option will skip @name/@data output for the following items:
- DIR_INDEX
- DIR_ITEM
- INODE_REF

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-20 22:05:26 +01:00
David Sterba 3babb783ab btrfs-progs: docs: dump-tree, fix formatting of --dfs/--bfs
Description that's not one paragraph needs to be joned to the following
section with +.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-20 22:05:26 +01:00
Michael Lass 8d03e630e9 btrfs-progs: qgroup: allow passing options to qgroup remove
According to the documentation, btrfs qgroup remove takes the same
options as qgroup assign, i.e., --rescan and --no-rescan. However,
currently no options are accepted. Activate option handling also for
qgroup remove, so that automatic rescan can be disabled by the user.

Signed-off-by: Michael Lass <bevan@bi-co.net>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-20 22:05:25 +01:00
Marcos Paulo de Souza 6e85994e80 btrfs-progs: subvol delete: add --subvolid argument to deletee by id
This ioctl will be responsible for deleting a subvolume using its id.
This can be used when a system has a file system mounted from a
subvolume, rather than the root file system, like below:

/
@subvol1/
@subvol2/
@subvol_default/

If only @subvol_default is mounted, we have no path to reach @subvol1
(id 256) and @subvol2 (id 257), thus no way to delete them. Current
subvolume delete ioctl takes a file handle point as argument, and if
@subvol_default is mounted, we can't reach @subvol1 and @subvol2 from
the same mount point.

  $ mount -o subvol=subvol_default /mnt
  $ btrfs subvolume delete -i 257 /mnt

This will delete @subvol2 although it's path is hidden.

Fixes: #152
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-04 19:21:09 +01:00
Stefan 4e21389c0c btrfs-progs: docs: fix minor typos
Pull-request: #235
Author: Stefan <stefan.haubenthal@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-03 19:58:55 +01:00
David Sterba 015402b847 btrfs-progs: docs: clarify filesystem sync and subvolume cleaning
Qu reported that the 'fi sync' should be clarified regarding the
subvolume cleaning. Update the paragraph as sugested by Graham.

Link: https://lore.kernel.org/linux-btrfs/20200210090201.29979-1-wqu@suse.com
Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-03 19:58:54 +01:00
David Sterba 7e26b93932 btrfs-progs: docs: update scrub
Clarify status file updates after cancel, io schedulers.

Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-03 19:58:53 +01:00
Zygo Blaxell 3c5254b187 btrfs-progs: inspect-internal: document new logical-resolve options and kernel requirements
Document the new options requiring the V2 ioctl and the increased
default buffer size.

Signed-off-by: Zygo Blaxell <ce3g8jdj@umail.furryterror.org>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-03-03 19:58:53 +01:00
A. Wilcox 2a064d77a7 btrfs-progs: docs: Don't erase XMLTO_EXTRA contents, fix docbook5 build
XMLTO_EXTRA is defined above, and then appended to if `asciidoctor` is
used to generate the manual pages.  The second definition was clearing
the value of this variable, which caused builds with asciidoctor to
fail with:

```
    [XMLTO]  btrfs-ioctl.3
xmlto: /usr/src/packages/user/btrfs-progs/src/btrfs-progs-v5.4/Documentation/btrfs-ioctl.xml does not validate (status 3)
xmlto: Fix document syntax or use --skip-validation option
validity error : no DTD found!
Document /usr/src/packages/user/btrfs-progs/src/btrfs-progs-v5.4/Documentation/btrfs-ioctl.xml does not validate
make[1]: *** [Makefile:114: btrfs-ioctl.3] Error 13
```

Fixes: 669f56177 ("btrfs-progs: docs: use docbook5 backend for asciidoctor")
Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-01-09 14:28:52 +01:00
Alexandru Ungureanu 329a5bba15 btrfs-progs: docs: add example for replacing an online drive
Added example for replacing an online drive in a healthy with a bigger
one.

Pull-request: #217
Author: Alexandru Ungureanu <khakcarot@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-11-22 19:09:52 +01:00
Marcos Paulo de Souza 50ec684a20 btrfs-progs: docs: clarify the default list sort order of subvolumes
By default, "btrfs subvolume list" will show the subvolumes sorted by
subovlume id, in ascending order. Make this explicit in subvolume manual
page.

Pull-request: #220
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-11-22 19:09:51 +01:00
David Sterba 899977cd18 btrfs-progs: docs: update mkfs blockgroup description
- add raid1c34
- add utilization to the overview table
- wording updates

Signed-off-by: David Sterba <dsterba@suse.com>
2019-11-22 19:09:51 +01:00
David Sterba a85c496c0d btrfs-progs: docs: update check modes
Signed-off-by: David Sterba <dsterba@suse.com>
2019-11-22 19:07:21 +01:00
David Sterba a999abb7e9 btrfs-progs: docs: document new --repair --force behaviour
Signed-off-by: David Sterba <dsterba@suse.com>
2019-11-22 19:07:20 +01:00
David Sterba a517225ece btrfs-progs: docs: checksum algorithms
Signed-off-by: David Sterba <dsterba@suse.com>
2019-11-22 19:07:20 +01:00
David Sterba c981414ea3 btrfs-progs: docs: switch btrfs(5) to auto-numbered list
Each new chapter needed renumbering the whole list, this can be avoided.

Signed-off-by: David Sterba <dsterba@suse.com>
2019-11-22 19:07:20 +01:00
David Sterba c1a1aa9e33 btrfs-progs: docs: document checksum options for mkfs and convert
Signed-off-by: David Sterba <dsterba@suse.com>
2019-11-22 19:07:20 +01:00
Merlin Büge 99d6346048 btrfs-progs: small fixes/cleanup in Documentation
The removed paragraph in btrfs-man5.asciidoc says the same as the
previous one.

Signed-off-by: Merlin Büge <merlin.buege@tuhh.de>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-11-18 19:21:06 +01:00
Dennis Zhou 483179bbae btrfs-progs: docs: add compression level support for mount options
As of 5.1, btrfs now supports compression levels for zstd. Let users
know about this in the man page.

Pull-request: #204
Signed-off-by: Dennis Zhou <dennis@kernel.org>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-10-14 17:29:44 +02:00
Dimitri John Ledkov 669f561775 btrfs-progs: docs: use docbook5 backend for asciidoctor
Switch backend to docbook5 for asciidoctor and disable validation as v5
does not use DTBs.

Pull-request: #203
Issue: #201
Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-10-14 17:28:09 +02:00
Vladimir Panteleev ed2b4dc638 btrfs-progs: docs: document btrfs-balance exit status in detail
Signed-off-by: Vladimir Panteleev <git@vladimir.panteleev.md>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-10-14 17:27:44 +02:00
David Sterba f55bdde2f9 btrfs-progs: dump-tree: update help and docs regarding DFS/BFS
The default traversal has been switched to BFS due, update the
documentation accordingly. Also fix the help text of the command that
ommitted to mention the options.

Signed-off-by: David Sterba <dsterba@suse.com>
2019-10-14 17:27:31 +02:00
Hans van Kranenburg e46e17ab5a btrfs-progs: docs: fix label property description
Recently, commit c9da5695b2 improved the description for the label
property, to clarify it's a filesystem property, and not a device
property. Follow this change in the man page for btrfs-property.

Also add a little hint about what to specify as object.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-09-04 16:06:36 +02:00
David Sterba b4cadc2ac9 btrfs-progs: docs: fix formatting of btrfs(5)
Two paragraphs for 'discard' mount option were not aligned in the
section and the swapfile bullet list was squashed to one line. All in
the manual page output.

Signed-off-by: David Sterba <dsterba@suse.com>
2019-09-04 16:06:33 +02:00
Anand Jain 03241303eb btrfs-progs: dump-tree: add noscan option
The comman 'btrfs inspect dump-tree <dev>' will scan all the devices
from the filesystem by defaul.

So as of now you can not inspect each mirrored device independently.

This patch adds option --noscan, which when used won't scan the system
for the partner devices, instead it just uses the devices provided in
the argument.

For example:
  btrfs inspect dump-tree --noscan <dev> [<dev>..]

This helps to debug degraded raid1 and raid10.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-07-04 15:36:00 +02:00
David Sterba 4c70b84aba btrfs-progs: document the new all-in-one binary
Signed-off-by: David Sterba <dsterba@suse.com>
2019-07-04 15:36:00 +02:00
David Sterba 8d3da70b36 btrfs-progs: docs: update fi du regarding recursion
State that 'fi du' does descend to subvolumes.

Issue: #185
Signed-off-by: David Sterba <dsterba@suse.com>
2019-07-04 02:06:35 +02:00
David Sterba 534c296121 btrfs-progs: docs: update defrag regarding recursion
State that defrag by default does not descend to subvolumes, this has
been hidden in implementation details.

Issue: #185
Signed-off-by: David Sterba <dsterba@suse.com>
2019-07-04 02:06:35 +02:00
David Sterba 88f4bcb351 btrfs-progs: test: add simple test for defrag recursion depth
The documentation lacks clarity about depth to which recursive
defragmentation go, and was pointed out by a user.

The problem here is that the subvolume behaves the same as mount point
regarding path traversal. The nftw stops on mount boundary (FTW_MOUNT).

Add test that verifies this behaviour. Defrag has to be updated to allow
descending to subvolumes (and not mountpoints).

Issue: #185
Signed-off-by: David Sterba <dsterba@suse.com>
2019-07-04 02:06:35 +02:00
David Sterba 6645837afd btrfs-progs: docs: add reference of section 5 page
The page from section 5 is in the text, make it more visible and add it
to the references too.

Signed-off-by: David Sterba <dsterba@suse.com>
2019-07-03 13:31:14 +02:00
Qu Wenruo f312aff23f btrfs-progs: inspect-dump-tree: Allow --block to be specified multiple times
Reuse extent-cache facility to record multiple bytenr so --block can be
specified multiple times.

Despite that, add a sector size alignment check before we try to print a
tree block.  Please note that, nodesize alignment check is not suitable
here as meta chunk start bytenr could be unaligned to nodesize.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-03-05 15:58:06 +01:00
Steven Davies 33b4acc7df btrfs-progs: receive: add option for quiet mode
Provide an option in `btrfs receive` to suppress the informational
messages when writing files.

Signed-off-by: Steven Davies <btrfs@steev.me.uk>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-03-05 15:33:54 +01:00
David Sterba cec1472792 btrfs-progs: docs: add scan --forget
Signed-off-by: David Sterba <dsterba@suse.com>
2019-03-01 16:49:53 +01:00
David Sterba 111f1473bd btrfs-progs: docs: document btrfstune -m/-M
Signed-off-by: David Sterba <dsterba@suse.com>
2019-01-17 00:52:09 +01:00
David Sterba 45c2b3bb89 btrfs-progs: docs: btrfstune: sort options alphabetically
Signed-off-by: David Sterba <dsterba@suse.com>
2019-01-17 00:34:10 +01:00
Andrea Gelmini c8d3986ed7 btrfs-progs: docs: update scrub docs
Enhance the note what scrub does not compared to 'check'.

Author: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-01-15 18:56:04 +01:00
David Sterba 5c880c82c2 btrfs-progs: docs: add swapfile support description to sect. 5
Signed-off-by: David Sterba <dsterba@suse.com>
2019-01-15 18:42:14 +01:00
David Sterba 5121b09519 btrfs-progs: docs: update system limits texts in sect. 5
Signed-off-by: David Sterba <dsterba@suse.com>
2019-01-15 18:42:13 +01:00
David Sterba 428bb2e9c2 btrfs-progs: docs: add metadata_uuid description to sect. 5
Signed-off-by: David Sterba <dsterba@suse.com>
2019-01-15 18:42:13 +01:00
David Sterba 71ba47d26e btrfs-progs: docs: add bootloader support to section 5
Add the section with brief summary of the support. The supported
features could be mentioned explicitly with versions, and other examples
of "check before use" that could lead to unbootable systems.

Signed-off-by: David Sterba <dsterba@suse.com>
2019-01-15 18:42:13 +01:00
David Sterba 1bff5b8261 btrfs-progs: docs: enhance subvol show documentation and help
There's a suggestion in #158 to improve the documenatation of the subvol
show command so it's more obvious what kind of information it provides.

I've updated the docs according to that and added an example that should
make the request for creation time at least greppable, the overall
description mentions 'times' so this should be enough as a pointer.

Pull-request: #158
Suggested-by: Robert Pollak <robert.pollak@posteo.net>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-01-15 18:42:13 +01:00
David Disseldorp a4a6e51047 btrfs-progs: docs: fix balance -f grammar
Signed-off-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: David Sterba <dsterba@suse.com>
2019-01-15 18:42:12 +01:00
Josh Soref f0cdb2c9fb btrfs-progs: docs: fix typos in Documentation
Generated by https://github.com/jsoref/spelling

Issue: #154
Author: Josh Soref <jsoref@users.noreply.github.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-11-26 17:32:10 +01:00
David Sterba 5d64c40240 btrfs-progs: docs: fix rendering of exponents in manual pages
Reported on IRC that the inode number limit appears to be 264, while the
actual value is 2^64. Fix that for the manual page backend by redefining
the format.

Signed-off-by: David Sterba <dsterba@suse.com>
2018-11-20 11:16:02 +01:00
Qu Wenruo 325256a232 btrfs-progs: doc: Update btrfs-qgroup regarding the rescan conditions
Add a new section, QUOTA RESCAN, to explain why and when we need a full
quota rescan when assigning/removing qgroup relationship.

Also, since 'remove' shares the same options of 'assign', add reference
to 'assign' options for 'remove' subcommand.

Signed-off-by: Qu Wenruo <wqu@suse.com>
[ update ]
Signed-off-by: David Sterba <dsterba@suse.com>
2018-10-31 18:24:14 +01:00
Qu Wenruo dda84b8a16 btrfs-progs: qgroup: make --rescan the default behavior after assign
Even though we have --rescan option, it still needs the user to manually
specify it or call quota rescan command.

This does not make much sense for the most common usecase and only
confuses users.  When the rescan is not desired, the --no-rescan option
can be used, eg.  when a mass qgruop assignment happens and the repeated
rescan would slow things down. This is considered a marginal usecase.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-10-31 18:24:14 +01:00
Qu Wenruo 0bbd407cbb btrfs-progs: print-tree: Introduce --bfs and --dfs options
Originally print-tree uses depth first search to print trees.
This works fine until we reach 3 level trees (root node level is 2).

For tall trees whose root level is 2 or higher, DFS will mix nodes and
leaves like the following example:

Level 2                       A
                             / \
Level 1                     B   C
                          / |   | \
Level 0                  D  E   F  G

DFS will cause the following output sequence:
A   B   D   E   C   F   G
Which in term of node/leave is:
N   N   L   L   N   L   L

Such mixed node/leave result is sometimes hard for human to read.

This patch will introduce 2 new options, --bfs and --dfs.

  --dfs: keeps the original output sequence, and to keep things
         compatible it's the default behavior.

  --bfs: uses breadth-first search, and will cause better output
         sequence like:

	 A   B   C   D   E   F   G
	 Which in term of node/leave is:
	 N   N   N   L   L   L   L

Much better sorted and may become default in the future.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-10-31 18:24:14 +01:00
Misono Tomohiro 47abaaf6d0 btrfs-progs: doc: update manual page of btrfs subvolume
Some information is obsolete and updated as follows:

 - add missing explanations of some options
 - remove outdated explanation of "subvolrootid" mount option
 - reorder/group options of "subvolume list" so it matches the  help
   message
 - add explanation of different meanings of parent in "parent ID/UUID"
 - fix indentation/spelling
 - add missing comma

Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-10-31 18:24:14 +01:00
David Sterba 51074d2f78 btrfs-progs: docs: update clean target file masks
There's a regular manual page that matches the file glob mask *.8 so we
have to be more careful and remove only the known intermediate files.

Signed-off-by: David Sterba <dsterba@suse.com>
2018-10-23 14:48:39 +02:00
David Sterba 678d6c9c0f btrfs-progs: build: remove gzip dependency
The manual pages are not compressed anymore and we can remove gzip from
build dependencies and build steps.

Signed-off-by: David Sterba <dsterba@suse.com>
2018-10-23 14:48:39 +02:00
Mike Gilbert 14357b3e34 btrfs-progs: docs: install uncompressed manual pages
Build systems do not typically compress man pages when installing them.
This is generally left to distro packaging mechanisms, which may end up
recompressing them using a different compressor.

Author: Mike Gilbert <floppym@gentoo.org>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-10-23 14:48:39 +02:00
David Sterba c0bf61709b btrfs-progs: docs: use manual page link instead of symlink
In order to install uncompressed manual pages we can't use the symlink
for the deprecated btrfsck page. Replace it by source command provided
by the manual page format.

Old: man8/btrfsck.8.gz (symlink)
New: man8/btrfsck.8 (file)

Reported-by: Mike Gilbert <floppym@gentoo.org>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-10-23 14:48:39 +02:00
Su Yue 3894560deb btrfs-progs: docs: update document about option -R of btrfs-scrub
The option '-R' of btrfs-scrub was documented by mistake as
'print raw statistics per-device instead of a summary'.

Here change it to 'raw print mode, print full data instead of
summary' which it works actually.

Fixes: 162257574a ("btrfs-progs: docs: update btrfs-scrub")
Reported-by: Chris Murphy <chris@colorremedies.com>
Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-10-23 14:48:38 +02:00
Misono Tomohiro c722bb24f8 btrfs-progs: doc: Update man 5 btrfs for 4.18
Update the information to reflect the status of 4.18

Main Updates:

- Add explanation of improved compression heuristic algorithm
- Add explanation that norecovery == nologreplay
- Add explanation of nossd_spread mount option
- Add explanation of rmdir_subovl feature

Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
[ minor updates ]
Signed-off-by: David Sterba <dsterba@suse.com>
2018-08-06 15:01:26 +02:00
Nikolay Borisov 5a87a95115 btrfs-progs: Remove deprecated btrfs-show-super
Its function has been superseded by btrfs inspect-internal show-super.
Furthermore the tools is currently not built by default. Just remove it.

Deprecated since 4.8.

Issue: #97
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-04-24 13:00:10 +02:00
Nikolay Borisov df9158f20d btrfs-progs: Remove deprecated btrfs-zero-log standalone tool
Its function has been subsumed by "btrfs rescue zero-log". Remove its
source file and adjust make/tests soruces accordingly.

Deprecated since 4.0.

Issue: #97
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-04-24 13:00:10 +02:00
Nikolay Borisov de34a33a82 btrfs-progs: Remove btrfs-debug-tree command
There is already a replacement in the face of btrfs inspect-internal
dump-tree. And this command is just a simple wrapper around it. Just
remove it and adjust the show-blocks script to call the main btrfs
binary to achieve the same effect.

Informally deprecated since 4.4.

Issue: #97
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-04-24 13:00:10 +02:00
David Sterba d0aafc51e4 btrfs-progs: docs: fix typos
A few more typo fixes, merged with the pull request.

Pull-request: #120
Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-03-31 00:13:23 +02:00
Qu Wenruo 992aa55839 btrfs-progs: dump-tree: add option to print children nodes of a given block
When debuging with "btrfs inspect dump-tree", it's not that handy if we
want to iterate all child tree blocks starting from a specified block.

-b can only print a single block, while without -b "btrfs inspect dump-tree"
will need extra tree roots fulfilled to continue, which is not possible
for a damaged filesystem.

Add a new option --follow to iterate a sub-tree starting from block
specified by --block.

Signed-off-by: Qu Wenruo <wqu@suse.com>
[ remove the short option for now ]
Signed-off-by: David Sterba <dsterba@suse.com>
2018-03-30 22:15:54 +02:00
Nicholas D Steeves 0dc758d89e btrfs-progs: Fix typos in docs and user-facing strings
Signed-off-by: Nicholas D Steeves <nsteeves@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-03-30 22:15:54 +02:00
David Sterba fd5767a574 btrfs-progs: docs: add section about filesystem limits to btrfs(5)
Signed-off-by: David Sterba <dsterba@suse.com>
2018-03-30 22:15:53 +02:00
David Sterba 652544f4c0 btrfs-progs: build: add support for asciidoctor doc generator
We've been using asciidoc that's written in python2, which is going to
be phased out and deprecated next year. There's a replacement,
asciidoctor. Add a configure-time detection which tool is available,
update Documentation/Makefile.in.

The original asciidoc tool is still preferred as it produces slightly
better output. The file asciidoc.conf does not have a direct equivalten
in asciidoct and would need to be replaced by extension written in ruby.

The differences:

- the <literal> are not automatically underlined and are less visible in
  the generated manual page, but it's still acceptable
- the inline CSS for the html output looks subjectively worse, is less
  compact and colourful

Issue: #89
Signed-off-by: David Sterba <dsterba@suse.com>
2018-02-02 21:02:13 +01:00
David Sterba 4523dc2776 btrfs-progs: docs: fix manual page title format
Asciidoctor is more strict about the formatting for the manual pages and
needs exact number of =.

Signed-off-by: David Sterba <dsterba@suse.com>
2018-02-02 21:02:13 +01:00
William Giokas 93f1cf07f0 btrfs-progs: docs: fix typo in btrfs-filesystem manual page
Pull-request: #86
Signed-off-by: William Giokas <1007380@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-01-31 15:14:03 +01:00
David Sterba 30bce43dfd btrfs-progs: docs: clean all generated files
The section 3 manual page btrfs-ioctl was not deleted.

Signed-off-by: David Sterba <dsterba@suse.com>
2018-01-31 15:14:03 +01:00
David Sterba fab56e8c84 btrfs-progs: docs: update manual for mkfs --shrink
Signed-off-by: David Sterba <dsterba@suse.com>
2018-01-08 18:15:24 +01:00
Qu Wenruo 1c9c5f7fb3 btrfs-progs: mkfs: Separate shrink from rootdir
Make --shrink a separate option for --rootdir, and change the default to
off.

The shrinking behaviour is not a commonly used feature but can be useful
for creating minimal pre-filled images, in one step, without requiring
to mount.

Signed-off-by: Qu Wenruo <wqu@suse.com>
[ update changelog and error messages ]
Signed-off-by: David Sterba <dsterba@suse.com>
2018-01-08 18:15:15 +01:00
Nicholas D Steeves 8c5db79d0f btrfs-progs: docs: annual typo, clarity, & grammar review & fixups
Signed-off-by: Nicholas D Steeves <nsteeves@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-01-03 17:29:19 +01:00
Faalagorn 0a9ab87252 btrfs-progs: docs: fix typo in btrfs-man5
Pull-request: #81
Author: Faalagorn <faalagorn@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-01-03 17:29:19 +01:00
David Sterba 2d6f49ffaa btrfs-progs: docs: make option -A of mkfs less visible
The option will be removed in the future, move it to the end of the
list.

Signed-off-by: David Sterba <dsterba@suse.com>
2018-01-03 17:29:19 +01:00
Howard 4c09c15f46 btrfs-progs: docs: update btrfs-subvolume manual page
To simplify, I suggest moving the 'writable/readonly' issue only to the
-r line, instead of having it introduced in two places.

Pull-request: #80
Author: Howard <hwj@BridgeportContractor.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-01-03 17:09:35 +01:00
David Sterba 561e6da458 btrfs-progs: docs: move the rescue fix-device-size command and update
The subcommands are supposed to be in alphabetical order, move it to the
right spot and reword.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-11-14 16:20:14 +01:00
David Sterba a0abb06218 btrfs-progs: docs: add note about mount option applicability
Copied from https://btrfs.wiki.kernel.org/index.php/Mount_options .

Signed-off-by: David Sterba <dsterba@suse.com>
2017-11-14 15:59:00 +01:00
David Sterba c9fa9355f3 btrfs-progs: docs: add impact of atime/noatime
Copy from wiki
https://btrfs.wiki.kernel.org/index.php?title=Mount_options

Signed-off-by: David Sterba <dsterba@suse.com>
2017-11-14 15:59:00 +01:00
David Sterba 94856dd547 btrfs-progs: docs: update mount options
Enhance the text, update for 4.14, sync with existing wiki page.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-11-14 15:59:00 +01:00
Benjamin Peterson 3daa286951 btrfs-progs: docs: correct grammar
Signed-off-by: Benjamin Peterson <bp@benjamin.pe>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-11-14 15:59:00 +01:00
Qu Wenruo 06f56db9cb btrfs-progs: rescue: Introduce fix-device-size
Introduce new subcommand 'fix-device-size' to the rescue group, to fix
device size alignment-related problems.

Especially for people unable to mount their fs with super::total_bytes
mismatch, this tool will fix the problems and let the mount continue.

Reported-by: Asif Youssuff <yoasif@gmail.com>
Reported-by: Rich Rauenzahn <rrauenza@gmail.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
2017-11-14 15:59:00 +01:00
Misono, Tomohiro 2192bd5cfc btrfs-progs: doc: add description of missing and example, of device remove
This patch updates help/document of "btrfs device remove" in two points:

1. Add explanation of 'missing' for 'device remove'. This is only
written in wikipage currently.
(https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices)

2. Add example of device removal in the man document. This is because
that explanation of "remove" says "See the example section below", but
there is no example of removal currently.

Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
Reviewed-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
[ move "" from the macro to help strings ]
Signed-off-by: David Sterba <dsterba@suse.com>
2017-11-14 15:59:00 +01:00
David Sterba f25091e654 btrfs-progs: docs: update btrfs-properties
Signed-off-by: David Sterba <dsterba@suse.com>
2017-11-14 15:59:00 +01:00
David Sterba c0f7e29127 btrfs-progs: prop: also allow "none" to disable compression
Some people were asking why disabling compression via properties is not
set by "none" instead. As this is purely userspace conversion to "" that
kernel accepts, let's add "none" as well for convenience.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-11-14 15:59:00 +01:00
Satoru Takeuchi df11e2787b btrfs-progs: allow "no" to disable compression for convenience
It's messy to use "" to disable compression. Introduce the new value "no"
which can also be used for this purpose.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
[ coding style fixes ]
Signed-off-by: David Sterba <dsterba@suse.com>
2017-11-14 15:59:00 +01:00
Misono, Tomohiro 4a5b95abb6 btrfs-progs: subvol: change set-default to also accept path
This patch changes "subvol set-default" to also accept the subvolume path
for convenience.

If there are two args, they are assumed as subvol id and path to the fs
(the same as current behavior), and if there is only one arg, it is assumed
as the path to the subvolume.

subvol id is resolved by test_issubvolume() + lookup_path_rootid().
The empty subvol (ino == 2) will get error on test_issubvolume() which
checks whether inode num is 256 or not.

Issue: #35
Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
[ update documentation, use the new multi-line command scheme ]
Signed-off-by: David Sterba <dsterba@suse.com>
2017-11-14 15:59:00 +01:00
David Sterba f96546d01c btrfs-progs: docs: update btrfs-balance
Copy unexpected edits from wiki so they do not get lost at next
git->wiki sync.

Author: Bill S.
Signed-off-by: David Sterba <dsterba@suse.com>
2017-10-06 13:41:12 +02:00
David Sterba bc2c60ad31 btrfs-progs: docs: start ioctl documentation manual page
Start documenting the ioctl interface to btrfs. The overall structure
should be settled, the formatting of the ioctl description may change in
the future, newly added ioctl descriptions should follow the examples of
BTRFS_IOC_SUBVOL_CREATE.

The document is not finished yet and will not be installed until most of
ioctls' details are filled in.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-09-25 15:18:09 +02:00
Nick Terrell 717a8b1e5d btrfs-progs: Add zstd support
Adds zstd support to the btrfs program. An optional dependency on libzstd
>= 1.0.0 is added. Autoconf accepts `--enable-zstd' or `--disable-zstd' and
defaults to detecting if libzstd is present using `pkg-config'.

The patch is also available in my fork of btrfs-progs [1], which passes
Travis-CI with the new tests. The prebuilt binary is available there.

I haven't updated Android.mk.

[1] https://github.com/terrelln/btrfs-progs/tree/devel

Signed-off-by: Nick Terrell <terrelln@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-09-25 15:17:13 +02:00
David Sterba 162fdf9538 btrfs-progs: check: add option to skip mount checks
Sometimes it's needed to do a check on a mounted filesystem. This should
work fine on a quiescent filesystem or a read-only mount. Changes on the
block device done by kernel might confuse the userspace checker and it
might crash when it reads some stale data.

Repair without mount checks is not supported right now.

Signed-off-by: David Sterba <dsterba@suse.cz>
2017-09-08 16:15:05 +02:00
David Sterba ebf449b521 btrfs-progs: docs: update btrfs-convert regarding reiserfs
Signed-off-by: David Sterba <dsterba@suse.com>
2017-09-08 16:15:05 +02:00
Misono, Tomohiro 4daf0d52f8 btrfs-progs: docs: add figure 1 to btrfs quota doc
The document of btrfs quota is missing figure 1.

I notice the body is copy of http://sensille.com/qgroups.pdf (which is
linked from https://btrfs.wiki.kernel.org/index.php/Quota_support), and
insert the figure.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-08-24 19:45:55 +02:00
Misono, Tomohiro 031ea0083a btrfs-progs: docs: add missing short option for qroup-report
Usage info of "btrfs check" shows "-Q|--qgroup-report" (and first patch
enables -Q), but the document only shows "--qgroup-report".

Therefore add -Q to the doc.

Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-08-24 19:17:43 +02:00
Qu Wenruo f65b6b156f btrfs-progs: Doc: Fix asciidoc grammar of btrfs-rescue
Code block of kernel backtrace lacks leading change line, causing the
following man page result:
------
           One can determine whether zero-log is needed according to the
           kernel backtrace:

           ? replay_one_dir_item+0xb5/0xb5 [btrfs]
           ? walk_log_tree+0x9c/0x19d [btrfs]
           ? btrfs_read_fs_root_no_radix+0x169/0x1a1 [btrfs]
           ? btrfs_recover_log_trees+0x195/0x29c [btrfs]
           ? replay_one_dir_item+0xb5/0xb5 [btrfs]
           ? btree_read_extent_buffer_pages+0x76/0xbc [btrfs]
           ? open_ctree+0xff6/0x132c [btrfs]

       + If the errors are like above, then zero-log should be used to clear
       the log and the filesystem may be mounted normally again. The keywords
------

Not only "+" is rendered as is, but also wrong indent.

Fix it by adding change line before code block.

Signed-off-by: Qu Wenruo <quwenruo.btrfs@gmx.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-08-24 19:06:36 +02:00
David Sterba 3b4927b558 btrfs-progs: docs: update wording for compression mount options
Signed-off-by: David Sterba <dsterba@suse.com>
2017-07-24 16:45:40 +02:00
David Sterba 55110d520b btrfs-progs: docs: adjust wording for subvol delete
Slightly update the text about deletion after the discussion on IRC.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-07-20 17:43:44 +02:00
David Sterba dbcbcd3bca btrfs-progs: docs: enhance documentation of 'btrfs device ready'
There were questions raised about the purpose of the 'dev ready'
command.

Link: https://marc.info/?l=linux-btrfs&m=149944574207325
Signed-off-by: David Sterba <dsterba@suse.com>
2017-07-20 17:43:43 +02:00
David Sterba 1677731660 btrfs-progs: docs: move deprecated mount option to own section
- alloc_start
- recovery
- subvolrootid

Signed-off-by: David Sterba <dsterba@suse.com>
2017-07-20 17:43:43 +02:00
David Sterba cc5c10b675 btrfs-progs: docs: document conventions
Signed-off-by: David Sterba <dsterba@suse.com>
2017-07-03 13:35:10 +02:00
Liu Bo c58d13eeba Btrfs-progs: man: nodesize must be power of 2 now
This updates mkfs.btrfs's man page with the new limitation that nodesize must
be a power of 2 as well.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-06-30 16:31:02 +02:00
Kasijjuf ba793d8d70 btrfs-progs: docs: replace <dev> with <device>
As discussed in #50, use 'device' everywhere a path do a device is
expected.

Pull request: #52
Signed-off-by: David Sterba <dsterba@suse.com>
2017-06-26 17:09:46 +02:00
Kasijjuf 3460be233f btrfs-progs: docs: Wrong section in ref to manpage
Pull request: #51
Signed-off-by: David Sterba <dsterba@suse.com>
2017-06-26 17:09:43 +02:00
Kasijjuf 27f0de9d78 btrfs-progs: docs: Expand confusing abbreviation in documentation
While the command interpreter may be able to disambiguate the meaning,
the reader is not helped by being forced to do so.

Pull request: #48
Signed-off-by: David Sterba <dsterba@suse.com>
2017-06-26 17:09:36 +02:00
David Sterba 929a9b188c btrfs-progs: docs: update note about device deletion
User Kasijjuf points out the VFS initialism is not explained anywhere.
While this could be fixed, the whole note about inability to delete the
device by which the filesystem has been mounted, is wrong.

Issue: #49
Signed-off-by: David Sterba <dsterba@suse.com>
2017-06-26 17:09:34 +02:00
Hans van Kranenburg 90f7db78a3 btrfs-progs: send operates on ro snapshots only
While talking to another btrfs user on IRC today, it became clear that a
major point of confusion in the btrfs send manual is that it's not
telling the user soon enough that send/receive solely operates on
subvolume snapshots instead of the original (read/write) subvolumes.

So, change the first few lines to explicitly mention snapshots instead.
Technically, snapshots are also just subvolumes, but requiring this
level of technical detailed knowledge doesn't help the user who is just
trying out things.

Signed-off-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-06-26 17:09:29 +02:00
David Sterba 30c3417b63 btrfs-progs: docs: fix sentence for no-dump file attribute
User Kasijjuf found a nonsensical sentence in the maunal page.

Issue: #45
Signed-off-by: David Sterba <dsterba@suse.com>
2017-06-26 17:09:25 +02:00
David Sterba 019e703e7f btrfs-progs: docs: update formatting of btrfs-property
Reported by a wiki user, that there are formatting artifacts in the
'get' section:

in html rendered as "The -t <em><type></em> option can be..."

This is probably due to the nesting '' and <>. We don't need the <> in
the explanation, as this is only to describe the command line syntax.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-06-26 17:08:18 +02:00
David Sterba 921dc0a973 btrfs-progs: docs: update formatting of btrfs-rescue
Reported by a wiki user, that the 'zero-log' section indentaion is
wrong.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-06-26 17:08:15 +02:00
David Sterba 3ab900a04e btrfs-progs: docs: update formatting and wording for btrfs(5)
- emphasize features in the list
- minor whitespace fixes

Signed-off-by: David Sterba <dsterba@suse.com>
2017-04-20 18:50:02 +02:00
Hans van Kranenburg 89093e6fd1 btrfs-progs: docs: Fix newlines for man btrfstune
A bunch of newlines were missing, which resulted in only -S and -r to
show as option after xmlto is used to convert the documentation to a man
page.

The rest of the options would end up being appended to the explanation
of -r.

Signed-off-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-04-19 18:07:03 +02:00
Hans van Kranenburg 18aae46bdc btrfs-progs: docs: Fix missing newline in man 5 btrfs
The text compress_lzo:: would show up directly after 'bigger than the
page size' on the same line.

Signed-off-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-04-19 18:07:03 +02:00
David Sterba 87861b38e6 btrfs-progs: docs: btrfs-replace, fix typo
Github pull request #39, from gabo77.

Author: 3psus <gabo77@me.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-04-07 18:42:05 +02:00
David Sterba 4a1d07e8c3 btrfs-progs: docs: mount options, enhance ssd/nossd
Reported-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-31 19:40:05 +02:00
Nicholas D Steeves 17144afb40 btrfs-progs: docs: fix many typos, plus three edits for clarity
Signed-off-by: Nicholas D Steeves <nsteeves@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:48 +01:00
Joey Sabey d8eec1c0c1 btrfs-progs: docs: fix typo in btrfs-quota
qgruops -> qgroups

Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:48 +01:00
Joey Sabey 9a4b0e512e btrfs-progs: docs: fix typo in btrfs-quota
reinstall ation -> reinstallation

Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:48 +01:00
Erik Logtenberg 44a8084d39 btrfs-progs: docs: fix typo in btrfs-scrub manual page
Changed "An" to "A".

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:48 +01:00
Austin S. Hemmelgarn 01bba62728 btrfs-progs: better document btrfs receive security
This adds some extra documentation to the btrfs-receive manpage that
explains some of the security related aspects of btrfs-receive.  The
first part covers the fact that the subvolume being received is writable
until the receive finishes, and the second covers the current lack of
sanity checking of the send stream.

Signed-off-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
Suggested-by: Graham Cobb <g.btrfs@cobb.uk.net>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:47 +01:00
Jonathan Boulle 2c23b7b871 btrfs-progs: docs: fix typo in receive man page
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:46 +01:00
David Sterba 2920c8d526 btrfs-progs: build: remove unused variables from docs makefile
Signed-off-by: David Sterba <dsterba@suse.com>
2017-03-08 13:00:46 +01:00
Tsutomu Itoh bd1ac1fb1d btrfs-progs: qgroup: add sync option to 'qgroup show'
The 'qgroup show' command does not synchronize filesystem.
Therefore, 'qgroup show' may not display the correct value unless
synchronized with 'filesystem sync' command etc.

So add the '--sync' option so that we can choose whether or not
to synchronize when executing the command.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-01-25 09:48:33 +01:00
Esteve Fernandez e135ee70b8 btrfs-progs: docs: fix typo in btrfs-subvolume
Signed-off-by: David Sterba <dsterba@suse.com>
2017-01-25 09:47:53 +01:00
David Sterba 52f21fc769 btrfs-progs: defrag: force using v2 defrag ioctl and make default 32M threshold actually work
A user reported on IRC that the new 32M default for target extent size
does not work. This happens because if there are no commandline options,
the v1 ioctl is used that does not do any fine grained defrag. As the v2
ioctl has been introduced 6 years ago (2010, kernel 2.6.33) we won't
keep backward compatibility anymore.

Signed-off-by: David Sterba <dsterba@suse.com>
2017-01-25 09:47:43 +01:00
Nicholas D Steeves b757cf4ba7 btrfs-progs: Fix spelling/typos in user-facing strings
Signed-off-by: Nicholas D Steeves <nsteeves@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2017-01-25 09:47:40 +01:00
David Sterba d62902e95b btrfs-progs: dev stats: update option name for checking non-zero status
Rename the option to -c|--check and update documentation.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:36 +01:00
David Sterba b67e9a1b13 btrfs-progs: docs: update dev stats help and manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:36 +01:00
David Sterba 01bafdbc90 btrfs-progs: dev stats: add long option for -z
Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:36 +01:00
Austin S. Hemmelgarn afd1e7b4e3 btrfs-progs: dev stats: add dev stats returncode option
Currently, `btrfs device stats` returns non-zero only when there was an
error getting the counter values.  This is fine for when it gets run by a
user directly, but is a serious pain when trying to use it in a script or
for monitoring since you need to parse the (not at all machine friendly)
output to check the counter values.

This patch adds an option ('-s') which causes `btrfs device stats`
to set bit 6 in the return code if any of the counters are non-zero.
This greatly simplifies checking from a script or monitoring software if
any errors have been recorded.  In the event that this switch is passed
and an error occurs reading the stats, the return code will have bit
0 set (so if there are errors reading counters, and the counters which
were read were non-zero, the return value will be 65).

Signed-off-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:35 +01:00
Noah Massey 0a7f141007 btrfs-progs: docs: fix typo in mkfs manual page
Signed-off-by: Noah Massey <noah.massey@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:35 +01:00
Adam Borowski 0a074116fc btrfs-progs: man mkfs: warn about RAID5/6 being experimental
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:35 +01:00
David Sterba b3afc1e814 btrfs-progs: docs: clarify trim after mkfs -K
A user question on IRC about mkfs -K and mount with discard.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:35 +01:00
David Sterba 44c22cf8be btrfs-progs: docs: update receive help and manual page
Reword several option descriptions, add missing short option -E,
formatting adjustments.

Visual bug fix: the first line is printed in short help, the second line
is long description, thus alternative calling syntax must be printed on
one line.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:34 +01:00
Qu Wenruo 798cec84dd btrfs-progs: receive: introduce option to dump send stream
Introduce new option, '--dump' for receive subcommand.

With this command, user can dump the metadata of a send stream.
Which is quite useful for education purpose or bug reporting.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-12-14 15:06:34 +01:00
David Sterba d960f81d8e btrfs-progs: docs: fix typo in btrfs-man5
Reported via IRC.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-30 12:42:09 +01:00
David Sterba d8f93ce802 btrfs-progs: Update README and other docs
Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-23 11:07:05 +01:00
Omar Sandoval a064f24e2e btrfs-progs: document space_cache=v2 more thoroughly
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-23 11:07:05 +01:00
Omar Sandoval 87895ef4da btrfs-progs: implement btrfs check --clear-space-cache v2
Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
[ adjusted error messages ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-23 11:07:05 +01:00
David Sterba a2214e582c btrfs-progs: docs: fix typo in btrfs-scrub manual page
Reported on IRC.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-23 10:50:37 +01:00
David Sterba 9e0dd182b4 btrfs-progs: docs: update mkfs help string and manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-09 13:47:34 +01:00
Qu Wenruo eb8a61b235 btrfs-progs: check: add support to clear v1 free space cache
Kernel clear_cache mount option will only rebuild free space cache if
the used space of that chunk has changed.

So it won't ensure any corrupted free space cache get cleared.

So add a new option "--clear-space-cache v1|v2" to btrfsck, to
completely wipe out free space cache.
So kernel won't complain again.

Reported-by: Ivan P <chrnosphered@gmail.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
[ adjusted error messages, doc wording changes ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-09 13:12:47 +01:00
Nicholas D Steeves 6bdb1cfbc1 btrfs-progs: fix user-facing typos in docs and help strings
Signed-off-by: Nicholas D Steeves <nsteeves@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 15:07:22 +02:00
Adam Borowski aa8ad8d4ae btrfs-progs: docs: document exit codes from scrub
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 15:07:22 +02:00
Lakshmipathi.G b56fe16922 btrfs-progs: convert: check source file system state
Signed-off-by: Lakshmipathi.G <Lakshmipathi.G@giis.co.in>
[ add doc note ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-10-03 11:35:49 +02:00
adduxa 7f26e64ddd btrfs-progs: docs: fix typos in btrfs-subvolume
[ Documentation fix, github pull request 16 ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 11:50:13 +02:00
David Sterba 67786272ea btrfs-progs: docs: update flushoncommit default value
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 11:47:38 +02:00
Qu Wenruo f04db96f61 btrfs-progs: docs: Add warning for build RAID btrfs on partions from the same device
Quite a common sense for any RAID-like multi-device setup, just in case.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 11:47:35 +02:00
Qu Wenruo 53c4e289c2 btrfs-progs: mkfs: Warn user for minimal RAID5/6 devices setup
For RAID5, 2 devices setup is just RAID1 with more overhead.
For RAID6, 3 devices setup is RAID1 with 3 copies, not what most user
want.

So warn user at mkfs time for such case, and add explain in man pages.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 11:47:31 +02:00
David Sterba a5bd848719 btrfs-progs: dump-super: changes in options to specify superblocks
Some tools (check, select-super, dump-super) can use the alternate
superblocks, but the options are not consistent. To make it less
confusing, change the meaning of option -s in 'dump-super' to specify
the superblock copy, instead of taking the offset.

Though this is a change in UI, the old usage is detected and the result
would be the same, no breakage in existing scripts.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-21 11:46:33 +02:00
David Sterba 51d41fac76 btrfs-progs: docs: describe filesystem features
Signed-off-by: David Sterba <dsterba@suse.com>
2016-09-05 10:05:30 +02:00
David Sterba 55aa862ea2 btrfs-progs: docs: refer to btrfs(5) from btrfs(8)
Signed-off-by: David Sterba <dsterba@suse.com>
2016-08-18 19:50:43 +02:00
David Sterba 637c005ac8 btrfs-progs: docs: update btrfs-quota manual page, more sections
Add more overall sections.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-08-18 19:50:43 +02:00
David Sterba c7f8852296 btrfs-progs: docs: update btrfs-quota manual page
Copy the intoductory and usecases from the text written by Arne Jansen,

https://git.kernel.org/cgit/linux/kernel/git/arne/qgroups-doc.git/

The graphics missing for now.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-08-18 19:50:43 +02:00
David Sterba 87c1bd13c1 btrfs-progs: check: adjust command line options for the low-memory mode
Change the single-purpose option --low-memory to a generic option that
takes the mode. Currently supported are the original mode and the
low-memory in the same way.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-08-17 20:00:00 +02:00
Lu Fengqi bfecd8bd6a btrfs-progs: check: introduce low memory mode
Introduce a new fsck mode: low memory mode.

Old btrfsck is working efficiently but uses some memory for each extent
item.  This method will ensure extents are only iterated once at
extent/chunk tree check process.

But since it uses some memory for each extent item, for a large fs with
several TB metadata, this can easily eat up memory and cause OOM.

To handle such limitation and improve scalability, the new low-memory
mode will not use any heap memory to record which extent is checked.
Instead it will use extent backref to avoid most of uneeded checks on
shared fs/subvolume tree blocks.
And with the use forward and backward reference cross check, we can also
ensure every tree block is at least checked once.

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-08-17 19:04:51 +02:00
David Sterba 2f732723d6 btrfs-progs: fi defrag: change default extent target size to 32 MiB
The kernel default is too low, 32 MiB is recommended and should give
better results.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-28 14:08:30 +02:00
Qu Wenruo 2542112e0c btrfs-progs: Doc: Fix format error in btrfs-send
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-28 14:08:30 +02:00
David Sterba 7ce43670da btrfs-progs: docs: update btrfs-balance manual page
Update the new options.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-28 14:08:29 +02:00
Austin S. Hemmelgarn fe520b5cdc btrfs-progs: add option to run balance as daemon
Currently, balance operations are run synchronously in the foreground.
This is nice for interactive management, but is kind of crappy when you
start looking at automation and similar things.

This patch adds an option to `btrfs balance start` to tell it to
daemonize prior to running the balance operation, thus allowing us to
preform balances asynchronously.  The two biggest use cases I have for
this are starting a balance on a remote server without establishing a
full shell session, and being able to background the balance in a
recovery shell (which usually has no job control) so I can still get
progress information.

Because it simply daemonizes prior to calling the balance ioctl, this
doesn't actually need any kernel support.

Signed-off-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-26 19:26:29 +02:00
David Sterba 94d9fbbf01 btrfs-progs: docs: update btrfs manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-15 00:50:08 +02:00
David Sterba 4ec42ec46c btrfs-progs: docs: update btrfs-convert manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-15 00:20:48 +02:00
David Sterba e7d6760b1c btrfs-progs: docs: update btrfs-filesystem manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-14 23:43:38 +02:00
David Sterba 4692425c3f btrfs-progs: docs: update btrfs-scrub manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-14 23:35:26 +02:00
David Sterba c3e1703005 btrfs-progs: docs: update btrfs-subvolume manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-13 18:44:52 +02:00
David Sterba 97bb68ebf3 btrfs-progs: docs: update btrfs-balance manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-13 18:44:52 +02:00
David Sterba e67219255c btrfs-progs: docs: man5, document control device
Signed-off-by: David Sterba <dsterba@suse.com>
2016-07-13 18:44:45 +02:00
David Sterba b40233fa2e btrfs-progs: docs: update 'btrfs-device' manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-21 02:50:27 +02:00
David Sterba b8288277fb btrfs-progs: docs: update btrfs-restore manual page
Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-17 17:02:12 +02:00
Satoru Takeuchi 68702ea009 btrfs-progs: doc: correct the destination of btrfs-receive
We can set not only btrfs mount point but also any path belong to
btrfs mount point as btrfs-receive's destination.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-14 10:52:17 +02:00
Noah Massey 935d22ed15 btrfs-progs: doc: add missing newline in btrfs-convert
Signed-off-by: Noah Massey <noah.massey@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-14 10:47:15 +02:00
Merlin Hartley 57744bd1d2 btrfs-progs: doc: fix typo in btrfs-subvolume
Signed-off-by: Merlin Hartley <merlinhartley@hotmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-01 14:56:56 +02:00
David Sterba 16570509f6 btrfs-progs: docs: compression is disabled with nodatasum/nodatacow
Explicitly mention the constraints in all involved options.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-01 14:56:56 +02:00
M G Berberich 09c052a8b4 btrfs-progs: send: add quiet option
Add new options -q,--quiet to prevent printing messages on stderr, added
--verbose as alternative for -v.  Moved 'Mode NO_FILE_DATA enabled'
message to stderr. The default verboisty level is 1 to keep some
backward compatibility.

Signed-off-by: M G Berberich <btrfs@oss.m-berberich.de>
[ minor adjustments in the options, help text and changelog, added
  manual page text ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-06-01 14:56:56 +02:00
David Sterba 21dc9050b5 btrfs-progs: docs: clarify why mkfs selects single for SSDs
The section raised some user questions on IRC.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba 5079ae684a btrfs-progs: docs: update btrfs-check
Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba ce69f8c36e btrfs-progs: docs: update btrfs-select-super
Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba ae213f7633 btrfs-progs: docs: update btrfs-receive
Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba eb3092c2a1 btrfs-progs: docs: update btrfs-send
Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba 162257574a btrfs-progs: docs: update btrfs-scrub
Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba b3751c131a btrfs-progs: docs: update btrfs-man5
Wording, added new options.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-11 16:37:12 +02:00
David Sterba c54b5a545e btrfs-progs: add safety delay before starting full balance
A short delay with a warning before starting a full balance should
improve usability. We have been getting reports from people who run full
balance after following some random advice and then get surprised by the
performance impact.

The countdown is done even when run from scripts, but as the whole
balance takes significanly more time, this shouldn't be an issue.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-02 14:44:56 +02:00
Alexander Fougner 1a9df1c68b btrfs-progs: update docs and completion for tree-stats
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-05-02 14:39:57 +02:00
David Sterba a5948c56bf btrfs-progs: docs: update mkfs page for dup on multidev fs
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-30 16:56:32 +02:00
David Sterba 40dc7c504c btrfs-progs: docs: man5, add space_cache=v2
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-17 14:49:32 +01:00
David Sterba c58e4d40bf btrfs-progs: docs: fi defrag, make some paragraphs more visible
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-16 19:03:05 +01:00
Satoru Takeuchi 4b80569b58 btrfs-progs: Describe optarg of -m option in the manpage of receive
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-16 10:16:20 +01:00
David Sterba fabe745d3b btrfs-progs: docs: add filesystem du
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-15 18:25:05 +01:00
David Sterba 80414d6939 btrfs-progs: remove btrfs-show-super manual page and point to inspect-internal
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-15 17:27:34 +01:00
David Sterba 7aedf5067b btrfs-progs: docs: update dump-super
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-15 17:16:00 +01:00
David Sterba 029b2433eb btrfs-progs: docs: rename and move dump-super
The command name is 'dump-super', move the section to it's alphabetical
order.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-15 16:44:55 +01:00
Anand Jain 2490de5da5 btrfs-progs: Introduce device delete by devid
This patch introduces new option <devid> for the command

  btrfs device delete <device_path|devid>[..]  <mnt>

In a user reported issue on a 3-disk-RAID1, one disk failed with its
SB unreadable. Now with this patch user will have a choice to delete
the device using devid.

The other method we could do, is to match the input device_path
to the available device_paths with in the kernel. But that won't
work in all the cases, like what if user provided mapper path
when the path within the kernel is a non-mapper path.

This patch depends on the below kernel patch for the new feature to work,
however it will fail-back to the old interface for the kernel without the
patch

  Btrfs: Introduce device delete by devid

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 14:11:33 +01:00
David Sterba 5f17513313 btrfs-progs: docs: fix more typos and spelling errors
With help of ispell.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 14:11:31 +01:00
Alexander Fougner 1086629272 btrfs-progs: docs: fix spelling errors
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:44:17 +01:00
David Sterba 83ad1dcbb0 btrfs-progs: remove btrfs-debug-tree manual page and point to inspect-internal
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
David Sterba 69874af7b8 btrfs-progs: dump-tree: let --tree understand name of the tree
For practical purposes teach -t about the human readable names of the
trees in addition to the numerical id. The name syntax is flexible.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
David Sterba 1538bc01ad btrfs-progs: docs: update dump-tree
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
Satoru Takeuchi 142041bb03 btrfs-progs: Describe device scan -d is a deprecated option in manpage
It's already marked as deprecated in cmd_device_scan_usage().

commit 5444864e56 ("btrfs-progs: remove BTRFS_SCAN_PROC scan method")

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
David Sterba 28d924290e btrfs-progs: docs: update check options
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
Vytas Dauksa 1e8246a058 btrfs-progs: convert: document -O|--features flag
Copy-pasted description found at mkfs.btrfs. I did not bother with
feature list as it seemed to be incomplete.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00
Alexander Fougner c27640938d btrfs-progs: docs: add note about resizing to max after device replace
Signed-off-by: Alexander Fougner <fougner89@gmail.com>
[ formatting adjustments ]
Signed-off-by: David Sterba <dsterba@suse.com>
2016-03-14 13:42:47 +01:00