summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.h
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2014-02-20 23:17:22 -0500
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2014-02-24 02:00:40 -0500
commitfffc2a00fc01b781c1e3b9541e3e0f270c50ce90 (patch)
treeef9baeee5d33b51acda782320c7b47299345fec3 /fs/f2fs/node.h
parent6437d1b0adb46f29aafcbf10950a89211028ca09 (diff)
f2fs: fix to mark the checkpointed nat entry correctly
The nat cache entry maintains a status whether it is checkpointed or not. So, if a new cache entry is loaded from the last checkpoint, nat_entry->checkpointed should be true. If the cache entry is modified as being dirty, nat_entry->checkpoint should be false. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/node.h')
-rw-r--r--fs/f2fs/node.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index c4c79885c993..4dea719766ef 100644
--- a/fs/f2fs/node.h
+++ b/fs/f2fs/node.h
@@ -58,9 +58,15 @@ struct nat_entry {
58#define nat_set_version(nat, v) (nat->ni.version = v) 58#define nat_set_version(nat, v) (nat->ni.version = v)
59 59
60#define __set_nat_cache_dirty(nm_i, ne) \ 60#define __set_nat_cache_dirty(nm_i, ne) \
61 list_move_tail(&ne->list, &nm_i->dirty_nat_entries); 61 do { \
62 ne->checkpointed = false; \
63 list_move_tail(&ne->list, &nm_i->dirty_nat_entries); \
64 } while (0);
62#define __clear_nat_cache_dirty(nm_i, ne) \ 65#define __clear_nat_cache_dirty(nm_i, ne) \
63 list_move_tail(&ne->list, &nm_i->nat_entries); 66 do { \
67 ne->checkpointed = true; \
68 list_move_tail(&ne->list, &nm_i->nat_entries); \
69 } while (0);
64#define inc_node_version(version) (++version) 70#define inc_node_version(version) (++version)
65 71
66static inline void node_info_from_raw_nat(struct node_info *ni, 72static inline void node_info_from_raw_nat(struct node_info *ni,