* [f2fs-dev] [PATCH] f2fs-tools: fix wrong value of reserve_new_block parameter in page_symlink
@ 2021-07-06 13:10 Wang Xiaojun
2021-07-07 1:17 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Wang Xiaojun @ 2021-07-06 13:10 UTC (permalink / raw)
To: chao, jaegeuk; +Cc: linux-f2fs-devel
In page_symlink, reserve_new_block applies address for data block,
not for inodes. Therefore, is_inode is set to 0.
Signed-off-by: Wang Xiaojun <wangxiaojun11@huawei.com>
---
fsck/dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fsck/dir.c b/fsck/dir.c
index aeb876d..f7491a7 100644
--- a/fsck/dir.c
+++ b/fsck/dir.c
@@ -400,7 +400,7 @@ static void page_symlink(struct f2fs_sb_info *sbi, struct f2fs_node *inode,
memcpy(data_blk, symname, symlen);
set_summary(&sum, ino, 0, ni.version);
- ret = reserve_new_block(sbi, &blkaddr, &sum, CURSEG_WARM_DATA, 1);
+ ret = reserve_new_block(sbi, &blkaddr, &sum, CURSEG_WARM_DATA, 0);
ASSERT(!ret);
ret = dev_write_block(data_blk, blkaddr);
--
2.25.4
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs-tools: fix wrong value of reserve_new_block parameter in page_symlink
2021-07-06 13:10 [f2fs-dev] [PATCH] f2fs-tools: fix wrong value of reserve_new_block parameter in page_symlink Wang Xiaojun
@ 2021-07-07 1:17 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2021-07-07 1:17 UTC (permalink / raw)
To: Wang Xiaojun, jaegeuk; +Cc: linux-f2fs-devel
On 2021/7/6 21:10, Wang Xiaojun wrote:
> In page_symlink, reserve_new_block applies address for data block,
> not for inodes. Therefore, is_inode is set to 0.
Good catch!
>
> Signed-off-by: Wang Xiaojun <wangxiaojun11@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-07 1:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-06 13:10 [f2fs-dev] [PATCH] f2fs-tools: fix wrong value of reserve_new_block parameter in page_symlink Wang Xiaojun
2021-07-07 1:17 ` Chao Yu
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).