Commit Graph

548 Commits

Author SHA1 Message Date
David Sterba
44a11c7f3e btrfs-progs: docs: update kernel 5.19 contributor stats
Signed-off-by: David Sterba <dsterba@suse.com>
2022-08-16 15:18:12 +02:00
David Sterba
cef73a5e98 btrfs-progs: device: add replace subcommand as alias to 1st level command
The command group of 'replace' belongs to device and could be seen as
confusing. At minimum we can add an alias so now there's equivalent:

  # btrfs replace start
  # btrfs device replace start

Both commands will exist for backward compatibility, tough we might
revisit which one is the primary one.

Issue: #484
Signed-off-by: David Sterba <dsterba@suse.com>
2022-08-16 15:18:11 +02:00
Nikolay Borisov
99ce788a0d btrfs-progs: add support for tabular format for device stats
Add support for the -T switch to 'device stats" command such that
executing 'btrfs device stats -T' produces:

Id Path     Write errors Read errors Flush errors Corruption errors Generation errors
-- -------- ------------ ----------- ------------ ----------------- -----------------
 1 /dev/vdc            0           0            0                 0                 0
 2 /dev/vdd            0           0            0                 0                 0

Link: https://lore.kernel.org/linux-btrfs/d7bd334d-13ad-8c5c-2122-1afc722fcc9c@dirtcellar.net
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-08-16 15:18:11 +02:00
David Sterba
6f4380a95e btrfs-progs: docs: add send stream format description
Signed-off-by: David Sterba <dsterba@suse.com>
2022-08-16 15:18:11 +02:00
David Sterba
0631817e6f btrfs-progs: docs: update troubleshooting
Copy contents from wiki page Problem_FAQ.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-08-16 15:18:11 +02:00
David Sterba
271424fb80 btrfs-progs: docs: add feature by version table from wiki
Copy contents from https://btrfs.wiki.kernel.org/index.php/Changelog#By_feature

The formatting is done by a definition and list, instead of a table.
Unfortunatelly RST does not wrap long text in table cells so the width
exceeds visible area.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-08-16 15:18:11 +02:00
David Sterba
da8e2d3486 btrfs-progs: docs: distinguish Changes title
Rename the section to contain btrfs-progs as there will be more
sections, eg. kernel or by feature.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-08-16 15:18:10 +02:00
David Sterba
07d5dd158e btrfs-progs: docs: copy wiki page Contributors
Signed-off-by: David Sterba <dsterba@suse.com>
2022-08-16 15:18:10 +02:00
David Sterba
673c4ff111 btrfs-progs: docs: split project information to new section
Signed-off-by: David Sterba <dsterba@suse.com>
2022-08-16 15:18:10 +02:00
David Sterba
ab8dbea0dd btrfs-progs: docs: fix spinx build warnings
Fix the following warnings:

    [SPHINX] man
../CHANGES:37: ERROR: Unexpected indentation.
../CHANGES:1183: WARNING: Block quote ends without a blank line; unexpected unindent.
./Documentation/DocConventions.rst:31: ERROR: Unexpected indentation.
./Documentation/Source-repositories.rst:2: WARNING: Duplicate explicit target name: "web access".
./Documentation/DocConventions.rst: WARNING: document isn't included in any toctree

The free format of CHANGES sometimes does not align with RST so fix it
so it's visually similar in both formats. Remove RST references to 'web
access', URLs are parsed and rendered clickable and we don't have full
reference list yet. Doc conventions have been updated to RST but not
finalized so put it to TODO section.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-08-16 15:18:10 +02:00
Omar Sandoval
0ee5b22345 btrfs-progs: send: stream v2 ioctl flags
First, add a --proto option to allow specifying the desired send
protocol version. It defaults to one, the original version. In a couple
of releases once people are aware that protocol revisions are happening,
we can change it to default to zero, which means the latest version
supported by the kernel. This is based on Dave Sterba's patch.

