linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [PATCH] fsck.f2fs: calculate orphan_blkaddr correctly
@ 2016-03-16 10:03 Junling Zheng
  0 siblings, 0 replies; only message in thread
From: Junling Zheng @ 2016-03-16 10:03 UTC (permalink / raw)
  To: linux-f2fs-devel, jaegeuk

Commit 4ea4f1db ("fsck.f2fs: large volume support") added the support
for large volume over about 3TB. The "cp_payload" is added to start_blk,
but not removed from orphan_blkaddr.

Fixes: 4ea4f1db ("fsck.f2fs: large volume support")
Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
---
 fsck/fsck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fsck/fsck.c b/fsck/fsck.c
index 6f47c5d..624adae 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -1426,7 +1426,7 @@ void fsck_chk_orphan_node(struct f2fs_sb_info *sbi)
 		return;
 
 	start_blk = __start_cp_addr(sbi) + 1 + get_sb(cp_payload);
-	orphan_blkaddr = __start_sum_addr(sbi) - 1;
+	orphan_blkaddr = __start_sum_addr(sbi) - 1 - get_sb(cp_payload);
 
 	orphan_blk = calloc(BLOCK_SZ, 1);
 	ASSERT(orphan_blk);
-- 
1.9.1


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-16 10:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16 10:03 [PATCH] fsck.f2fs: calculate orphan_blkaddr correctly Junling Zheng

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).