Commit Graph

528 Commits

Author SHA1 Message Date
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
Adam Borowski 6da5478a38 btrfs-progs: fix a bunch of typos
These have been detected by lintian and codespell.

Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-02-01 18:40:53 +01:00
David Sterba 23bdd548d8 btrfs-progs: docs: split mount options
Signed-off-by: David Sterba <dsterba@suse.com>
2022-01-12 00:09:29 +01:00
David Sterba 864d260154 btrfs-progs: docs: split swapfile from section 5
Signed-off-by: David Sterba <dsterba@suse.com>
2022-01-11 23:56:48 +01:00
David Sterba 5004a7de0a btrfs-progs: docs: update template, more about subvolumes
The max width of the page is set to 800px, that renders of commands and
output in a small box requiring a scrollbar. Increase the limit to
1200px. Also update some subvoulme related text.

Signed-off-by: David Sterba <dsterba@suse.com>
2022-01-11 15:46:33 +01:00
David Sterba 79ef78f0e4 btrfs-progs: docs: more docs updates
Signed-off-by: David Sterba <dsterba@suse.com>
2022-01-10 16:20:34 +01:00
David Sterba df91bfd5d5 btrfs-progs: docs: update some chapters
Signed-off-by: David Sterba <dsterba@suse.com>
2022-01-05 00:44:14 +01:00
David Sterba 208aed2ed4 btrfs-progs: docs: add more chapters (part 3)
All main pages have some content and many typos have been fixed.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-12-17 15:35:10 +01:00
David Sterba c6be84840f btrfs-progs: docs: add more chapters (part 2)
The feature pages share the contents with the manual page section 5 so
put the contents to separate files. Progress: 2/3.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-12-17 11:53:44 +01:00
David Sterba b871bf49f3 btrfs-progs: docs: add more chapters
The feature pages share the contents with the manual page section 5 so
put the contents to separate files.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-12-17 11:53:44 +01:00
David Sterba 9756d90ce3 btrfs-progs: docs: add more of the new doc structure
Add overall structure for now, some contents is from wiki.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-11-30 16:00:48 +01:00
David Sterba ee801c07d7 btrfs-progs: docs: drop indices from pages
At this point it's not clear what exactly needs the indices and they
appear in the left column with list of index pages which is a bit
confusing.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-11-26 00:48:24 +01:00
Qu Wenruo 77db6bd402 btrfs-progs: rescue: introduce clear-uuid-tree
[BUG]
There is a bug report that a corrupted key type (expected
UUID_KEY_SUBVOL, has EXTENT_ITEM) causing newer kernel to reject a
mount.

Although the root cause is not determined yet, with roll out of v5.11
kernel to various distros, such problem should be prevented by
tree-checker, no matter if it's hardware problem or not.

And older kernel with "-o uuid_rescan" mount option won't help, as
uuid_rescan will only delete items with
UUID_KEY_SUBVOL/UUID_KEY_RECEIVED_SUBVOL key types, not deleting such
corrupted key.

[FIX]
To fix such problem we have to rely on offline tool, thus there we
introduce a new rescue tool, clear-uuid-tree, to empty and then remove
uuid tree.

Kernel will re-generate the correct uuid tree at next mount.

Reported-by: S. <sb56637@gmail.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2021-11-22 21:45:37 +01:00
David Sterba e7b4845d8f btrfs-progs: docs: mention ntfs2btrfs conversion tool
There's another tool for in-place filesystem conversion, from NTFS to
BTRFS.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-11-18 10:17:21 +01:00
David Sterba 4a50f64614 btrfs-progs: docs: integrate sphinx build
Make it possible to select sphinx doc generator instead of asciidoc so
we don't have two makefiles for that. It's still a bit crude and does
not support installing the files.

The required package is python-Sphinx (or similar name), built by
'sphinx-build'.

Configure:

  $ ASCIIDOC_TOOL=sphinx ./configure
  ...
            doc generator:      sphinx
  ...

Generate:

  $ cd Documentation/
  $ make man
  $ make html
  $ make info           # yes we can have info pages too

There are several more targets provided by sphinx, run 'make' to list
them.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-11-18 10:17:21 +01:00
David Sterba a079982a9e btrfs-progs: docs: disable RST smartquotes for em-dash
All long command line options in the html target render as a single
character which is confusing and wrong as we expect that to be '--'.
Disable it.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-11-18 10:17:21 +01:00
David Sterba c1046aeda7 btrfs-progs: docs: fix RST mkfs.btrfs table formatting
Cell spanning is not supported for manual page target, so add separate
columns for the redundancy numbers.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-11-18 10:17:21 +01:00
David Sterba 8b928ca5fb btrfs-progs: docs: RST formatting fixups
- verbatim quoting
- code-block directive spacing
- definition list spacing

Signed-off-by: David Sterba <dsterba@suse.com>
2021-11-18 10:17:21 +01:00
David Sterba b1ae8ccb21 btrfs-progs: docs: add Glossary from wiki
Start a new section with wiki pages that will be hosted here as well.

Signed-off-by: David Sterba <dsterba@suse.com>
2021-11-18 10:17:21 +01:00
David Sterba cc8a100c90 btrfs-progs: docs: convert btrfs(5) to rst
Signed-off-by: David Sterba <dsterba@suse.com>
2021-10-29 17:30:04 +02:00
David Sterba c52b6d9473 btrfs-progs: docs: convert mkfs.btrfs to rst
Signed-off-by: David Sterba <dsterba@suse.com>
2021-10-29 17:30:04 +02:00