linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Filipe Manana <fdmanana@suse.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	David Sterba <dsterba@suse.com>,
	linux-doc@vger.kernel.org
Subject: fs/btrfs/tree-log.c:6792: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
Date: Thu, 26 May 2022 00:31:02 +0800	[thread overview]
Message-ID: <202205260024.TLEp6Pj2-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   fdaf9a5840acaab18694a19e0eb0aa51162eeeed
commit: d5f5bd546552a94eefd68c42f40f778c40a89d2c btrfs: pass the dentry to btrfs_log_new_name() instead of the inode
date:   2 months ago
config: x86_64-randconfig-a011 (https://download.01.org/0day-ci/archive/20220526/202205260024.TLEp6Pj2-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-1) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5f5bd546552a94eefd68c42f40f778c40a89d2c
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout d5f5bd546552a94eefd68c42f40f778c40a89d2c
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> fs/btrfs/tree-log.c:6792: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
    * Update the log after adding a new name for an inode.


vim +6792 fs/btrfs/tree-log.c

  6790	
  6791	/**
> 6792	 * Update the log after adding a new name for an inode.
  6793	 *
  6794	 * @trans:              Transaction handle.
  6795	 * @old_dentry:         The dentry associated with the old name and the old
  6796	 *                      parent directory.
  6797	 * @old_dir:            The inode of the previous parent directory for the case
  6798	 *                      of a rename. For a link operation, it must be NULL.
  6799	 * @parent:             The dentry associated with the directory under which the
  6800	 *                      new name is located.
  6801	 *
  6802	 * Call this after adding a new name for an inode, as a result of a link or
  6803	 * rename operation, and it will properly update the log to reflect the new name.
  6804	 */
  6805	void btrfs_log_new_name(struct btrfs_trans_handle *trans,
  6806				struct dentry *old_dentry, struct btrfs_inode *old_dir,
  6807				struct dentry *parent)
  6808	{
  6809		struct btrfs_inode *inode = BTRFS_I(d_inode(old_dentry));
  6810		struct btrfs_log_ctx ctx;
  6811	
  6812		/*
  6813		 * this will force the logging code to walk the dentry chain
  6814		 * up for the file
  6815		 */
  6816		if (!S_ISDIR(inode->vfs_inode.i_mode))
  6817			inode->last_unlink_trans = trans->transid;
  6818	
  6819		/*
  6820		 * if this inode hasn't been logged and directory we're renaming it
  6821		 * from hasn't been logged, we don't need to log it
  6822		 */
  6823		if (!inode_logged(trans, inode) &&
  6824		    (!old_dir || !inode_logged(trans, old_dir)))
  6825			return;
  6826	
  6827		/*
  6828		 * If we are doing a rename (old_dir is not NULL) from a directory that
  6829		 * was previously logged, make sure the next log attempt on the directory
  6830		 * is not skipped and logs the inode again. This is because the log may
  6831		 * not currently be authoritative for a range including the old
  6832		 * BTRFS_DIR_INDEX_KEY key, so we want to make sure after a log replay we
  6833		 * do not end up with both the new and old dentries around (in case the
  6834		 * inode is a directory we would have a directory with two hard links and
  6835		 * 2 inode references for different parents). The next log attempt of
  6836		 * old_dir will happen at btrfs_log_all_parents(), called through
  6837		 * btrfs_log_inode_parent() below, because we have previously set
  6838		 * inode->last_unlink_trans to the current transaction ID, either here or
  6839		 * at btrfs_record_unlink_dir() in case the inode is a directory.
  6840		 */
  6841		if (old_dir)
  6842			old_dir->logged_trans = 0;
  6843	
  6844		btrfs_init_log_ctx(&ctx, &inode->vfs_inode);
  6845		ctx.logging_new_name = true;
  6846		/*
  6847		 * We don't care about the return value. If we fail to log the new name
  6848		 * then we know the next attempt to sync the log will fallback to a full
  6849		 * transaction commit (due to a call to btrfs_set_log_full_commit()), so
  6850		 * we don't need to worry about getting a log committed that has an
  6851		 * inconsistent state after a rename operation.
  6852		 */
  6853		btrfs_log_inode_parent(trans, inode, parent, LOG_INODE_EXISTS, &ctx);
  6854	}
  6855	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-05-25 16:32 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=202205260024.TLEp6Pj2-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dsterba@suse.com \
    --cc=fdmanana@suse.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-doc@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).