From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [f2fs-dev] [PATCH] fsck.f2fs: drop compression bit if inline_data is set
Date: Tue, 21 Jun 2022 13:05:48 -0700 [thread overview]
Message-ID: <20220621200548.3485092-1-jaegeuk@kernel.org> (raw)
The kernel enforced not to have compression and inline_data bits
together, but old kernel created files with them. Let's disable
compression in that case.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fsck/fsck.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 4b546aeff995..b1b6722566ef 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -712,7 +712,10 @@ void fsck_chk_inode_blk(struct f2fs_sb_info *sbi, u32 nid,
int ret;
u32 cluster_size = 1 << node_blk->i.i_log_cluster_size;
- if (!compr_supported && compressed) {
+ if (!compressed)
+ goto check_next;
+
+ if (!compr_supported || (node_blk->i.i_inline & F2FS_INLINE_DATA)) {
/*
* The 'compression' flag in i_flags affects the traverse of
* the node tree. Thus, it must be fixed unconditionally
@@ -727,6 +730,7 @@ void fsck_chk_inode_blk(struct f2fs_sb_info *sbi, u32 nid,
}
i_flags &= ~F2FS_COMPR_FL;
}
+check_next:
memset(&child, 0, sizeof(child));
child.links = 2;
child.p_ino = nid;
--
2.37.0.rc0.104.g0611611a94-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next reply other threads:[~2022-06-21 20:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 20:05 Jaegeuk Kim [this message]
2022-07-03 2:56 ` [f2fs-dev] [PATCH] fsck.f2fs: drop compression bit if inline_data is set Chao Yu
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=20220621200548.3485092-1-jaegeuk@kernel.org \
--to=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).