From: Daniel Rosenberg via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>,
kernel-team@android.com, Daniel Rosenberg <drosen@google.com>
Subject: [f2fs-dev] [PATCH] dump.f2fs: Fix dumping inlined files
Date: Mon, 17 Jun 2024 17:41:36 -0700 [thread overview]
Message-ID: <20240618004136.1336922-1-drosen@google.com> (raw)
The code for dumping files was ignoring i_extra_isize, leading to
invalid data for some inlined files after dumping. This swaps inode
dumping to use the common inline_data_addr function.
Signed-off-by: Daniel Rosenberg <drosen@google.com>
---
fsck/dump.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fsck/dump.c b/fsck/dump.c
index 90e3e0e..8d5613e 100644
--- a/fsck/dump.c
+++ b/fsck/dump.c
@@ -479,7 +479,7 @@ static int dump_inode_blk(struct f2fs_sb_info *sbi, u32 nid,
if ((node_blk->i.i_inline & F2FS_INLINE_DATA)) {
DBG(3, "ino[0x%x] has inline data!\n", nid);
/* recover from inline data */
- dev_write_dump(((unsigned char *)node_blk) + INLINE_DATA_OFFSET,
+ dev_write_dump(inline_data_addr(node_blk),
0, MAX_INLINE_DATA(node_blk));
ret = -1;
goto dump_xattr;
base-commit: c1a97862b05d8a736ad8719939395c61bd71c982
--
2.45.2.627.g7a2c4fd464-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:[~2024-06-18 0:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 0:41 Daniel Rosenberg via Linux-f2fs-devel [this message]
2024-06-18 3:01 ` [f2fs-dev] [PATCH] dump.f2fs: Fix dumping inlined files 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=20240618004136.1336922-1-drosen@google.com \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=drosen@google.com \
--cc=jaegeuk@kernel.org \
--cc=kernel-team@android.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).