[RFC PATCH 16/20] ceph: add comments to metadata structures in pagelist.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Viacheslav Dubeyko <Slava.Dubeyko@xxxxxxx>

We have a lot of declarations and not enough good
comments on it.

Claude AI generated comments for CephFS metadata structure
declarations in include/linux/ceph/*.h. These comments
have been reviewed, checked, and corrected.

This patch adds comments for struct ceph_pagelist
in /include/linux/ceph/pagelist.h.

Signed-off-by: Viacheslav Dubeyko <Slava.Dubeyko@xxxxxxx>
cc: Alex Markuze <amarkuze@xxxxxxxxxx>
cc: Ilya Dryomov <idryomov@xxxxxxxxx>
cc: Ceph Development <ceph-devel@xxxxxxxxxxxxxxx>
---
 include/linux/ceph/pagelist.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/include/linux/ceph/pagelist.h b/include/linux/ceph/pagelist.h
index 879bec0863aa..1954366ea71b 100644
--- a/include/linux/ceph/pagelist.h
+++ b/include/linux/ceph/pagelist.h
@@ -7,13 +7,26 @@
 #include <linux/list.h>
 #include <linux/types.h>
 
+/*
+ * Page list container metadata: Manages a list of memory pages for efficient
+ * data serialization and transmission. Provides append-only interface with
+ * automatic page allocation, reference counting, and optimized tail access
+ * for building large data structures without memory copies.
+ */
 struct ceph_pagelist {
+	/* Linked list of allocated pages containing data */
 	struct list_head head;
+	/* Memory mapping of current tail page for efficient appends */
 	void *mapped_tail;
+	/* Total data length across all pages */
 	size_t length;
+	/* Available space remaining in current tail page */
 	size_t room;
+	/* List of pre-allocated pages available for future use */
 	struct list_head free_list;
+	/* Count of pages in the free list */
 	size_t num_pages_free;
+	/* Reference count for safe sharing and cleanup */
 	refcount_t refcnt;
 };
 
-- 
2.51.0





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux