Commit Graph

647 Commits

Author SHA1 Message Date
David Sterba
008ca33f3e btrfs-progs: docs: add 6.5 kernel development statistics
Signed-off-by: David Sterba <dsterba@suse.com>
2023-09-01 13:58:41 +02:00
David Sterba
f58694e87a btrfs-progs: docs: update Interoperability
Signed-off-by: David Sterba <dsterba@suse.com>
2023-08-28 17:24:58 +02:00
David Sterba
ce93d20fd5 btrfs-progs: docs: update kernel changes
Signed-off-by: David Sterba <dsterba@suse.com>
2023-08-28 17:24:25 +02:00
David Sterba
8001e37409 btrfs-progs: docs: updates
- reformatting
- new documents
- enhancements
- status updates

Signed-off-by: David Sterba <dsterba@suse.com>
2023-08-28 17:24:25 +02:00
Qu Wenruo
6abbad4d1b btrfs-progs: docs: enhance the error handling guidelines
Currently we only have a very brief explanation on the unexpected error
handling (only ASSERT()/WARN_ON()/BUG_ON()), and no further
recommendation on the proper usage of them.

This patch would improve the guideline by:

- Add btrfs_abort_transaction() usage
  Which is the recommended way when possible.

- More detailed explanation on the usage of ASSERT()
  Which is only a fail-fast option mostly designed for developers, thus
  is only recommended to rule out some invalid function usage.

- More detailed explanation on the usage of WARN_ON()
  Mostly for call sites which need a call trace strongly, and is not
  applicable for a btrfs_abort_transaction() call.

- Completely discourage the usage of BUG_ON()

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-08-28 17:24:24 +02:00
David Sterba
85c841f961 btrfs-progs: docs: add developer docs for internal APIs
Signed-off-by: David Sterba <dsterba@suse.com>
2023-08-28 17:24:24 +02:00
David Sterba
7ed0172bf6 btrfs-progs: docs: add dev docs about json
Programmer documentation, to be continued.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-08-28 17:24:24 +02:00
David Sterba
4790665142 btrfs-progs: docs: update doc style and conventions
Issue: #638
Signed-off-by: David Sterba <dsterba@suse.com>
2023-07-27 14:45:29 +02:00
David Sterba
a0137082de btrfs-progs: docs: formatting updates
- use :file: and :command:
- simplify manual page references
- add more web links
- typo fixes
- more cross-references

Signed-off-by: David Sterba <dsterba@suse.com>
2023-07-26 14:59:10 +02:00
David Sterba
2bc4002583 btrfs-progs: docs: update 6.4 kernel development stats
Signed-off-by: David Sterba <dsterba@suse.com>
2023-06-26 23:09:47 +02:00
Boris Burkov
aa49b7cfbb btrfs-progs: docs: discourage seeding remount workflow
The remount workflow could cause some problems so make a note about it.
Recommend the umount/mount step by default. A seeding device used for
e.g. a root filesystem that gets updated and has snapshots is a real
world example where the space consumed by unreclaimed deleted snapshots
would hurt.

Pull-request: #462
Author: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-06-09 12:55:13 +02:00
Eideen
1e18750288 btrfs-progs: docs: add balance filter examples
Add more examples and explanations how the filters can be used.

Pull-request: #486
Author: Eideen
Signed-off-by: David Sterba <dsterba@suse.com>
2023-06-09 12:44:03 +02:00
Jonathan Liu
055f215525 btrfs-progs: docs: fix 'group' typo in btrfsrune page
Pull-request: #634
Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-06-09 11:55:53 +02:00
David Sterba
d8172c2fbc btrfs-progs: docs: fixups, references
Signed-off-by: David Sterba <dsterba@suse.com>
2023-06-01 20:50:04 +02:00
David Sterba
7887e978ba btrfs-progs: docs: reorder versions in Features-by-version
Other pages list the latest version first, do that here as well. Also
reorder index so the features are first before version changelogs.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-06-01 20:50:04 +02:00
David Sterba
972ea8c8b3 btrfs-progs: docs: updates, formatting, status page
- formatting, typo fixes, corrections
- cross references
- enhancements
- revised and colored status page
- ioctl updates

Signed-off-by: David Sterba <dsterba@suse.com>
2023-06-01 20:49:17 +02:00
David Sterba
d64d62cce8 btrfs-progs: docs: fix links and update Developer's FAQ
Issue: #628
Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-26 19:03:04 +02:00
David Sterba
3acd74559e btrfs-progs: docs: move legend to the latest release in Contributors
Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-26 18:22:11 +02:00
David Sterba
849ac1b0ec btrfs-progs: docs: merge project documentation section to overview
The links to repositories and contributors is hard to find as it's below
the feature list. Move it up as it is for overview.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-26 18:14:16 +02:00
Qu Wenruo
d4f4d7b76e btrfs-progs: tune: add --convert-to-free-space-tree option
From the very beginning of free-space-tree feature, we allow mount
option "space_cache=v2" to convert the filesystem to the new feature.

