aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2014-10-27 16:54:27 -0400
committerJaegeuk Kim <jaegeuk@kernel.org>2014-11-03 19:07:38 -0500
commite3fb1b794b5f0c9f9b65707ce4e6be264a9c60f8 (patch)
tree83ee92cb8f8fa3003830a0053e529596758b1274
parent427a45c8e2395e0d24cb7fecc2ebf6e5e84e59fd (diff)
f2fs: do not discard data protected by the previous checkpoint
We should not discard any data protected by the previous checkpoint all the time. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/segment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index d391a5913c79..06dda733f958 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -517,7 +517,7 @@ static void add_discard_addrs(struct f2fs_sb_info *sbi, struct cp_control *cpc)
517 517
518 /* SIT_VBLOCK_MAP_SIZE should be multiple of sizeof(unsigned long) */ 518 /* SIT_VBLOCK_MAP_SIZE should be multiple of sizeof(unsigned long) */
519 for (i = 0; i < entries; i++) 519 for (i = 0; i < entries; i++)
520 dmap[i] = (cur_map[i] ^ ckpt_map[i]) & ckpt_map[i]; 520 dmap[i] = ~(cur_map[i] | ckpt_map[i]);
521 521
522 while (force || SM_I(sbi)->nr_discards <= SM_I(sbi)->max_discards) { 522 while (force || SM_I(sbi)->nr_discards <= SM_I(sbi)->max_discards) {
523 start = __find_rev_next_bit(dmap, max_blocks, end + 1); 523 start = __find_rev_next_bit(dmap, max_blocks, end + 1);