linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Junling Zheng <zhengjunling@huawei.com>
To: linux-f2fs-devel@lists.sourceforge.net, jaegeuk@kernel.org
Subject: [PATCH] fsck.f2fs: calculate orphan_blkaddr correctly
Date: Wed, 16 Mar 2016 18:03:05 +0800	[thread overview]
Message-ID: <1458122585-2009-1-git-send-email-zhengjunling@huawei.com> (raw)

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

                 reply	other threads:[~2016-03-16 10:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1458122585-2009-1-git-send-email-zhengjunling@huawei.com \
    --to=zhengjunling@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).