[RFC PATCH 02/20] ceph: add comments to metadata structures in buffer.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_buffer in
include/linux/ceph/buffer.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/buffer.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/linux/ceph/buffer.h b/include/linux/ceph/buffer.h
index 11cdc7c60480..e04f216d2347 100644
--- a/include/linux/ceph/buffer.h
+++ b/include/linux/ceph/buffer.h
@@ -9,13 +9,16 @@
 #include <linux/uio.h>
 
 /*
- * a simple reference counted buffer.
- *
- * use kmalloc for smaller sizes, vmalloc for larger sizes.
+ * Reference counted buffer metadata: Simple buffer management with automatic
+ * memory allocation strategy. Uses kmalloc for smaller buffers and vmalloc
+ * for larger buffers to optimize memory usage and fragmentation.
  */
 struct ceph_buffer {
+	/* Reference counting for safe shared access */
 	struct kref kref;
+	/* Kernel vector containing buffer pointer and length */
 	struct kvec vec;
+	/* Total allocated buffer size (may be larger than vec.iov_len) */
 	size_t alloc_len;
 };
 
-- 
2.51.0





[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux