linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation: ext4: atomic_writes: Remove cross-reference labels
@ 2025-06-10  9:11 Bagas Sanjaya
  2025-06-11 16:48 ` Darrick J. Wong
  0 siblings, 1 reply; 9+ messages in thread
From: Bagas Sanjaya @ 2025-06-10  9:11 UTC (permalink / raw)
  To: Linux Kernel Mailing List, Linux Documentation, Linux ext4
  Cc: Theodore Ts'o, Andreas Dilger, Jonathan Corbet,
	Darrick J. Wong, Ritesh Harjani (IBM), Bagas Sanjaya

Sphinx reports htmldocs warnings on ext4 atomic block writes docs:

Documentation/filesystems/ext4/atomic_writes.rst:5: WARNING: duplicate label atomic_writes, other instance in Documentation/filesystems/ext4/atomic_writes.rst
Documentation/filesystems/ext4/atomic_writes.rst:207: WARNING: duplicate label atomic_write_bdev_support, other instance in Documentation/filesystems/ext4/atomic_writes.rst

These warnings reference duplicated cross-reference labels to themselves in
the same doc, which are because atomic_writes.rst is transcluded in
overview.rst via include:: directive, thus the culprit docs get processed
twice.

Remove the labels to fix the warnings.

Fixes: 0bf1f51e34c4 ("ext4: Add atomic block write documentation")
Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 Documentation/filesystems/ext4/atomic_writes.rst | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/Documentation/filesystems/ext4/atomic_writes.rst b/Documentation/filesystems/ext4/atomic_writes.rst
index f65767df3620d5..f1a086aa026b1b 100644
--- a/Documentation/filesystems/ext4/atomic_writes.rst
+++ b/Documentation/filesystems/ext4/atomic_writes.rst
@@ -1,5 +1,4 @@
 .. SPDX-License-Identifier: GPL-2.0
-.. _atomic_writes:
 
 Atomic Block Writes
 -------------------------
@@ -154,7 +153,7 @@ Creating Filesystems with Atomic Write Support
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 First check the atomic write units supported by block device.
-See :ref:`atomic_write_bdev_support` for more details.
+See "Hardware Support" section below for more details.
 
 For single-fsblock atomic writes with a larger block size
 (on systems with block size < page size):
@@ -201,7 +200,6 @@ details:
 The STATX_ATTR_WRITE_ATOMIC flag in ``statx->attributes`` is set if atomic
 writes are supported.
 
-.. _atomic_write_bdev_support:
 
 Hardware Support
 ----------------

base-commit: d3f825032091fc14c7d5e34bcd54317ae4246903
-- 
An old man doll... just what I always wanted! - Clara


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: ext4: atomic_writes: Remove cross-reference labels
  2025-06-10  9:11 [PATCH] Documentation: ext4: atomic_writes: Remove cross-reference labels Bagas Sanjaya
@ 2025-06-11 16:48 ` Darrick J. Wong
  2025-06-11 17:05   ` Jonathan Corbet
  0 siblings, 1 reply; 9+ messages in thread
From: Darrick J. Wong @ 2025-06-11 16:48 UTC (permalink / raw)
  To: Bagas Sanjaya
  Cc: Linux Kernel Mailing List, Linux Documentation, Linux ext4,
	Theodore Ts'o, Andreas Dilger, Jonathan Corbet,
	Ritesh Harjani (IBM)

On Tue, Jun 10, 2025 at 04:11:59PM +0700, Bagas Sanjaya wrote:
> Sphinx reports htmldocs warnings on ext4 atomic block writes docs:
> 
> Documentation/filesystems/ext4/atomic_writes.rst:5: WARNING: duplicate label atomic_writes, other instance in Documentation/filesystems/ext4/atomic_writes.rst
> Documentation/filesystems/ext4/atomic_writes.rst:207: WARNING: duplicate label atomic_write_bdev_support, other instance in Documentation/filesystems/ext4/atomic_writes.rst
> 
> These warnings reference duplicated cross-reference labels to themselves in
> the same doc, which are because atomic_writes.rst is transcluded in
> overview.rst via include:: directive, thus the culprit docs get processed
> twice.

<confused> How is that possible?  atomic_writes.rst is only "include::"d
once in overview.rst.  Is the file implicitly included through some
other means?

--D

> Remove the labels to fix the warnings.
> 
> Fixes: 0bf1f51e34c4 ("ext4: Add atomic block write documentation")
> Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
> ---
>  Documentation/filesystems/ext4/atomic_writes.rst | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/Documentation/filesystems/ext4/atomic_writes.rst b/Documentation/filesystems/ext4/atomic_writes.rst
> index f65767df3620d5..f1a086aa026b1b 100644
> --- a/Documentation/filesystems/ext4/atomic_writes.rst
> +++ b/Documentation/filesystems/ext4/atomic_writes.rst
> @@ -1,5 +1,4 @@
>  .. SPDX-License-Identifier: GPL-2.0
> -.. _atomic_writes:
>  
>  Atomic Block Writes
>  -------------------------
> @@ -154,7 +153,7 @@ Creating Filesystems with Atomic Write Support
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  
>  First check the atomic write units supported by block device.
> -See :ref:`atomic_write_bdev_support` for more details.
> +See "Hardware Support" section below for more details.
>  
>  For single-fsblock atomic writes with a larger block size
>  (on systems with block size < page size):
> @@ -201,7 +200,6 @@ details:
>  The STATX_ATTR_WRITE_ATOMIC flag in ``statx->attributes`` is set if atomic
>  writes are supported.
>  
> -.. _atomic_write_bdev_support:
>  
>  Hardware Support
>  ----------------
> 
> base-commit: d3f825032091fc14c7d5e34bcd54317ae4246903
> -- 
> An old man doll... just what I always wanted! - Clara
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: ext4: atomic_writes: Remove cross-reference labels
  2025-06-11 16:48 ` Darrick J. Wong
