mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Li <yang.lee@linux.alibaba.com>
To: dushistov@mail.ru
Cc: linux-kernel@vger.kernel.org, Yang Li <yang.lee@linux.alibaba.com>
Subject: [PATCH -next] fs: Add kernel-doc comments to ufs_getfrag_block()
Date: Fri, 22 Mar 2024 14:55:42 +0800	[thread overview]
Message-ID: <20240322065542.5588-1-yang.lee@linux.alibaba.com> (raw)

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


                 reply	other threads:[~2024-03-22  6:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20240322065542.5588-1-yang.lee@linux.alibaba.com \
    --to=yang.lee@linux.alibaba.com \
    --cc=dushistov@mail.ru \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®