But this is not the proper practice for new features (no matter if it's
incompat or compat_ro).

This is already making the clear_cache/space_cache mount option more
complex.

Thus this patch introduces the proper way to enable free-space-tree, and
I hope one day we can deprecate the "space_cache=" mount option.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-26 18:02:27 +02:00
Qu Wenruo
bd14aef125 btrfs-progs: docs: fix indentation of the ORPHAN_OBJECTID
When compiling the documents, we have the following warning:

  ~/btrfs-progs/Documentation/dev/On-disk-format.rst:369: WARNING: Bullet list ends without a blank line; unexpected unindent.

It's caused by a mismatched indent.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-05-26 18:02:27 +02:00
David Sterba
455b1cf094 btrfs-progs: tune: rename bgt conversion options
Rename the options so they more accurately reflect what the command is
actually doing. The feature is enabled/disabled in the end but it's not
a simple on/off like for others, the conversion takes time.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-27 14:23:52 +02:00
David Sterba
f560eb4c0b btrfs-progs: docs: remove EXTLINUX from bootloaders
There has been no update since 2014 and it's likely broken due to many
new features added to btrfs since then.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-27 01:52:25 +02:00
David Sterba
1afe51d22d btrfs-progs: docs: use command role for programs or command lines
Replace **bold** or ``quoted`` with :command:`line ...` that is supposed
to be used verbatim.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-27 01:48:47 +02:00
Christoph Anton Mitterer
405f4c73e8 btrfs-progs: docs: improve space cache documentation
- "Wipe" in storage terms is often understood as some kind of secure
  deletion.  Use "remove" instead in order to indicate that the space
  cache is fully removed (and not just cleared and then e.g.
  automatically rebuild).

- The --clear-space-cache option for btrfs check actually clears the
  whole space cache, just as documented.  Thus move any documentation
  about the clear_cache mount option not doing so for v1 to that.
  Instead, refer to the mount option.

- Also note that when clear_cache is used with v1, the free space cache
  for block groups that are modified gets always cleared, but rebuilt
  only if nospace_cache is not used.

Pull-request: #571
Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-27 00:51:22 +02:00
Christoph Anton Mitterer
321b2f61fe btrfs-progs: docs: swapfile clarifications
Clarify active vs. inactive swapfile regarding snapshotting and further minor
improvements.

Issue: #608
Pull-request: #618
Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-26 23:24:44 +02:00
David Sterba
93d51b286c btrfs-progs: docs: mention discard=async in mount options
Issue: #617
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-26 12:42:39 +02:00
David Sterba
d7f2ee3300 btrfs-progs: docs: add linux 6.3 changes
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-25 16:59:42 +02:00
David Sterba
5dd176d79e btrfs-progs: docs: clarify swapfile
Clarify active vs inactive swapfile regarding snapshotting.

Issue: #608
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-25 16:59:42 +02:00
David Sterba
33560e2768 btrfs-progs: docs: update Zoned mode
Copy remaining text from wiki.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-25 16:59:42 +02:00
David Sterba
cdb82bf762 btrfs-progs: check: document --force + --repair
The combination of --force and --repair was mistakenly documented as not
working on a mounted filesystem. Update help text, documentation and the
warning itself.

Issue: #503
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-25 16:59:42 +02:00
David Sterba
6ef6c07ef7 btrfs-progs: docs: update scrub manual page
Move ionice options, add example output of status with explanation.

Issue: #200
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-25 16:59:42 +02:00
David Sterba
79bb885c08 btrfs-progs: docs: correct default regarding space cache
The docs got outdated regarding the default version of the free space
cache.

Issue: #560
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-25 16:59:42 +02:00
starship-boi
858a41e6b1 btrfs-progs: docs: typo/clarity fix in Introduction
Pull-request: #614
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-25 16:59:42 +02:00
Qu Wenruo
68a04bc710 btrfs-progs: tune: add new option to convert back to extent tree
With previous btrfstune support to convert to block-group-tree, it has
implemented most of the infrastructure for bi-directional conversion.

This patch will implement the remaining conversion support to go back to
extent tree.

The modification includes:

- New convert_to_extent_tree() function in btrfstune.c
  It's almost the same as convert_to_bg_tree(), but with small changes:
  * No need to set extra features like NO_HOLES/FST.
  * Need to delete the block group tree when everything finished.

- Update btrfs_delete_and_free_root() to handle non-global roots
  Currently the function can only accepts global roots (extent/csum/free
  space trees)

  If we pass a non-global root into the function, we will screw up
  global_roots_tree and crash.

  Since we're going to use btrfs_delete_and_free_root() to free block
  group tree which is not a global tree, this is needed.

- New handling for half converted fs in get_last_converted_bg()
  There are two cases need to be handled:

  * The bg tree is already empty
    We need to grab the first bg in extent tree.
    Or at conversion function we will fail at grabbing the first bg.

  * The bg tree is not empty
    Then we need to grab the last bg in extent tree.

- Extra root switching in involved functions. This involves:

  * read_converting_block_groups()
  * insert_block_group_item()
  * update_block_group_item()

  We just need to update our target root according to the current
  compat_ro and super flags.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-19 01:10:24 +02:00
Qu Wenruo
716c3be363 btrfs-progs: move block-group-tree out of experimental features
The feedback from the community on block group tree is very positive,
the only complain is, end users need to recompile btrfs-progs with
experimental features to enjoy the new feature.

So let's move it out of experimental features and let more people enjoy
faster mount speed.

Also change the option of btrfstune, from `-b` to
`--enable-block-group-tree` to avoid short option.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-17 19:28:05 +02:00
Qu Wenruo
4dbe66ca2f btrfs-progs: mkfs: make -R|--runtime-features option deprecated
The option -R|--runtime-features was introduced to support features that
don't result in a full incompat flag change, thus things like
free-space-tree and quota features are put here.

But to end users, such separation of features is not helpful and can be
sometimes confusing.

Thus we're already migrating those runtime features into -O|--features
option under experimental builds.

I believe this is the proper time to move those runtime features into
-O|--features option, and mark the -R|--runtime-features option
deprecated.

For now we still keep the old option as for compatibility purposes.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-17 19:27:53 +02:00
David Sterba
07d29fedd2 btrfs-progs: docs: reformat kernel-by-version
- convert "*" lists to "-" for newer releases, this is preferred in pull
  requests
- update nested lists to the more compact layout (add more newlines,
  un-indent)
- wrap overly long lines

Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-12 01:31:34 +02:00
David Sterba
c62a19a067 btrfs-progs: docs: update kernel changelogs 5.18 - 6.3
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-12 01:14:57 +02:00
David Sterba
0da68b0065 btrfs-progs: docs: add On disk format
Copied from wiki. May contain out of date information and formatting
mistakes.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-05 01:39:42 +02:00
David Sterba
1551d764c9 btrfs-progs: docs: add Developer's FAQ
Copied from wiki.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-05 01:18:06 +02:00
David Sterba
b95d4d3d01 btrfs-progs: docs: add Development notes
Copied from wiki.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-05 01:03:49 +02:00
David Sterba
dba785a9db btrfs-progs: docs: group developer documentation
Add new directory and move ther all exisisting documentation meant for
developers.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-05 00:20:41 +02:00
David Sterba
540e94275a btrfs-progs: docs: convert send stream protocol descriptions to tables
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-05 00:14:59 +02:00
David Sterba
2f8fc64d50 btrfs-progs: docs: convert btrfs-ioctl to more compact format
Use tabular format instead of the defintion list as it's more compact.
Enable syntax hilighting to code examples.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-03-22 20:07:50 +01:00
David Sterba
403ba6e6ee btrfs-progs: docs: add some design-related documents
Copied from wiki.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-03-22 14:39:17 +01:00
David Sterba
5e4a18b4b5 btrfs-progs: docs: add kernel version changes
Copy from wiki.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-03-22 14:39:15 +01:00
David Sterba
2c5f8de36b btrfs-progs: docs: add Status page from wiki
Signed-off-by: David Sterba <dsterba@suse.com>
2023-03-22 14:39:13 +01:00
Alexander Barton
d82c2ca63c btrfs-progs: docs: fix name of "mountinfo" file in subvolume intro
The name of a mounted sub volume can not be found in /proc/self/mounts
but in /proc/self/mountinfo.

Pull-request: #596
Signed-off-by: Alexander Barton <alex@barton.de>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-03-17 18:14:18 +01:00
softwarecreations
36fcaa1a7b btrfs-progs: docs: update swapfile Added size to mkswapfile example
Let's show users how to set the size of their new swapfile.

Pull-request: #601
Signed-off-by: David Sterba <dsterba@suse.com>
2023-03-16 23:15:15 +01:00