@ 2025-06-11 17:05   ` Jonathan Corbet
  2025-06-12  0:07     ` Bagas Sanjaya
  0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Corbet @ 2025-06-11 17:05 UTC (permalink / raw)
  To: Darrick J. Wong, Bagas Sanjaya
  Cc: Linux Kernel Mailing List, Linux Documentation, Linux ext4,
	Theodore Ts'o, Andreas Dilger, Ritesh Harjani (IBM)

"Darrick J. Wong" <djwong@kernel.org> writes:

> On Tue, Jun 10, 2025 at 04:11:59PM +0700, Bagas Sanjaya wrote:
>> Sphinx reports htmldocs warnings on ext4 atomic block writes docs:
>> 
>> Documentation/filesystems/ext4/atomic_writes.rst:5: WARNING: duplicate label atomic_writes, other instance in Documentation/filesystems/ext4/atomic_writes.rst
>> Documentation/filesystems/ext4/atomic_writes.rst:207: WARNING: duplicate label atomic_write_bdev_support, other instance in Documentation/filesystems/ext4/atomic_writes.rst
>> 
>> These warnings reference duplicated cross-reference labels to themselves in
>> the same doc, which are because atomic_writes.rst is transcluded in
>> overview.rst via include:: directive, thus the culprit docs get processed
>> twice.
>
> <confused> How is that possible?  atomic_writes.rst is only "include::"d
> once in overview.rst.  Is the file implicitly included through some
> other means?

Sphinx wants to snarf up every .rst file it sees, regardless of whether
it is explicitly made part of the document tree.  So it will pick up
atomic_writes.rst separately from the include.

This could be "fixed" by removing the .rst extension from the included
file.  But, since there is no use of the atomic_writes label to begin
with, it's better to just take it out.  The other fix, removing a cross
reference, is not entirely ideal, but there is little text between the
label and the reference.

jon

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: ext4: atomic_writes: Remove cross-reference labels
  2025-06-11 17:05   ` Jonathan Corbet
@ 2025-06-12  0:07     ` Bagas Sanjaya
  2025-06-12  1:09       ` Darrick J. Wong
  2025-06-12 12:20       ` Jonathan Corbet
  0 siblings, 2 replies; 9+ messages in thread
From: Bagas Sanjaya @ 2025-06-12  0:07 UTC (permalink / raw)
  To: Jonathan Corbet, Darrick J. Wong
  Cc: Linux Kernel Mailing List, Linux Documentation, Linux ext4,
	Theodore Ts'o, Andreas Dilger, Ritesh Harjani (IBM)

[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]

On Wed, Jun 11, 2025 at 11:05:17AM -0600, Jonathan Corbet wrote:
> "Darrick J. Wong" <djwong@kernel.org> writes:
> 
> > On Tue, Jun 10, 2025 at 04:11:59PM +0700, Bagas Sanjaya wrote:
> >> Sphinx reports htmldocs warnings on ext4 atomic block writes docs:
> >> 
> >> Documentation/filesystems/ext4/atomic_writes.rst:5: WARNING: duplicate label atomic_writes, other instance in Documentation/filesystems/ext4/atomic_writes.rst
> >> Documentation/filesystems/ext4/atomic_writes.rst:207: WARNING: duplicate label atomic_write_bdev_support, other instance in Documentation/filesystems/ext4/atomic_writes.rst
> >> 
> >> These warnings reference duplicated cross-reference labels to themselves in
> >> the same doc, which are because atomic_writes.rst is transcluded in
> >> overview.rst via include:: directive, thus the culprit docs get processed
> >> twice.
> >
> > <confused> How is that possible?  atomic_writes.rst is only "include::"d
> > once in overview.rst.  Is the file implicitly included through some
> > other means?
> 
> Sphinx wants to snarf up every .rst file it sees, regardless of whether
> it is explicitly made part of the document tree.  So it will pick up
> atomic_writes.rst separately from the include.
> 
> This could be "fixed" by removing the .rst extension from the included
> file.  But, since there is no use of the atomic_writes label to begin
> with, it's better to just take it out.  The other fix, removing a cross
> reference, is not entirely ideal, but there is little text between the
> label and the reference.