Also add a --compressed-data flag to instruct the kernel to use
encoded_write commands for compressed extents. This requires an explicit
opt in separate from the protocol version because:

1. The user may not want compression on the receiving side, or may want
   a different compression algorithm/level on the receiving side.
2. It has a soft requirement for kernel support on the receiving side
   (btrfs-progs can fall back to decompressing and writing if the kernel
   doesn't support BTRFS_IOC_ENCODED_WRITE, but the user may not be
   prepared to pay that CPU cost). Going forward, since it's easier to
   update progs than the kernel, I think we'll want to make new send
   features that require kernel support opt-in, whereas anything that
   only requires a progs update can happen automatically.

Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-06-07 13:59:33 +02:00
Boris Burkov
d20e759fc9 btrfs-progs: receive: encoded_write fallback to explicit decode and write
An encoded_write can fail if the file system it is being applied to does
not support encoded writes or if it can't find enough contiguous space
to accommodate the encoded extent. In those cases, we can likely still
process an encoded_write by explicitly decoding the data and doing a
normal write.

Add the necessary fallback path for decoding data compressed with zlib,
lzo, or zstd. zlib and zstd have reusable decoding context data
structures which we cache in the receive context so that we don't have
to recreate them on every encoded_write.

Finally, add a command line flag for force-decompress which causes
receive to always use the fallback path rather than first attempting the
encoded write.

Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-06-07 13:59:32 +02:00
David Sterba
3b0fe46c08 btrfs-progs: docs: update Gloassary
Bring up to date, reformat, remove some wiki references.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-06-06 15:48:15 +02:00
frukto
31750cb120 btrfs-progs: docs: make description of list output more clear
Author: frukto <fruktopus@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-06-06 15:48:03 +02:00
frukto
d44b0efe27 btrfs-progs: docs: fix typo in mkfs.btrfs
Pull-rquest: #477
Author: frukto <fruktopus@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-06-06 15:48:00 +02:00
David Sterba
497fae26c6 btrfs-progs: docs: reformat btrfs-property manual page
Add sections for the types and properties, add examples.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-06-06 15:47:57 +02:00
Johannes Thumshirn
a7ae6d5948 btrfs-progs: zoned: add upper and lower zone size boundaries
As we're not supporting arbitrarily big or small zone sizes in the kernel,
reject devices that don't fit in progs as well.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-06-06 15:47:50 +02:00
David Sterba
a234524c95 btrfs-progs: docs: add link to released tarballs
Signed-off-by: David Sterba <dsterba@suse.com>
2022-06-06 15:47:38 +02:00
David Sterba
a60afdceb9 btrfs-progs: docs: update header formatting
Capitals were meant for manual pages but in html it looks better with
the first letter.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-20 23:59:40 +02:00
David Sterba
5ba643915c btrfs-progs: docs: fix superscript formatting
Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-20 23:52:20 +02:00
David Sterba
77ff4d118f btrfs-progs: docs: convert conventions to RST
Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-20 23:37:24 +02:00
Forza
f7af4dc04a btrfs-progs: docs: clarification on mixed profile
It is not possible to use mixed profile together with other profiles.
The current wording is not clear about this, so let's add a
clarification note.

Author: Forza
Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-20 19:31:02 +02:00
Qu Wenruo
e729d41ce6 btrfs-progs: docs: add more explanation on subapge limits
The current subpage support in v5.18 has several limits, the most
obvious ones are:

- Only support 64KiB page size
- No RAID56 support

The supports are already queued for v5.19.

And some minor ones:

- No inline extent write support
  Read is always supported.
  Subpage mount will always just act as "max_inline=0".

- Compression write is only for page aligned range.
  Read is always supported, no matter the alignment.

- Extra memory usage for scrub
  Patchset is hanging there for a while though.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-18 13:27:28 +02:00
