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>
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>
The wiki has been archived so remove the links from manual page
footers. Also replace the wiki link by RTD site in configure and
libbtrfsutil.
Signed-off-by: David Sterba <dsterba@suse.com>
Since kernel v6.1, we have had discard tunables and metrics under sysfs.
Add documentation for them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
With the growing list of global option we need to print them somewhere
in the help text and document them.
Signed-off-by: David Sterba <dsterba@suse.com>
Add option --uuid with same semantics that is provided by command
'mkswap'. By default a random UUID is generated, to not set any use
'btrfs filesystem mkswapfile -U clear swapfile'.
Issue: #581
Signed-off-by: David Sterba <dsterba@suse.com>
Input must be prepared and output must be interpreted under the C
locale, which requires special precautions on the client’s side.
Pull-request: #561
Author: Christopher Yeleighton <ne01026@shark.2a.pl>
Signed-off-by: David Sterba <dsterba@suse.com>
There are two "bg_reclaim_threshold" under the sysfs directory. One is at
/sys/fs/btrfs/<UUID>/ and sets the threshold to start the auto reclaim
thread. The other one is
at/sys/fs/btrfs/<UUID>/allocations/{data,metadata,system} and sets the
threshold to reclaim a block group.
These two options have the same name but they are calculated against
different metrics. The former is a percentage of allocated (for a device
extent) space on total device space, and the latter is a percentage of
reclaimable space on a block group's zone capacity.
Add description for per-space_info bg_reclaim_threshold to distinguish
these two same name configurations.
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
The copyright config variable can be used for a real copyright but we
don't have that for the manual pages and it was a stub. The date of page
generation time is added to the page anyway.
Signed-off-by: David Sterba <dsterba@suse.com>
This patch will add a dedicated section for btrfs sysfs interfaces.
It will include:
- Directory layout explanation
Including:
* Description
* Introduced in which kernel version
- Files explanation
Including:
* RW/RO type
* Description
* Introduced in which kernel version
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Per user report on https://old.reddit.com/r/btrfs/comments/107fnw1/btrfs_filesystem_mkswapfile_results_in_an/
the swapfile header does not contain the correct number of pages that
matches the file size and the activated swapfile is only 1GiB:
# btrfs filesystem mkswapfile -s 10g swapfile
# swapon swapfile
# cat /proc/swaps
Filename Type Size Used Priority
/swap/swapfile file 1048572 0 -2
A workaround is to run 'mkswap swapfile' before activation. Proper fix
is to calculate the number of (fixed size) 4K pages available for the
swap.
Issue: #568
Signed-off-by: David Sterba <dsterba@suse.com>
Add a command to create a new swapfile. The same can be achieved by
seandalone tools but they're just wrappers around the syscalls. The swap
format is simple enough to be created directly without mkswap command so
the swapfile can be created in one go.
The file must not exist before, this is to avoid problems with file
attributes or any other effects of existing extents. This also means the
command can't be used on block devices.
Default size is 2G, minimum size is 40KiB.
Signed-off-by: David Sterba <dsterba@suse.com>
A stale qgroup is level 0 and without a corresponding subvolume. There's
no convenient command for removing them and kernel does not remove them
automatically. Add a command so users don't have to parse and script the
output and/or delete them manually.
Signed-off-by: David Sterba <dsterba@suse.com>
The fact that the +C attribute excludes compression is mentioned in
<https://btrfs.readthedocs.io/en/latest/ch-compression.html#compatibility>.
Also mention it at the swapfile for clarity.
Pull-request: #530
Author: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Adds a new options -W and --wait-norescan to wait for a rescan without
starting a new operation. This is useful for things like fstests where
we want do to do a "btrfs quota enable" and not continue until the
subsequent rescan has finished.
In addition to documenting the new option in the man page, clean up the
rescan entry to document the -w option a bit better.
Pull-request: #139
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
The message could be confusing in case there's no send in progress and
the real reason is lack of permissions when deleting a subvolume.
Mention the permissions as first reason. Also update documentation.
Signed-off-by: David Sterba <dsterba@suse.com>
The option is listed among normal options but getopt does not recognize
it outside of experimental build, so make it consistent. Also mention
the correct version and need of the special build in documentation.
Signed-off-by: David Sterba <dsterba@suse.com>
As reported the documentation stated the send protocol v2 support was
supported since 5.18, but that's probably remnants of past revisions of
the patches introducing the support. Correct version is 6.0
Issue: #529
Signed-off-by: David Sterba <dsterba@suse.com>
Clarify that tree-stats can print inaccurate results or warnings when
the filesystem is mounted. Inspired by
https://bugzilla.kernel.org/show_bug.cgi?id=97481 .
Signed-off-by: David Sterba <dsterba@suse.com>
The leafsize has never been different from nodesize and since 4.0 (2015)
it's been alias for nodesize. This should be enough time for everybody
to update so the support is removed.
Signed-off-by: David Sterba <dsterba@suse.com>
The meaning of the -b/--byte-count option is different than what the
help text says. Historically it was used to set the filesystem size but
with multiple devices it sets the size on each device:
$ mkfs.btrfs /dev/sdx[1234]
...
Number of devices: 4
Devices:
ID SIZE PATH
1 2.00GiB /dev/sdx1
2 2.00GiB /dev/sdx2
3 2.00GiB /dev/sdx3
4 2.00GiB /dev/sdx4
And when set to 1G:
$ mkfs.btrfs -b 1G /dev/sdx[1234]
...
Number of devices: 4
Devices:
ID SIZE PATH
1 1.00GiB /dev/sdx1
2 1.00GiB /dev/sdx2
3 1.00GiB /dev/sdx3
4 1.00GiB /dev/sdx4
Signed-off-by: David Sterba <dsterba@suse.com>