So removing the labels looks good to you, right?

Confused...

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: ext4: atomic_writes: Remove cross-reference labels
  2025-06-12  0:07     ` Bagas Sanjaya
@ 2025-06-12  1:09       ` Darrick J. Wong
  2025-06-12  2:48         ` Bagas Sanjaya
  2025-06-12 12:22         ` Jonathan Corbet
  2025-06-12 12:20       ` Jonathan Corbet
  1 sibling, 2 replies; 9+ messages in thread
From: Darrick J. Wong @ 2025-06-12  1:09 UTC (permalink / raw)
  To: Bagas Sanjaya
  Cc: Jonathan Corbet, Linux Kernel Mailing List, Linux Documentation,
	Linux ext4, Theodore Ts'o, Andreas Dilger,
	Ritesh Harjani (IBM)

On Thu, Jun 12, 2025 at 07:07:00AM +0700, Bagas Sanjaya wrote:
> On Wed, Jun 11, 2025 at 11:05:17AM -0600, Jonathan Corbet wrote:
> > "Darrick J. Wong" <djwong@kernel.org> writes:
> > 
> > > On Tue, Jun 10, 2025 at 04:11:59PM +0700, Bagas Sanjaya wrote:
> > >> Sphinx reports htmldocs warnings on ext4 atomic block writes docs:
> > >> 
> > >> Documentation/filesystems/ext4/atomic_writes.rst:5: WARNING: duplicate label atomic_writes, other instance in Documentation/filesystems/ext4/atomic_writes.rst
> > >> Documentation/filesystems/ext4/atomic_writes.rst:207: WARNING: duplicate label atomic_write_bdev_support, other instance in Documentation/filesystems/ext4/atomic_writes.rst
> > >> 
> > >> These warnings reference duplicated cross-reference labels to themselves in
> > >> the same doc, which are because atomic_writes.rst is transcluded in
> > >> overview.rst via include:: directive, thus the culprit docs get processed
> > >> twice.
> > >
> > > <confused> How is that possible?  atomic_writes.rst is only "include::"d
> > > once in overview.rst.  Is the file implicitly included through some
> > > other means?
> > 
> > Sphinx wants to snarf up every .rst file it sees, regardless of whether
> > it is explicitly made part of the document tree.  So it will pick up
> > atomic_writes.rst separately from the include.

Does that mean that overview.rst doesn't need to include the other files
at all?

> > This could be "fixed" by removing the .rst extension from the included
> > file.  But, since there is no use of the atomic_writes label to begin
> > with, it's better to just take it out.  The other fix, removing a cross
> > reference, is not entirely ideal, but there is little text between the
> > label and the reference.
> 
> So removing the labels looks good to you, right?

I don't care that much either way, but if sphinx is going to include
every rst file implicitly then maybe we just get rid of the explicit
includes?

> Confused...

Me too.

--D

> 
> -- 
> An old man doll... just what I always wanted! - Clara



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: ext4: atomic_writes: Remove cross-reference labels
  2025-06-12  1:09       ` Darrick J. Wong
@ 2025-06-12  2:48         ` Bagas Sanjaya
  2025-06-12  3:14           ` Bagas Sanjaya
  2025-06-12 12:22         ` Jonathan Corbet
  1 sibling, 1 reply; 9+ messages in thread
From: Bagas Sanjaya @ 2025-06-12  2:48 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Jonathan Corbet, Linux Kernel Mailing List, Linux Documentation,
	Linux ext4, Theodore Ts'o, Andreas Dilger,
	Ritesh Harjani (IBM)

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

On Wed, Jun 11, 2025 at 06:09:42PM -0700, Darrick J. Wong wrote:
> On Thu, Jun 12, 2025 at 07:07:00AM +0700, Bagas Sanjaya wrote:
> > On Wed, Jun 11, 2025 at 11:05:17AM -0600, Jonathan Corbet wrote:
> > > Sphinx wants to snarf up every .rst file it sees, regardless of whether
> > > it is explicitly made part of the document tree.  So it will pick up
> > > atomic_writes.rst separately from the include.
> 
> Does that mean that overview.rst doesn't need to include the other files
> at all?

I think overview.rst can be turned into toctree index.

> 
> > > This could be "fixed" by removing the .rst extension from the included
> > > file.  But, since there is no use of the atomic_writes label to begin
> > > with, it's better to just take it out.  The other fix, removing a cross
> > > reference, is not entirely ideal, but there is little text between the
> > > label and the reference.
> > 
> > So removing the labels looks good to you, right?
> 
> I don't care that much either way, but if sphinx is going to include
> every rst file implicitly then maybe we just get rid of the explicit
> includes?

OK then.

Thanks.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: ext4: atomic_writes: Remove cross-reference labels
  2025-06-12  2:48         ` Bagas Sanjaya
@ 2025-06-12  3:14           ` Bagas Sanjaya
  0 siblings, 0 replies; 9+ messages in thread
From: Bagas Sanjaya @ 2025-06-12  3:14 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: Jonathan Corbet, Linux Kernel Mailing List, Linux Documentation,
	Linux ext4, Theodore Ts'o, Andreas Dilger,
	Ritesh Harjani (IBM)

On 6/12/25 09:48, Bagas Sanjaya wrote:
> On Wed, Jun 11, 2025 at 06:09:42PM -0700, Darrick J. Wong wrote:
>> On Thu, Jun 12, 2025 at 07:07:00AM +0700, Bagas Sanjaya wrote:
>>> On Wed, Jun 11, 2025 at 11:05:17AM -0600, Jonathan Corbet wrote:
>>>> Sphinx wants to snarf up every .rst file it sees, regardless of whether
>>>> it is explicitly made part of the document tree.  So it will pick up
>>>> atomic_writes.rst separately from the include.
>>
>> Does that mean that overview.rst doesn't need to include the other files
>> at all?
> 
> I think overview.rst can be turned into toctree index.
> 

Or maybe slurp all included .rst's.

Thanks.


-- 
An old man doll... just what I always wanted! - Clara

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: ext4: atomic_writes: Remove cross-reference labels
  2025-06-12  0:07     ` Bagas Sanjaya
  2025-06-12  1:09       ` Darrick J. Wong
@ 2025-06-12 12:20       ` Jonathan Corbet
  1 sibling, 0 replies; 9+ messages in thread
From: Jonathan Corbet @ 2025-06-12 12:20 UTC (permalink / raw)
  To: Bagas Sanjaya, Darrick J. Wong
  Cc: Linux Kernel Mailing List, Linux Documentation, Linux ext4,
	Theodore Ts'o, Andreas Dilger, Ritesh Harjani (IBM)

Bagas Sanjaya <bagasdotme@gmail.com> writes:

> So removing the labels looks good to you, right?
>
> Confused...

Removing unused labels is always good.  Removing *used* labels is
obviously a bit more questionable; in this case, as I said, it's
probably OK.

jon

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] Documentation: ext4: atomic_writes: Remove cross-reference labels
  2025-06-12  1:09       ` Darrick J. Wong
  2025-06-12  2:48         ` Bagas Sanjaya
@ 2025-06-12 12:22         ` Jonathan Corbet
  1 sibling, 0 replies; 9+ messages in thread
From: Jonathan Corbet @ 2025-06-12 12:22 UTC (permalink / raw)
  To: Darrick J. Wong, Bagas Sanjaya
  Cc: Linux Kernel Mailing List, Linux Documentation, Linux ext4,
	Theodore Ts'o, Andreas Dilger, Ritesh Harjani (IBM)

"Darrick J. Wong" <djwong@kernel.org> writes:

>> > Sphinx wants to snarf up every .rst file it sees, regardless of whether
>> > it is explicitly made part of the document tree.  So it will pick up
>> > atomic_writes.rst separately from the include.
>
> Does that mean that overview.rst doesn't need to include the other files
> at all?

Not quite.  Sphinx does what is arguably the least useful thing possible
- it picks up and parses the file, but does not place it in the TOC
tree.  It will normally warn in such cases, at least.  So if this file
is not brought in with an "include" directive, it needs to appear in a
table of contents somewhere.

jon

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-06-12 12:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-10  9:11 [PATCH] Documentation: ext4: atomic_writes: Remove cross-reference labels Bagas Sanjaya
2025-06-11 16:48 ` Darrick J. Wong
2025-06-11 17:05   ` Jonathan Corbet
2025-06-12  0:07     ` Bagas Sanjaya
2025-06-12  1:09       ` Darrick J. Wong
2025-06-12  2:48         ` Bagas Sanjaya
2025-06-12  3:14           ` Bagas Sanjaya
2025-06-12 12:22         ` Jonathan Corbet
2025-06-12 12:20       ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).