mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhihao Cheng <chengzhihao1@huawei.com>
To: <richard@nod.at>, <s.hauer@pengutronix.de>, <miquel.raynal@bootlin.com>
Cc: <linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<chengzhihao1@huawei.com>, <yukuai3@huawei.com>
Subject: [PATCH 3/6] ubifs: Add comments and debug info for ubifs_xrename()
Date: Tue, 11 Oct 2022 11:47:29 +0800	[thread overview]
Message-ID: <20221011034732.45605-4-chengzhihao1@huawei.com> (raw)
In-Reply-To: <20221011034732.45605-1-chengzhihao1@huawei.com>

Just like other operations (eg. ubifs_create, do_rename), add comments
and debug information for ubifs_xrename().

Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
---
 fs/ubifs/dir.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c
index eeda471f05ee..53c5442f48b7 100644
--- a/fs/ubifs/dir.c
+++ b/fs/ubifs/dir.c
@@ -1565,6 +1565,15 @@ static int ubifs_xrename(struct inode *old_dir, struct dentry *old_dentry,
 
 	ubifs_assert(c, fst_inode && snd_inode);
 
+	/*
+	 * Budget request settings: changing two direntries, changing the two
+	 * parent directory inodes.
+	 */
+
+	dbg_gen("dent '%pd' ino %lu in dir ino %lu exchange dent '%pd' ino %lu in dir ino %lu",
+		old_dentry, fst_inode->i_ino, old_dir->i_ino,
+		new_dentry, snd_inode->i_ino, new_dir->i_ino);
+
 	err = fscrypt_setup_filename(old_dir, &old_dentry->d_name, 0, &fst_nm);
 	if (err)
 		return err;
-- 
2.31.1


  parent reply	other threads:[~2022-10-11  3:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11  3:47 [PATCH 0/6] ubifs: Fix wrong space calculation while doing budget Zhihao Cheng
2022-10-11  3:47 ` [PATCH 1/6] ubifs: Rectify space budget for ubifs_symlink() if symlink is encrypted Zhihao Cheng
2022-10-11  3:47 ` [PATCH 2/6] ubifs: Rectify space budget for ubifs_xrename() Zhihao Cheng
2022-10-11  3:47 ` Zhihao Cheng [this message]
2022-10-11  3:47 ` [PATCH 4/6] ubifs: Fix wrong dirty space budget for dirty inode Zhihao Cheng
2022-10-11  3:47 ` [PATCH 5/6] ubifs: do_rename: Fix wrong space budget when target inode's nlink > 1 Zhihao Cheng
2022-10-11  3:47 ` [PATCH 6/6] ubifs: Reserve one leb for each journal head while doing budget Zhihao Cheng
2022-11-18  8:53 ` [PATCH 0/6] ubifs: Fix wrong space calculation " Zhihao Cheng
2022-11-18  8:56   ` Richard Weinberger
2022-11-18  8:58     ` Zhihao Cheng

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=20221011034732.45605-4-chengzhihao1@huawei.com \
    --to=chengzhihao1@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=richard@nod.at \
    --cc=s.hauer@pengutronix.de \
    --cc=yukuai3@huawei.com \
    /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®