* [PATCH -next] fs: Add kernel-doc comments to ufs_getfrag_block()
@ 2024-03-22 6:55 Yang Li
0 siblings, 0 replies; only message in thread
From: Yang Li @ 2024-03-22 6:55 UTC (permalink / raw)
To: dushistov; +Cc: linux-kernel, Yang Li
This commit adds kernel-doc style comments with complete parameter
descriptions for the function ufs_getfrag_block.
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
---
fs/ufs/inode.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index a7bb2e63cdde..4a36feff043f 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -392,6 +392,20 @@ ufs_inode_getblock(struct inode *inode, u64 ind_block,
/**
* ufs_getfrag_block() - `get_block_t' function, interface between UFS and
* read_folio, writepages and so on
+ * @inode: Inode of the file for which the block is being fetched.
+ * @fragment: Logical block number within the file.
+ * @bh_result: The buffer_head to fill in with the block's information.
+ * @create: Flag indicating if the block should be allocated if it doesn't exist.
+ *
+ * This function is responsible for translating a file's logical block number
+ * into its physical block number on disk. If necessary, it can also allocate
+ * blocks to the file, when the 'create' argument is non-zero. It fills the
+ * buffer_head @bh_result with the mapping information.
+ *
+ * Return: 0 on success or if the block is already allocated and @create is zero.
+ * In case of an error, a negative error code is returned. If a new block is
+ * allocated and @create is non-zero, the function also sets the buffer_new
+ * flag on @bh_result.
*/
static int ufs_getfrag_block(struct inode *inode, sector_t fragment, struct buffer_head *bh_result, int create)
--
2.20.1.7.g153144c
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-03-22 6:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-22 6:55 [PATCH -next] fs: Add kernel-doc comments to ufs_getfrag_block() Yang Li
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®