ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Max Kellermann <max@blarg.de>
To: Viacheslav Dubeyko <slava@dubeyko.com>
Cc: ceph-devel@vger.kernel.org, idryomov@gmail.com,
	linux-fsdevel@vger.kernel.org, pdonnell@redhat.com,
	amarkuze@redhat.com, Slava.Dubeyko@ibm.com, vdubeyko@redhat.com
Subject: Re: [RFC PATCH 13/20] ceph: add comments to metadata structures in msgr.h
Date: Sat, 6 Sep 2025 00:18:52 +0200	[thread overview]
Message-ID: <aLthzKYmppZzgfU0@swift.blarg.de> (raw)
In-Reply-To: <20250905200108.151563-14-slava@dubeyko.com>

On 2025/09/05 22:01, Viacheslav Dubeyko <slava@dubeyko.com> wrote:
> Claude AI generated comments for CephFS metadata structure
> declarations in include/linux/ceph/*.h. These comments
> have been reviewed, checked, and corrected.

After looking at several of your patches, I doubt the value of this
effort.  This is mostly just redundant noise being added.

>  struct ceph_entity_addr {
> +	/* Address type identifier */
>  	__le32 type;  /* CEPH_ENTITY_ADDR_TYPE_* */

The old comment, which you (accidently?) left in there, is better than
your new comment.  It specifies what values are possible.

"Address type identifier" means nothing to me, no more than "type" of
"ceph_entity_addr".

> -	__le32 nonce;  /* unique id for process (e.g. pid) */
> +	/* Unique process identifier (typically PID) */
> +	__le32 nonce;

No improvement here.  Just rephrased to be a bit more verbose without
adding any information.

> +	/* Socket address (IPv4/IPv6) */
>  	struct sockaddr_storage in_addr;

Surprise - a "struct sockaddr_storage" is a socket address?  Does this
need to be explained?

What is the value of pointing out that it can be IPv4 or IPv6?  You
asked Claude to generate tokens, and so it did.  But do these tokens
add any value?  I don't think so.

>  struct ceph_entity_inst {
> +	/* Logical entity name (type + number) */
>  	struct ceph_entity_name name;

I don't understand this comment.  Okay, so the entity name is an
entity name, but what does it mean for a name to be "logical"?  What
is this "type" and "number" and how do you add them?

> +	/* Network address for this entity */
>  	struct ceph_entity_addr addr;

Oh well.  The address is an address.

> +	/* Wire protocol version */
>  	__le32 protocol_version;

The protocol version is one for the wire.  A-ha.

> +	/* Connection flags (lossy, etc.) */
>  	__u8  flags;         /* CEPH_MSG_CONNECT_* */

The old comment looked fine.  I can "git grep CEPH_MSG_CONNECT_" and
see possible values.

The new comment says these flags are for the connection.  Okay.  And
the flags can be lossy, can't they?  No, one of the possibly flags is
just "CEPH_MSG_CONNECT_LOSSY" and Claude confusingly rephrased this to
"lossy".  And "etc.", but what is "etc."?  Nothing, there are no other
flags.  The "etc." is just noise.

What would have been valuable pointing out is that this is a bit mask
(but this can be guessed easily).

Just leave the old comment, it's fine and enough.

>  struct ceph_msg_connect_reply {
> +	/* Reply tag (ready, retry, error, etc.) */
>  	__u8 tag;

How does "ready", "retry" etc. fit into a __u8?  Claude unhelpfully
omitted technical details by rephrasing the macro names.


(That's all I'm going to comment on now.  I could go on for hours, but
I feel this is a waste of time.)


  reply	other threads:[~2025-09-05 22:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05 20:00 [RFC PATCH 00/20] add comments in include/linux/ceph/*.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 01/20] ceph: add comments to metadata structures in auth.h Viacheslav Dubeyko
2025-09-05 21:50   ` Max Kellermann
2025-09-05 20:00 ` [RFC PATCH 02/20] ceph: add comments to metadata structures in buffer.h Viacheslav Dubeyko
2025-09-05 21:43   ` Max Kellermann
2025-09-05 20:00 ` [RFC PATCH 03/20] ceph: add comments in ceph_debug.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 04/20] ceph: add comments to declarations in ceph_features.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 05/20] ceph: rework comments in ceph_frag.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 06/20] ceph: add comments to metadata structures in ceph_fs.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 07/20] ceph: add comments in ceph_hash.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 08/20] ceph: add comments to metadata structures in cls_lock_client.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 09/20] ceph: add comments to metadata structures in libceph.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 10/20] ceph: add comments to metadata structures in messenger.h Viacheslav Dubeyko
2025-09-05 20:00 ` [RFC PATCH 11/20] ceph: add comments to metadata structures in mon_client.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 12/20] ceph: add comments to metadata structures in msgpool.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 13/20] ceph: add comments to metadata structures in msgr.h Viacheslav Dubeyko
2025-09-05 22:18   ` Max Kellermann [this message]
2025-09-05 20:01 ` [RFC PATCH 14/20] ceph: add comments to metadata structures in osd_client.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 15/20] ceph: add comments to metadata structures in osdmap.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 16/20] ceph: add comments to metadata structures in pagelist.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 17/20] ceph: add comments to metadata structures in rados.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 18/20] ceph: add comments to metadata structures in string_table.h Viacheslav Dubeyko
2025-09-05 22:00   ` Max Kellermann
2025-09-05 20:01 ` [RFC PATCH 19/20] ceph: add comments to metadata structures in striper.h Viacheslav Dubeyko
2025-09-05 20:01 ` [RFC PATCH 20/20] ceph: add comments to metadata structures in types.h Viacheslav Dubeyko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aLthzKYmppZzgfU0@swift.blarg.de \
    --to=max@blarg.de \
    --cc=Slava.Dubeyko@ibm.com \
    --cc=amarkuze@redhat.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=pdonnell@redhat.com \
    --cc=slava@dubeyko.com \
    --cc=vdubeyko@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).