From: Chao Yu <yuchao0@huawei.com>
To: <jaegeuk@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH 3/4] fsck.f2fs: fix to show removed x_nid correctly
Date: Mon, 12 Aug 2019 19:45:26 +0800 [thread overview]
Message-ID: <20190812114527.34613-3-yuchao0@huawei.com> (raw)
In-Reply-To: <20190812114527.34613-1-yuchao0@huawei.com>
Otherwise, we just show fixed zero x_nid value.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fsck/fsck.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 91ddd49..1ea8590 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -659,6 +659,7 @@ void fsck_chk_inode_blk(struct f2fs_sb_info *sbi, u32 nid,
u32 i_links = le32_to_cpu(node_blk->i.i_links);
u64 i_size = le64_to_cpu(node_blk->i.i_size);
u64 i_blocks = le64_to_cpu(node_blk->i.i_blocks);
+ nid_t i_xattr_nid = le32_to_cpu(node_blk->i.i_xattr_nid);
int ofs;
char *en;
u32 namelen;
@@ -709,15 +710,14 @@ void fsck_chk_inode_blk(struct f2fs_sb_info *sbi, u32 nid,
}
/* readahead xattr node block */
- fsck_reada_node_block(sbi, le32_to_cpu(node_blk->i.i_xattr_nid));
+ fsck_reada_node_block(sbi, i_xattr_nid);
- if (fsck_chk_xattr_blk(sbi, nid,
- le32_to_cpu(node_blk->i.i_xattr_nid), blk_cnt)) {
+ if (fsck_chk_xattr_blk(sbi, nid, i_xattr_nid, blk_cnt)) {
if (c.fix_on) {
node_blk->i.i_xattr_nid = 0;
need_fix = 1;
FIX_MSG("Remove xattr block: 0x%x, x_nid = 0x%x",
- nid, le32_to_cpu(node_blk->i.i_xattr_nid));
+ nid, i_xattr_nid);
}
}
--
2.18.0.rc1
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2019-08-12 11:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 11:45 [f2fs-dev] [PATCH 1/4] fsck.f2fs: fix to recover out-of-border inline size Chao Yu
2019-08-12 11:45 ` [f2fs-dev] [PATCH 2/4] fsck.f2fs: fix to check c.fix_on before repair Chao Yu
2019-08-16 1:06 ` Jaegeuk Kim
2019-08-16 1:20 ` Chao Yu
2019-08-20 11:34 ` Chao Yu
2019-08-12 11:45 ` Chao Yu [this message]
2019-08-12 11:45 ` [f2fs-dev] [PATCH 4/4] fsck.f2fs: fix symlink correctly Chao Yu
2019-08-15 22:39 ` [f2fs-dev] [PATCH 1/4] fsck.f2fs: fix to recover out-of-border inline size Jaegeuk Kim
2019-08-16 1:03 ` Jaegeuk Kim
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=20190812114527.34613-3-yuchao0@huawei.com \
--to=yuchao0@huawei.com \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/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).