From: Chao Yu <chao2.yu@samsung.com>
To: ??? <jaegeuk.kim@samsung.com>
Cc: linux-f2fs-devel@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [f2fs-dev] [PATCH] f2fs: fix wrong number of max_nid when init
Date: Thu, 17 Apr 2014 14:27:55 +0800 [thread overview]
Message-ID: <000c01cf5a06$46b1ba30$d4152e90$@samsung.com> (raw)
Since max_nid value was minus three in previous commit:
'b63da15e8b475245026bdf2096853683f189706b', Our last three nids could not be
used ever, but 0/node nid/meta nid is still occupied.
And also our ra_meta_pages() could not readahead the last block of NAT.
Let's fix the wrong calculation of this value, and left the reserved nids there.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
---
fs/f2fs/node.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 84f9b7b..3f0bb50 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1860,7 +1860,7 @@ static int init_node_manager(struct f2fs_sb_info *sbi)
nat_blocks = nat_segs << le32_to_cpu(sb_raw->log_blocks_per_seg);
/* not used nids: 0, node, meta, (and root counted as valid node) */
- nm_i->max_nid = NAT_ENTRY_PER_BLOCK * nat_blocks - 3;
+ nm_i->max_nid = NAT_ENTRY_PER_BLOCK * nat_blocks;
nm_i->fcnt = 0;
nm_i->nat_cnt = 0;
nm_i->ram_thresh = DEF_RAM_THRESHOLD;
--
1.7.9.5
next reply other threads:[~2014-04-17 6:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-17 6:27 Chao Yu [this message]
2014-04-17 7:16 ` [PATCH] f2fs: fix wrong number of max_nid when init Jaegeuk Kim
2014-04-17 8:01 ` 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='000c01cf5a06$46b1ba30$d4152e90$@samsung.com' \
--to=chao2.yu@samsung.com \
--cc=jaegeuk.kim@samsung.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).