Skip to content

Commit 1afe51d

Browse files
committed
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 <[email protected]>
1 parent 405f4c7 commit 1afe51d

37 files changed

+144
-144
lines changed

Documentation/Common-features.rst

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ fallocate modes
2020
holes, preallocation or zeroing a range
2121

2222
FIEMAP
23-
an ioctl that enumerates file extents, related tool is ``filefrag``
23+
an ioctl that enumerates file extents, related tool is :command:`filefrag`
2424

2525
filesystem label
2626
another filesystem identification, could be used for mount or for better
27-
recognition, can be set or read by an ioctl or by command ``btrfs
28-
filesystem label``
27+
recognition, can be set or read by an ioctl or by command :command:`btrfs filesystem label`
2928

3029
O_TMPFILE
3130
mode of open() syscall that creates a file with no associated directory
@@ -36,8 +35,7 @@ O_TMPFILE
3635
xattr, acl
3736
extended attributes (xattr) is a list of *key=value* pairs associated
3837
with a file, usually storing additional metadata related to security,
39-
access control list in particular (ACL) or properties (``btrfs
40-
property``)
38+
access control list in particular (ACL) or properties (:command:`btrfs property`)
4139

4240
cross-rename
4341
mode of *renameat2* syscall that can atomically swap 2 directory

Documentation/Custom-ioctls.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@ call interface to let user applications access the advanced features. They're
66
low level and the following list gives only an overview of the capabilities or
77
a command if available:
88

9-
- reverse lookup, from file offset to inode, as command ``btrfs
10-
inspect-internal logical-resolve``
9+
- reverse lookup, from file offset to inode, as command :command:`btrfs inspect-internal logical-resolve`
1110

12-
- resolve inode number to list of names, as command ``btrfs inspect-internal inode-resolve``
11+
- resolve inode number to list of names, as command :command:`btrfs inspect-internal inode-resolve`
1312

1413
- tree search, given a key range and tree id, lookup and return all b-tree items
1514
found in that range, basically all metadata at your hand but you need to know
1615
what to do with them, the ioctl is privileged as it has full access to all
1716
filesystem metadata
1817

1918
- informative, about devices, space allocation or the whole filesystem, many of
20-
which is also exported in ``/sys/fs/btrfs``
19+
which is also exported in :file:`/sys/fs/btrfs/`
2120

2221
- query/set a subset of features on a mounted filesystem

Documentation/Feature-by-version.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ features see [[Status]] page.
282282
5.0 - metadata uuid
283283
An optional incompat feature to assign a new filesystem UUID without
284284
overwriting all metadata blocks, stored only in superblock, unlike what
285-
``btrfstune -u``
285+
:command:`btrfstune -u`
286286

287287
5.1 - FORGET_DEV ioctl
288288
Unregister devices previously added by the scan ioctl, same effect as
@@ -315,7 +315,7 @@ features see [[Status]] page.
315315

316316
5.7 - faster balance cancel
317317
More cancellation points in balance that will shorten the time to stop
318-
processing once ``btrfs balance cancel`` is called.
318+
processing once :command:`btrfs balance cancel` is called.
319319

320320
5.7 - *removed flag BTRFS_SUBVOL_CREATE_ASYNC*
321321
Remove support of flag BTRFS_SUBVOL_CREATE_ASYNC from subvolume creation ioctl.

Documentation/Glossary.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ allocator
1414

1515
balance
1616
An operation that can be done to a btrfs filesystem, for example
17-
through ``btrfs fi balance /path``. A
17+
through :command:`btrfs fi balance /path`. A
1818
balance passes all data in the filesystem through the *allocator*
1919
again. It is primarily intended to rebalance the data in the filesystem
2020
across the *devices* when a device is added or removed. A balance
@@ -247,11 +247,11 @@ RAID-10
247247
performance.
248248

249249
reflink
250-
Parameter to ``cp``, allowing it to take advantage of the
250+
Parameter to :command:`cp`, allowing it to take advantage of the
251251
capabilities of *COW*-capable filesystems. Allows for files to be
252252
copied and modified, with only the modifications taking up additional
253253
storage space. May be considered as *snapshots* on a single file rather
254-
than a *subvolume*. Example: ``cp --reflink file1 file2``
254+
than a *subvolume*. Example: :command:`cp --reflink file1 file2`
255255

256256
relocation
257257
The process of moving block groups within the filesystem while

Documentation/Inline-files.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ It can be completely disabled by mounting with ``max_inline=0``. The upper
1212
limit is either the size of b-tree node or the page size of the host.
1313

1414
An inline file can be identified by enumerating the extents, e.g. by the tool
15-
``filefrag``:
15+
:command:`filefrag`:
1616

1717
.. code-block:: bash
1818

Documentation/Subpage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pages, like 64KiB on 64bit ARM or PowerPC. This means filesystems created
1010
with 64KiB sector size cannot be mounted on a system with 4KiB page size.
1111

1212
While with subpage support, systems with 64KiB page size can create (still needs
13-
"-s 4k" option for mkfs.btrfs) and mount filesystems with 4KiB sectorsize,
13+
"-s 4k" option for :command:`mkfs.btrfs`) and mount filesystems with 4KiB sectorsize,
1414
allowing us to push 4KiB sectorsize as default sectorsize for all platforms in the
1515
near future.
1616

Documentation/Trim.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ asynchronous
2626
with the rest of the filesystem activity
2727

2828
manually by fstrim
29-
the tool ``fstrim`` starts a trim operation on the whole filesystem, no
29+
the tool :command:`fstrim` starts a trim operation on the whole filesystem, no
3030
mount options need to be specified, so it's up to the filesystem to
3131
traverse the free space and start the trim, this is suitable for running
3232
it as periodic service

