diff options
| author | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-01-29 14:45:33 -0500 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-02-11 20:04:41 -0500 |
| commit | 119ee9144534141822462e3e8a5ccc8dc537f712 (patch) | |
| tree | d1db8598f68e80459d40343d70883a62606de7d5 /include | |
| parent | 11504a8e7e20e2ff2e68176850e9b83b8bae760e (diff) | |
f2fs: split UMOUNT and FASTBOOT flags
This patch adds FASTBOOT flag into checkpoint as follows.
- CP_UMOUNT_FLAG is set when system is umounted.
- CP_FASTBOOT_FLAG is set when intermediate checkpoint having node summaries
was done.
So, if you get CP_UMOUNT_FLAG from checkpoint, the system was umounted cleanly.
Instead, if there was sudden-power-off, you can get CP_FASTBOOT_FLAG or nothing.
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/f2fs_fs.h | 1 | ||||
| -rw-r--r-- | include/trace/events/f2fs.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/f2fs_fs.h b/include/linux/f2fs_fs.h index e993b0bc9abf..09805720f4bf 100644 --- a/include/linux/f2fs_fs.h +++ b/include/linux/f2fs_fs.h | |||
| @@ -87,6 +87,7 @@ struct f2fs_super_block { | |||
| 87 | /* | 87 | /* |
| 88 | * For checkpoint | 88 | * For checkpoint |
| 89 | */ | 89 | */ |
| 90 | #define CP_FASTBOOT_FLAG 0x00000020 | ||
| 90 | #define CP_FSCK_FLAG 0x00000010 | 91 | #define CP_FSCK_FLAG 0x00000010 |
| 91 | #define CP_ERROR_FLAG 0x00000008 | 92 | #define CP_ERROR_FLAG 0x00000008 |
| 92 | #define CP_COMPACT_SUM_FLAG 0x00000004 | 93 | #define CP_COMPACT_SUM_FLAG 0x00000004 |
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index 5e1c0292250c..69629826c2ba 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h | |||
| @@ -72,6 +72,7 @@ | |||
| 72 | #define show_cpreason(type) \ | 72 | #define show_cpreason(type) \ |
| 73 | __print_symbolic(type, \ | 73 | __print_symbolic(type, \ |
| 74 | { CP_UMOUNT, "Umount" }, \ | 74 | { CP_UMOUNT, "Umount" }, \ |
| 75 | { CP_FASTBOOT, "Fastboot" }, \ | ||
| 75 | { CP_SYNC, "Sync" }, \ | 76 | { CP_SYNC, "Sync" }, \ |
| 76 | { CP_DISCARD, "Discard" }) | 77 | { CP_DISCARD, "Discard" }) |
| 77 | 78 | ||
