From b24ac54a68328b615919d654649ceb875ae1ae9d Mon Sep 17 00:00:00 2001 From: Arshad Hussain Date: Thu, 27 Feb 2025 20:30:54 +0530 Subject: [PATCH] LU-9633 llite: Add kernel doc style for lustre/llite/*.c (Part 6) This patch converts existing functional comments to kernel doc style comments and removes '/**' for comments which is not meant to be a kernel-doc comment Tested: ./kernel-doc -v -none lustre/llite/llite_mmap.c lustre/llite/llite_nfs.c lustre/llite/llite_mmap.c:72: info: Scanning doc for function ll_fault_io_init lustre/llite/llite_mmap.c:266: info: Scanning doc for function ll_fault0 lustre/llite/llite_mmap.c:536: info: Scanning doc for function ll_vm_open lustre/llite/llite_mmap.c:560: info: Scanning doc for function ll_vm_close lustre/llite/llite_nfs.c:234: info: Scanning doc for function ll_encode_fh Test-Parameters: trivial Signed-off-by: Arshad Hussain Change-Id: I31cc93b570db31550aa3bdc919dbd8ce82ce47a4 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58278 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Petros Koutoupis Reviewed-by: Anjus George Reviewed-by: Oleg Drokin --- lustre/llite/llite_mmap.c | 39 ++++++++++++++++++++++----------------- lustre/llite/llite_nfs.c | 14 +++++++++----- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/lustre/llite/llite_mmap.c b/lustre/llite/llite_mmap.c index 5287bce..674aa55 100644 --- a/lustre/llite/llite_mmap.c +++ b/lustre/llite/llite_mmap.c @@ -69,13 +69,14 @@ struct vm_area_struct *our_vma(struct mm_struct *mm, unsigned long addr, } /** - * API independent part for page fault initialization. - * \param env - corespondent lu_env to processing - * \param vma - virtual memory area addressed to page fault - * \param index - page index corespondent to fault. - * \param mkwrite - whether it is mmap write. + * ll_fault_io_init() - API independent part for page fault initialization. + * @env: corespondent lu_env to processing + * @vma: virtual memory area addressed to page fault + * @index: page index corespondent to fault. + * @mkwrite: whether it is mmap write. * - * \return error codes from cl_io_init. + * Return: + * * pointer to a struct cl_io on success error otherwise */ static struct cl_io * ll_fault_io_init(struct lu_env *env, struct vm_area_struct *vma, @@ -262,15 +263,15 @@ int ll_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf) } /** - * Lustre implementation of a vm_operations_struct::fault() method, called by - * VM to server page fault (both in kernel and user space). + * ll_fault0() - Lustre implementation of a vm_operations_struct::fault() + * method, called by VM to server page fault (both in kernel and user space). + * @vma: is virtiual area struct related to page fault + * @vmf: structure which describe type and address where hit fault * - * \param vma - is virtiual area struct related to page fault - * \param vmf - structure which describe type and address where hit fault - * - * \return allocated and filled _locked_ page for address - * \retval VM_FAULT_ERROR on general error - * \retval NOPAGE_OOM not have memory for allocate new page + * Return: + * * allocated and filled _locked_ page for address + * * VM_FAULT_ERROR on general error + * * NOPAGE_OOM not have memory for allocate new page */ static vm_fault_t ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) { @@ -532,8 +533,11 @@ static vm_fault_t ll_page_mkwrite(struct vm_area_struct *vma, } /** - * To avoid cancel the locks covering mmapped region for lock cache pressure, - * we track the mapped vma count in vvp_object::vob_mmap_cnt. + * ll_vm_open() - Called when VMA is being opened + * @vma: virtual memory area (VMA) structure that is being opened + * + * To avoid cancel the locks covering mmapped region for lock cache pressure, + * we track the mapped vma count in vvp_object::vob_mmap_cnt. */ static void ll_vm_open(struct vm_area_struct *vma) { @@ -553,7 +557,8 @@ static void ll_vm_open(struct vm_area_struct *vma) } /** - * Dual to ll_vm_open(). + * ll_vm_close() - Called when VMA is being closed(Dual to ll_vm_open()) + * @vma: virtual memory area (VMA) structure that is being closed */ static void ll_vm_close(struct vm_area_struct *vma) { diff --git a/lustre/llite/llite_nfs.c b/lustre/llite/llite_nfs.c index 3c270b8..55106bf 100644 --- a/lustre/llite/llite_nfs.c +++ b/lustre/llite/llite_nfs.c @@ -230,13 +230,17 @@ free_dot: #endif /** - * \a connectable - is nfsd will connect himself or this should be done - * at lustre + * ll_encode_fh() - Encode file handle (NFS) + * @inode: inode of file which is being encoded + * @fh: file handle buffer + * @plen: length of file handle (fh) buffer + * @parent: inode of parent directory * + * Return: * The return value is file handle type: - * 1 -- contains child file handle; - * 2 -- contains child file handle and parent file handle; - * 255 -- error. + * * %1 -- contains child file handle; + * * %2 -- contains child file handle and parent file handle; + * * %255 -- error. */ static int ll_encode_fh(struct inode *inode, u32 *fh, int *plen, struct inode *parent) -- 1.8.3.1