[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <000101cf5a1e$5c051770$140f4650$@samsung.com>
Date: Thu, 17 Apr 2014 17:20:18 +0800
From: Chao Yu <chao2.yu@...sung.com>
To: ??? <jaegeuk.kim@...sung.com>
Cc: linux-f2fs-devel@...ts.sourceforge.net,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [f2fs-dev] [PATCH] f2fs: fix to enable readahead last NAT block
We skip reading last one of NAT blocks when readahead them since max value of
valid block is calculated incorrectly. We should fix this problem to avoid it.
Signed-off-by: Chao Yu <chao2.yu@...sung.com>
---
fs/f2fs/checkpoint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 744c68b..75189b1 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -77,7 +77,7 @@ inline int get_max_meta_blks(struct f2fs_sb_info *sbi, int type)
{
switch (type) {
case META_NAT:
- return NM_I(sbi)->max_nid / NAT_ENTRY_PER_BLOCK;
+ return (NM_I(sbi)->max_nid + 3) / NAT_ENTRY_PER_BLOCK;
case META_SIT:
return SIT_BLK_CNT(sbi);
case META_SSA:
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists