LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] docs: admin-guide/blockdev: Use subgraphs in node-states-8.dot
@ 2021-11-17  9:38 Akira Yokosawa
  2021-11-25 14:16 ` Akira Yokosawa
  0 siblings, 1 reply; 3+ messages in thread
From: Akira Yokosawa @ 2021-11-17  9:38 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: linux-doc, linux-kernel, drbd-dev, Philipp Reisner, Lars Ellenberg

While node-states-8.dot has two digraphs, dot(1) command can not
properly handle multiple graphs in a DOT file.

Use subgraphs and merge them into a single graph.

Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: Philipp Reisner <philipp.reisner@linbit.com>
Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
---
Hi Jon,

I happened to spot a broken DOT script at the bottom of

    https://www.kernel.org/doc/html/latest/admin-guide/blockdev/drbd/figures.html

and managed to fix it.

DRBD DRIVER maintainers,
If I'm missing something here, please let me know.

        Thanks, Akira
--
 .../blockdev/drbd/node-states-8.dot           | 25 +++++++++++--------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/Documentation/admin-guide/blockdev/drbd/node-states-8.dot b/Documentation/admin-guide/blockdev/drbd/node-states-8.dot
index bfa54e1f8016..993f0c152ead 100644
--- a/Documentation/admin-guide/blockdev/drbd/node-states-8.dot
+++ b/Documentation/admin-guide/blockdev/drbd/node-states-8.dot
@@ -1,13 +1,16 @@
-digraph node_states {
-	Secondary -> Primary           [ label = "ioctl_set_state()" ]
-	Primary   -> Secondary 	       [ label = "ioctl_set_state()" ]
-}
+digraph G {
+	compound=true;
+	subgraph node_states {
+		Secondary -> Primary           [ label = "ioctl_set_state()" ]
+		Primary   -> Secondary 	       [ label = "ioctl_set_state()" ]
+	}
 
-digraph peer_states {
-	Secondary -> Primary           [ label = "recv state packet" ]
-	Primary   -> Secondary 	       [ label = "recv state packet" ]
-	Primary   -> Unknown 	       [ label = "connection lost" ]
-	Secondary  -> Unknown  	       [ label = "connection lost" ]
-	Unknown   -> Primary           [ label = "connected" ]
-	Unknown   -> Secondary         [ label = "connected" ]
+	subgraph peer_states {
+		Secondary -> Primary           [ label = "recv state packet" ]
+		Primary   -> Secondary 	       [ label = "recv state packet" ]
+		Primary   -> Unknown 	       [ label = "connection lost" ]
+		Secondary  -> Unknown  	       [ label = "connection lost" ]
+		Unknown   -> Primary           [ label = "connected" ]
+		Unknown   -> Secondary         [ label = "connected" ]
+	}
 }

base-commit: 53b606fa29e321352a105978726b975b42b292a4
-- 
2.17.1


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

* Re: [PATCH] docs: admin-guide/blockdev: Use subgraphs in node-states-8.dot
  2021-11-17  9:38 [PATCH] docs: admin-guide/blockdev: Use subgraphs in node-states-8.dot Akira Yokosawa
@ 2021-11-25 14:16 ` Akira Yokosawa
  2021-11-25 17:41   ` [Drbd-dev] " Joel Colledge
  0 siblings, 1 reply; 3+ messages in thread
From: Akira Yokosawa @ 2021-11-25 14:16 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: linux-doc, linux-kernel, drbd-dev, Philipp Reisner, Lars Ellenberg

On Wed, 17 Nov 2021 18:38:14 +0900, Akira Yokosawa wrote:
> While node-states-8.dot has two digraphs, dot(1) command can not
> properly handle multiple graphs in a DOT file.
> 
> Use subgraphs and merge them into a single graph.
> 
> Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
> Cc: Philipp Reisner <philipp.reisner@linbit.com>
> Cc: Lars Ellenberg <lars.ellenberg@linbit.com>
> ---
> Hi Jon,
> 
> I happened to spot a broken DOT script at the bottom of
> 
>     https://www.kernel.org/doc/html/latest/admin-guide/blockdev/drbd/figures.html
> 
> and managed to fix it.

Gentle ping?

        Thanks, Akira

> 
> DRBD DRIVER maintainers,
> If I'm missing something here, please let me know.
> 
>         Thanks, Akira
> --
>  .../blockdev/drbd/node-states-8.dot           | 25 +++++++++++--------
>  1 file changed, 14 insertions(+), 11 deletions(-)
> 
> diff --git a/Documentation/admin-guide/blockdev/drbd/node-states-8.dot b/Documentation/admin-guide/blockdev/drbd/node-states-8.dot
> index bfa54e1f8016..993f0c152ead 100644
> --- a/Documentation/admin-guide/blockdev/drbd/node-states-8.dot
> +++ b/Documentation/admin-guide/blockdev/drbd/node-states-8.dot
> @@ -1,13 +1,16 @@
> -digraph node_states {
> -	Secondary -> Primary           [ label = "ioctl_set_state()" ]
> -	Primary   -> Secondary 	       [ label = "ioctl_set_state()" ]
> -}
> +digraph G {
> +	compound=true;
> +	subgraph node_states {
> +		Secondary -> Primary           [ label = "ioctl_set_state()" ]
> +		Primary   -> Secondary 	       [ label = "ioctl_set_state()" ]
> +	}
>  
> -digraph peer_states {
> -	Secondary -> Primary           [ label = "recv state packet" ]
> -	Primary   -> Secondary 	       [ label = "recv state packet" ]
> -	Primary   -> Unknown 	       [ label = "connection lost" ]
> -	Secondary  -> Unknown  	       [ label = "connection lost" ]
> -	Unknown   -> Primary           [ label = "connected" ]
> -	Unknown   -> Secondary         [ label = "connected" ]
> +	subgraph peer_states {
> +		Secondary -> Primary           [ label = "recv state packet" ]
> +		Primary   -> Secondary 	       [ label = "recv state packet" ]
> +		Primary   -> Unknown 	       [ label = "connection lost" ]
> +		Secondary  -> Unknown  	       [ label = "connection lost" ]
> +		Unknown   -> Primary           [ label = "connected" ]
> +		Unknown   -> Secondary         [ label = "connected" ]
> +	}
>  }
> 
> base-commit: 53b606fa29e321352a105978726b975b42b292a4
> 

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

* Re: [Drbd-dev] [PATCH] docs: admin-guide/blockdev: Use subgraphs in node-states-8.dot
  2021-11-25 14:16 ` Akira Yokosawa
@ 2021-11-25 17:41   ` Joel Colledge
  0 siblings, 0 replies; 3+ messages in thread
From: Joel Colledge @ 2021-11-25 17:41 UTC (permalink / raw)
  To: Akira Yokosawa
  Cc: Jonathan Corbet, Lars Ellenberg, drbd-dev, linux-kernel,
	Philipp Reisner, linux-doc

Thanks for catching this, Akira.

Unfortunately, this fix causes the "node_states" and "peer_states"
graphs to be mixed up. I guess this happens because the same IDs are
used in each subgraph. The graphs should be separate.

On reflection, the digraph node_states can be removed entirely. It is
too basic to contain any useful information. In addition it references
"ioctl_set_state". The ioctl configuration interface for DRBD has long
been removed. In fact, it was never in the upstream version of DRBD.

Best regards,
Joel

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

end of thread, other threads:[~2021-11-25 17:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17  9:38 [PATCH] docs: admin-guide/blockdev: Use subgraphs in node-states-8.dot Akira Yokosawa
2021-11-25 14:16 ` Akira Yokosawa
2021-11-25 17:41   ` [Drbd-dev] " Joel Colledge

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).