Skip to content

Commit

Permalink
btrfs-progs: docs: fix sphinx code-block warnings
Browse files Browse the repository at this point in the history
There are several warnings regarding the absence of an argument for the
code-block directive on some build servers using python3-sphinx 0.2.2-17.

For example:

Making all in Documentation
    [SPHINX] man
ch-subvolume-intro.rst:141: WARNING: Error in "code-block" directive:
1 argument(s) required, 0 supplied.

.. code-block::

   27 21 0:19 /subv1 /mnt rw,relatime - btrfs /dev/sda rw,space_cache

 Etc...

Add the none argument.

[ci skip]

Signed-off-by: Anand Jain <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
asj authored and kdave committed Jan 10, 2024
1 parent dbd1757 commit 2b3d955
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Documentation/Tree-checker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fine.

A message may look like:

.. code-block::
.. code-block:: none
[ 1716.823895] BTRFS critical (device vdb): corrupt leaf: root=18446744073709551607 block=38092800 slot=0, invalid key objectid: has 1 expect 6 or [256, 18446744073709551360] or 18446744073709551604
[ 1716.829499] BTRFS info (device vdb): leaf 38092800 gen 19 total ptrs 4 free space 15851 owner 18446744073709551607
Expand All @@ -54,7 +54,7 @@ checksum is found to be valid. This protects against changes to the metadata
that could possibly also update the checksum, less likely to happen accidentally
but rather due to intentional corruption or fuzzing.

.. code-block::
.. code-block:: none
[ 4823.612832] BTRFS critical (device vdb): corrupt leaf: root=7 block=30474240 slot=0, invalid nritems, have 0 should not be 0 for non-root leaf
[ 4823.616798] BTRFS error (device vdb): block=30474240 read time tree block corruption detected
Expand Down
2 changes: 1 addition & 1 deletion Documentation/ch-subvolume-intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Mounting a read-write snapshot as read-only is possible and will not change the
The name of the mounted subvolume is stored in file :file:`/proc/self/mountinfo` in
the 4th column:

.. code-block::
.. code-block:: none
27 21 0:19 /subv1 /mnt rw,relatime - btrfs /dev/sda rw,space_cache
^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion Documentation/dev/Developer-s-FAQ.rst
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ For the next iteration, add a short description of the changes made, under the
first **---** (triple dash) marker in the patch. For example (see also Example
3):

.. code-block::
.. code-block:: none
---
V3: renamed variable
Expand Down
4 changes: 2 additions & 2 deletions Documentation/dev/Experimental.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ filed as issues.

In the code use it like:

.. code-block::
.. code-block:: none
if (EXPERIMENTAL) {
...
Expand All @@ -22,7 +22,7 @@ where it would break default build.

Or:

.. code-block::
.. code-block:: none
#if EXPERIMENTAL
...
Expand Down
8 changes: 4 additions & 4 deletions Documentation/dev/dev-btrfs-design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The Btrfs btree provides a generic facility to store a variety of data
types. Internally it only knows about three data structures: keys,
items, and a block header:

.. code-block::
.. code-block:: none
struct btrfs_header {
u8 csum[32];
Expand All @@ -30,15 +30,15 @@ items, and a block header:
u8 level;
}
.. code-block::
.. code-block:: none
struct btrfs_disk_key {
__le64 objectid;
u8 type;
__le64 offset;
}
.. code-block::
.. code-block:: none
struct btrfs_item {
struct btrfs_disk_key key;
Expand Down Expand Up @@ -311,7 +311,7 @@ field of the root block may be different from the objectid of the
snapshot. So, when dropping references on tree roots, the objectid of
the root structure is always used. When a backref is deleted:

.. code-block::
.. code-block:: none
if backref was for a tree root:
     root_objectid = root->root_key.objectid
Expand Down
16 changes: 8 additions & 8 deletions Documentation/trouble-index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Error: parent transid verify error
Reason: result of a failed internal consistency check of the filesystem's metadata.
Type: permanent

.. code-block::
.. code-block:: none
[ 4007.489730] BTRFS error (device vdb): parent transid verify failed on 30736384 wanted 10 found 8
Expand Down Expand Up @@ -59,7 +59,7 @@ persisted and possibly making old copies available.
The most obvious way how to exhaust space is to create a file until the data
chunks are full:

.. code-block::
.. code-block:: none
$ df -h .
Filesystem Size Used Avail Use% Mounted on
Expand Down Expand Up @@ -98,7 +98,7 @@ action is possible. If not, ENOSPC is returned.
Error: unable to start balance with target metadata profile
-----------------------------------------------------------

.. code-block::
.. code-block:: none
unable to start balance with target metadata profile 32
Expand All @@ -111,7 +111,7 @@ Error: balance will reduce metadata integrity

The full message in system log

.. code-block::
.. code-block:: none
balance will reduce metadata integrity, use force if you want this
Expand All @@ -126,7 +126,7 @@ The preferred way is to use the :command:`wipefs` utility that is part of the
*util-linux* package. Running the command with the device will not destroy
the data, just list the detected filesystems:

.. code-block::
.. code-block:: none
# wipefs /dev/sda
offset type
Expand All @@ -137,7 +137,7 @@ the data, just list the detected filesystems:
Remove the filesystem signature at a given offset or wipe all recognized
signatures on the device:

.. code-block::
.. code-block:: none
# wipefs -o 0x10040 /dev/sda
8 bytes [5f 42 48 52 66 53 5f 4d] erased at offset 0x10040 (btrfs)
Expand Down Expand Up @@ -172,15 +172,15 @@ at 64MiB, the third one at 256GiB. The following lines reset the signature
on all the three copies:


.. code-block::
.. code-block:: none
# dd if=/dev/zero bs=1 count=8 of=/dev/sda seek=$((64*1024+64))
# dd if=/dev/zero bs=1 count=8 of=/dev/sda seek=$((64*1024*1024+64))
# dd if=/dev/zero bs=1 count=8 of=/dev/sda seek=$((256*1024*1024*1024+64))
If you want to restore the super block signatures:

.. code-block::
.. code-block:: none
# echo "_BHRfS_M" | dd bs=1 count=8 of=/dev/sda seek=$((64*1024+64))
# echo "_BHRfS_M" | dd bs=1 count=8 of=/dev/sda seek=$((64*1024*1024+64))
Expand Down

0 comments on commit 2b3d955

Please sign in to comment.