David Sterba
99a7f7988f btrfs-progs: docs: convert btrfs-ioctl.asciidoc to RST
Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-18 13:28:35 +02:00
David Sterba
fa8c64ec29 btrfs-progs: docs: convert Experimental.md to RST
Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-17 23:11:03 +02:00
David Sterba
1c70e888da btrfs-progs: docs: add subpage feature page
Introductory paragraph, status and progress needs to be added.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-17 21:12:19 +02:00
David Sterba
65f67f5829 btrfs-progs: docs: copy more contents from wiki
- Tree-checker - about reporting problems
- Seeding-device - chained seeding devices
- RAID56 - write hole, fixed stripe width

Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-17 21:12:19 +02:00
David Sterba
f7456830d1 btrfs-progs: docs: merge storage model to hardware chapter
The storage model is the intro chapter for the hardware problems.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-17 21:12:19 +02:00
David Sterba
4c5554d46d btrfs-progs: docs: separate chapter for hardware considerations
Make it more visible than just in section 5.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-17 21:12:19 +02:00
David Sterba
f1b4ef2f35 btrfs-progs: docs: move flexibility to Administration
Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-17 21:12:19 +02:00
David Sterba
0539bbb66a btrfs-progs: docs: separate filesystem limits chapter
For section 5 and Administration.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-17 21:12:19 +02:00
David Sterba
1a431b0837 btrfs-progs: docs: document paused balance
Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-17 21:12:19 +02:00
David Sterba
908a46085c btrfs-progs: docs: separate bootloaders chapter
Used in manual page section 5 and Administration overview.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-17 21:12:19 +02:00
David Sterba
b6e15650b2 btrfs-progs: docs: add note about ifdef EXPERIMENTAL
Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-12 14:02:51 +02:00
David Sterba
d619bb3192 btrfs-progs: docs: link INSTALL to docs
The INSTALL format renders fine as RST, add it to the main page.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-12 13:56:03 +02:00
David Sterba
df77a231bb btrfs-progs: docs: move glossary to overview sections
The glossary is reasonably complete so make it more visible in the main
section.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-05-10 15:50:10 +02:00
David Sterba
2f83d94013 btrfs-progs: reformat CHANGES for RST
Add headings to versions, reorder so the minor releases are under the
major so it's properly nested, keep the last version expanded.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-04-27 19:50:59 +02:00
Li Zhang
7781d1a2da btrfs-progs: props: don't translate value of compression=none
Currently, if user specifies value 'no' or 'none' on the command line,
it gets translated to an empty value that is passed to kernel. There was
a change in kernel 5.14 done by commit 5548c8c6f55b ("btrfs: props:
change how empty value is interpreted") that changes the behaviour
in that case.

The empty value is supposed to mean 'the default value' for any
property. For compression there is a need to distinguish resetting the
value and also setting the NOCOMPRESS property. The translation to empty
value makes that impossible.

The explanation and behaviour copied from the kernel patch:

    Old behaviour:

      $ lsattr file
      ---------------------- file
      # the NOCOMPRESS bit is set
      $ btrfs prop set file compression ''
      $ lsattr file
      ---------------------m file

    This is equivalent to 'btrfs prop set file compression no' in current
    btrfs-progs as the 'no' or 'none' values are translated to an empty
    string.

    This is where the new behaviour is different: empty string drops the
    compression flag (-c) and nocompress (-m):

      $ lsattr file
      ---------------------- file
      # No change
      $ btrfs prop set file compression ''
      $ lsattr file
      ---------------------- file
      $ btrfs prop set file compression lzo
      $ lsattr file
      --------c------------- file
      $ btrfs prop get file compression
      compression=lzo
      $ btrfs prop set file compression ''
      # Reset to the initial state
      $ lsattr file
      ---------------------- file
      # Set NOCOMPRESS bit
      $ btrfs prop set file compression no
      $ lsattr file
      ---------------------m file

    This obviously brings problems with backward compatibility, so this
    patch should not be backported without making sure the updated
    btrfs-progs are also used and that scripts have been updated to use the
    new semantics.

    Summary:

    - old kernel:
      no, none, "" - set NOCOMPRESS bit
    - new kernel:
      no, none - set NOCOMPRESS bit
      "" - drop all compression flags, ie. COMPRESS and NOCOMPRESS

Signed-off-by: Li Zhang <zhanglikernel@gmail.com>
[ update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
2022-04-25 18:30:28 +02:00
David Sterba
9091be2a4b btrfs-progs: docs: document generic error
Signed-off-by: David Sterba <dsterba@suse.com>
2022-03-08 18:11:40 +01:00
David Sterba
f1e54a0c09 btrfs-progs: build: use rm for cleaning build directory
'make clean' can fail in case the _build directory is not present, can
be observed with the build-tests.sh. Use plain 'rm -fd'.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-03-08 18:11:40 +01:00
David Sterba
7421398be8 btrfs-progs: docs: update file attributes
Use the file attributes chapter also in the common linux features page.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-03-08 18:11:40 +01:00
David Sterba
dceb496d19 btrfs-progs: docs: set version from VERSION file
Signed-off-by: David Sterba <dsterba@suse.com>
2022-02-16 23:24:12 +01:00
David Sterba
e841c811d6 btrfs-progs: docs: generate section 5 to final name directly
There was a workaround for asciidoc/xmlto build because page btrfs.5 and
btrfs.8 used the same intermediate file. To avoid clash for the section
5 page it is part of the name, this is still needed, but for sphinx we
can use the final name as it will get the right suffix. This affects
only the generated manual pages.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-02-16 23:24:12 +01:00
David Sterba
134f5bffc9 btrfs-progs: docs: remove all converted asciidoc sources
Remove all docs that have a RST version. Remaining: btrfs-ioctl.asciidoc
and DocConventions.asciidoc.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-02-16 23:24:12 +01:00
David Sterba
f5d6bfaed0 btrfs-progs: docs: remove asciidoc build support
Remove asciidoc makefile support and config files.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-02-16 23:24:12 +01:00
David Sterba
45d4edaf97 btrfs-progs: build: drop asciidoc detection, default to sphinx
Make sphinx the default build tool, remove asciidoc target selection.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-02-16 23:24:12 +01:00
David Sterba
2e0c6ca308 btrfs-progs: docs: add remaining targets for sphinx build
Update sphinx build so that by default it now builds the manual pages,
in quiet mode. 'make html' builds the html, other sphinx targets are
available, see 'make help'. Installation now works as well.

Note: sphinx is still conditional and must be selected by
ASCIIDOOC_TOOL=sphinx ./configure

Signed-off-by: David Sterba <dsterba@suse.com>
2022-02-16 23:24:12 +01:00
Philip Guyton
4260413a0d btrfs-progs: docs: update remaining non-zero dev stats -s option to -c
Update the remaining erroneous entry of -s in the 'exit status' section
to -c in accordance with the changes made in:

"btrfs-progs: dev stats: update option name for checking non-zero status"

Pull-request: #146
Signed-off-by: Philip Guyton <philip@yewtreeapps.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-02-16 22:48:01 +01:00
dathide
b2acf53520 btrfs-progs: docs: remove incorrect statement about mkfs runtime features
Since 5.15 enables a runtime feature, this statement is incorrect.

Pull-request: #437
Author: dathide <47128084+dathide@users.noreply.github.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-02-16 22:48:01 +01:00
jtagcat
9d85418c52 btrfs-progs: docs: clarify zstd level mapping
Question forwarded from wiki:
  https://btrfs.wiki.kernel.org/index.php?title=Talk:Compression&diff=0&oldid=33545

  (info few months old) higher levels: upstream and library has levels 1..22.

      mapping to the upstream levels 1 to 15

As implemented in kernel zstd.c, max level is 15 and the level selection
is direct without any translation.

Pull-request: #442
Author: jtagcat <git-12dbd862@jtag.cat>
[ update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
2022-02-16 22:48:01 +01:00