All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gaoxiang (OS)" <gaoxiang25@huawei.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
	"chao@kernel.org" <chao@kernel.org>,
	"Yuchao (T)" <yuchao0@huawei.com>
Cc: "linux-f2fs-devel@lists.sourceforge.net"
	<linux-f2fs-devel@lists.sourceforge.net>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>
Subject: [f2fs-dev] [PATCH] resize.f2fs: fix max_nat_bitmap_size miscalculatation
Date: Fri, 22 Dec 2017 03:41:54 +0000	[thread overview]
Message-ID: <9047C53C18267742AB12E43B65C7F9F70BCB8B7F@dggemi505-mbs.china.huawei.com> (raw)

This patch fixes max_nat_bitmap_size miscalculatation

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
---
 fsck/resize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fsck/resize.c b/fsck/resize.c
index 6c3eeab..4f3844c 100644
--- a/fsck/resize.c
+++ b/fsck/resize.c
@@ -61,7 +61,7 @@ static int get_new_sb(struct f2fs_super_block *sb)
 	 * When sit is too large, we should expand cp area. It requires more pages for cp.
 	 */
 	if (max_sit_bitmap_size >
-			(CHECKSUM_OFFSET - sizeof(struct f2fs_checkpoint) + 65)) {
+			(CHECKSUM_OFFSET - sizeof(struct f2fs_checkpoint) + 1 - 64)) {
 		max_nat_bitmap_size = CHECKSUM_OFFSET - sizeof(struct f2fs_checkpoint) + 1;
 		set_sb(cp_payload, F2FS_BLK_ALIGN(max_sit_bitmap_size));
 	} else {
-- 
2.1.4

                 reply	other threads:[~2017-12-22  3:42 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=9047C53C18267742AB12E43B65C7F9F70BCB8B7F@dggemi505-mbs.china.huawei.com \
    --to=gaoxiang25@huawei.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=yuchao0@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.