diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-01-08 15:51:50 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-01-11 15:36:27 -0800 |
commit | 6beceb5427aa8731f958d2484e0fd8ff21d604dc (patch) | |
tree | 5130a15bba97035a283d99602d8b538e2ec88023 /fs/f2fs/super.c | |
parent | 9b72a388f5867f4a31113a41d24bbf1026611d7b (diff) | |
download | op-kernel-dev-6beceb5427aa8731f958d2484e0fd8ff21d604dc.zip op-kernel-dev-6beceb5427aa8731f958d2484e0fd8ff21d604dc.tar.gz |
f2fs: introduce time and interval facility
This patch adds time and interval arrays to store some timing variables.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r-- | fs/f2fs/super.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index f5cc790..787047f 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -218,7 +218,7 @@ F2FS_RW_ATTR(NM_INFO, f2fs_nm_info, ram_thresh, ram_thresh); F2FS_RW_ATTR(NM_INFO, f2fs_nm_info, ra_nid_pages, ra_nid_pages); F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, max_victim_search, max_victim_search); F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, dir_level, dir_level); -F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, cp_interval, cp_interval); +F2FS_RW_ATTR(F2FS_SBI, f2fs_sb_info, cp_interval, interval_time[CP_TIME]); #define ATTR_LIST(name) (&f2fs_attr_##name.attr) static struct attribute *f2fs_attrs[] = { @@ -1122,7 +1122,7 @@ static void init_sb_info(struct f2fs_sb_info *sbi) atomic_set(&sbi->nr_pages[i], 0); sbi->dir_level = DEF_DIR_LEVEL; - sbi->cp_interval = DEF_CP_INTERVAL; + sbi->interval_time[CP_TIME] = DEF_CP_INTERVAL; clear_sbi_flag(sbi, SBI_NEED_FSCK); INIT_LIST_HEAD(&sbi->s_list); @@ -1467,8 +1467,7 @@ try_onemore: f2fs_commit_super(sbi, true); } - sbi->cp_expires = round_jiffies_up(jiffies); - + f2fs_update_time(sbi, CP_TIME); return 0; free_kobj: |