Documentation/btrfs-check.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ and attempt to repair it if requested. It is recommended to unmount the
1414
filesystem prior to running the check, but it is possible to start checking a
1515
mounted filesystem (see *--force*).
1616

17-
By default, **btrfs check** will not modify the device but you can reaffirm that
17+
By default, :command:`btrfs check` will not modify the device but you can reaffirm that
1818
by the option *--readonly*.
1919

20-
**btrfsck** is an alias of **btrfs check** command and is now deprecated.
20+
:command:`btrfsck` is an alias of :command:`btrfs check` command and is now deprecated.
2121

2222
.. warning::
2323
Do not use *--repair* unless you are advised to do so by a developer

Documentation/btrfs-device.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SYNOPSIS
99
DESCRIPTION
1010
-----------
1111

12-
The **btrfs device** command group is used to manage devices of the btrfs filesystems.
12+
The :command:`btrfs device` command group is used to manage devices of the btrfs filesystems.
1313

1414
DEVICE MANAGEMENT
1515
-----------------

Documentation/btrfs-filesystem.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SYNOPSIS
99
DESCRIPTION
1010
-----------
1111

12-
**btrfs filesystem** is used to perform several whole filesystem level tasks,
12+
:command:`btrfs filesystem` is used to perform several whole filesystem level tasks,
1313
including all the regular filesystem operations like resizing, space stats,
1414
label setting/getting, and defragmentation. There are other whole filesystem
1515
tasks like scrub or balance that are grouped in separate commands.
@@ -26,7 +26,7 @@ df [options] <path>
2626

2727
* device size: *1.9TiB*, one device, no RAID
2828
* filesystem size: *1.9TiB*
29-
* created with: **mkfs.btrfs -d single -m single**
29+
* created with: :command:`mkfs.btrfs -d single -m single`
3030

3131
.. code-block:: none
3232
@@ -94,7 +94,7 @@ defragment [options] <file>|<dir> [<file>|<dir>...]
9494
.. warning::
9595
Defragmenting with Linux kernel versions < 3.9 or ≥ 3.14-rc2 as well as
9696
with Linux stable kernel versions ≥ 3.10.31, ≥ 3.12.12 or ≥ 3.13.4 will break up
97-
the reflinks of COW data (for example files copied with **cp --reflink**,
97+
the reflinks of COW data (for example files copied with :command:`cp --reflink`,
9898
snapshots or de-duplicated data).
9999
This may cause considerable increase of space usage depending on the broken up
100100
reflinks.
@@ -146,7 +146,7 @@ du [options] <path> [<path>..]
146146
shared) bytes. We also calculate a 'set shared' value which is
147147
described below.
148148

149-
Each argument to **btrfs filesystem du** will have a *set shared* value
149+
Each argument to :command:`btrfs filesystem du` will have a *set shared* value
150150
calculated for it. We define each *set* as those files found by a
151151
recursive search of an argument (recursion descends to subvolumes but not
152152
mount points). The *set shared* value then is a sum of all shared space
@@ -197,8 +197,9 @@ mkswapfile [-s size] file
197197
activated swapfile cannot be balanced.
198198

199199
Swapfile creation can be achieved by standalone commands too. Activation
200-
needs to be done by command ``swapon(8)``. See also command ``btrfs
201-
inspect-internal map-swapfile`` and the :doc:`Swapfile feature<Swapfile>` description.
200+
needs to be done by command ``swapon(8)``. See also command
201+
:command:`btrfs inspect-internal map-swapfile`
202+
and the :doc:`Swapfile feature<Swapfile>` description.
202203

203204
.. note::
204205
The command is a simplified version of 'mkswap', if you want to set
@@ -223,7 +224,7 @@ resize [options] [<devid>:][+/-]<size>[kKmMgGtTpPeE]|[<devid>:]max <path>
223224
as expected and does not resize the image. This would resize the underlying
224225
filesystem instead.
225226

226-
The *devid* can be found in the output of **btrfs filesystem show** and
227+
The *devid* can be found in the output of :command:`btrfs filesystem show` and
227228
defaults to 1 if not specified.
228229
The *size* parameter specifies the new size of the filesystem.
229230
If the prefix *+* or *-* is present the size is increased or decreased
@@ -291,11 +292,11 @@ show [options] [<path>|<uuid>|<device>|<label>]
291292
sync <path>
292293
Force a sync of the filesystem at *path*, similar to the ``sync(1)`` command. In
293294
addition, it starts cleaning of deleted subvolumes. To wait for the subvolume
294-
deletion to complete use the **btrfs subvolume sync** command.
295+
deletion to complete use the :command:`btrfs subvolume sync` command.
295296

296297
usage [options] <path> [<path>...]
297298
Show detailed information about internal filesystem usage. This is supposed to
298-
replace the **btrfs filesystem df** command in the long run.
299+
replace the :command:`btrfs filesystem df` command in the long run.
299300

300301
The level of detail can differ if the command is run under a regular or the
301302
root user (due to use of restricted ioctl). For both there's a summary section
@@ -461,7 +462,7 @@ simply using *max* as size we will achieve that.
461462

462463
.. note::
463464
There are two ways to minimize the filesystem on a given device. The
464-
**btrfs inspect-internal min-dev-size** command, or iteratively shrink in steps.
465+
:command:`btrfs inspect-internal min-dev-size` command, or iteratively shrink in steps.
465466

466467
EXIT STATUS
467468
-----------

0 commit comments

Comments
 (0)