* [PATCH -next 2/3 v2] fs: Add kernel-doc comments to nilfs_btree_convert_and_insert()
@ 2024-03-25 2:46 Yang Li
2024-03-25 8:19 ` Ryusuke Konishi
0 siblings, 1 reply; 2+ messages in thread
From: Yang Li @ 2024-03-25 2:46 UTC (permalink / raw)
To: konishi.ryusuke; +Cc: linux-nilfs, linux-kernel, Yang Li
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. It converts configurations from other forms of block
+ * mapping (the one that currently exists is direct mapping) to a B-tree.
+ *
+ * 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH -next 2/3 v2] fs: Add kernel-doc comments to nilfs_btree_convert_and_insert()
2024-03-25 2:46 [PATCH -next 2/3 v2] fs: Add kernel-doc comments to nilfs_btree_convert_and_insert() Yang Li
@ 2024-03-25 8:19 ` Ryusuke Konishi
0 siblings, 0 replies; 2+ messages in thread
From: Ryusuke Konishi @ 2024-03-25 8:19 UTC (permalink / raw)
To: Yang Li; +Cc: linux-nilfs, linux-kernel
On Mon, Mar 25, 2024 at 11:46 AM Yang Li wrote:
>
> 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. It converts configurations from other forms of block
> + * mapping (the one that currently exists is direct mapping) to a B-tree.
> + *
> + * 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
>
Thank you for the revised version. I'll take this one.
Ryusuke Konishi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-25 8:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 2:46 [PATCH -next 2/3 v2] fs: Add kernel-doc comments to nilfs_btree_convert_and_insert() Yang Li
2024-03-25 8:19 ` Ryusuke Konishi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®