From: kaixuxia <xiakaixu1987@gmail.com>
To: fstests@vger.kernel.org
Cc: linux-xfs@vger.kernel.org, guaneryu@gmail.com,
bfoster@redhat.com, newtongao@tencent.com,
jasperwang@tencent.com
Subject: [PATCH v3 1/4] fsstress: show the real file id and parid in rename_f()
Date: Thu, 31 Oct 2019 14:41:46 +0800 [thread overview]
Message-ID: <9af5eec16126c179cc3520da262afabbc743a354.1572503039.git.kaixuxia@tencent.com> (raw)
In-Reply-To: <cover.1572503039.git.kaixuxia@tencent.com>
In-Reply-To: <cover.1572503039.git.kaixuxia@tencent.com>
The source file id and parentid are overwritten by del_from_flist()
call, and should show the actually values.
Signed-off-by: kaixuxia <kaixuxia@tencent.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
---
ltp/fsstress.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/ltp/fsstress.c b/ltp/fsstress.c
index 51976f5..95285f1 100644
--- a/ltp/fsstress.c
+++ b/ltp/fsstress.c
@@ -4227,6 +4227,7 @@ rename_f(int opno, long r)
pathname_t newf;
int oldid;
int parid;
+ int oldparid;
int v;
int v1;
@@ -4265,10 +4266,12 @@ rename_f(int opno, long r)
if (e == 0) {
int xattr_counter = fep->xattr_counter;
- if (flp - flist == FT_DIR) {
- oldid = fep->id;
+ oldid = fep->id;
+ oldparid = fep->parent;
+
+ if (flp - flist == FT_DIR)
fix_parent(oldid, id);
- }
+
del_from_flist(flp - flist, fep - flp->fents);
add_to_flist(flp - flist, id, parid, xattr_counter);
}
@@ -4277,7 +4280,7 @@ rename_f(int opno, long r)
newf.path, e);
if (e == 0) {
printf("%d/%d: rename del entry: id=%d,parent=%d\n",
- procid, opno, fep->id, fep->parent);
+ procid, opno, oldid, oldparid);
printf("%d/%d: rename add entry: id=%d,parent=%d\n",
procid, opno, id, parid);
}
--
1.8.3.1
next prev parent reply other threads:[~2019-10-31 6:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-31 6:41 [PATCH v3 0/4] xfstests: add deadlock between the AGI and AGF with RENAME_WHITEOUT test kaixuxia
2019-10-31 6:41 ` kaixuxia [this message]
2019-10-31 6:41 ` [PATCH v3 2/4] fsstress: add NOREPLACE and WHITEOUT renameat2 support kaixuxia
2019-10-31 6:41 ` [PATCH v3 3/4] fsstress: add EXCHANGE " kaixuxia
2019-11-01 17:24 ` Brian Foster
2019-10-31 6:41 ` [PATCH v3 4/4] xfs: test the deadlock between the AGI and AGF with RENAME_WHITEOUT kaixuxia
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=9af5eec16126c179cc3520da262afabbc743a354.1572503039.git.kaixuxia@tencent.com \
--to=xiakaixu1987@gmail.com \
--cc=bfoster@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=guaneryu@gmail.com \
--cc=jasperwang@tencent.com \
--cc=linux-xfs@vger.kernel.org \
--cc=newtongao@tencent.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;
as well as URLs for NNTP newsgroup(s).