From: Yang Li <yang.lee@linux.alibaba.com>
To: konishi.ryusuke@gmail.com
Cc: linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Yang Li <yang.lee@linux.alibaba.com>
Subject: [PATCH -next 2/3] fs: Add kernel-doc comments to nilfs_btree_convert_and_insert()
Date: Fri, 22 Mar 2024 15:32:39 +0800 [thread overview]
Message-ID: <20240322073240.91639-2-yang.lee@linux.alibaba.com> (raw)
In-Reply-To: <20240322073240.91639-1-yang.lee@linux.alibaba.com>
This commit adds kernel-doc style comments with complete parameter
descriptions for the function nilfs_btree_convert_and_insert.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
fs/nilfs2/btree.c | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c
index 65659fa0372e..de38012fd87c 100644
--- a/fs/nilfs2/btree.c
+++ b/fs/nilfs2/btree.c
@@ -1857,13 +1857,21 @@ nilfs_btree_commit_convert_and_insert(struct nilfs_bmap *btree,
}
/**
- * nilfs_btree_convert_and_insert -
- * @bmap:
- * @key:
- * @ptr:
- * @keys:
- * @ptrs:
- * @n:
+ * nilfs_btree_convert_and_insert - Convert and insert entries into a B-tree
+ * @btree: NILFS B-tree structure
+ * @key: Key of the new entry to be inserted
+ * @ptr: Pointer (block number) associated with the key to be inserted
+ * @keys: Array of keys to be inserted in addition to @key
+ * @ptrs: Array of pointers associated with @keys
+ * @n: Number of keys and pointers in @keys and @ptrs
+ *
+ * This function is used to insert a new entry specified by @key and @ptr, along
+ * with additional entries specified by @keys and @ptrs arrays, into a NILFS B-tree.
+ * It prepares the necessary changes by allocating the required blocks and any
+ * necessary intermediate nodes. This function handles the conversion of a B-tree
+ * node when it is necessary to split it due to the size constraint.
+ *
+ * Return: 0 on success or a negative error code on failure.
*/
int nilfs_btree_convert_and_insert(struct nilfs_bmap *btree,
__u64 key, __u64 ptr,
--
2.20.1.7.g153144c
next prev parent reply other threads:[~2024-03-22 7:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-22 7:32 [PATCH -next 1/3] fs: Add kernel-doc comments to nilfs_do_roll_forward() Yang Li
2024-03-22 7:32 ` Yang Li [this message]
2024-03-22 9:57 ` [PATCH -next 2/3] fs: Add kernel-doc comments to nilfs_btree_convert_and_insert() Ryusuke Konishi
2024-03-22 7:32 ` [PATCH -next 3/3] fs: Add kernel-doc comments to nilfs_remove_all_gcinodes() Yang Li
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=20240322073240.91639-2-yang.lee@linux.alibaba.com \
--to=yang.lee@linux.alibaba.com \
--cc=konishi.ryusuke@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nilfs@vger.kernel.org \
/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