aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2015-01-28 04:48:42 -0500
committerJaegeuk Kim <jaegeuk@kernel.org>2015-02-11 20:04:38 -0500
commitcaf0047e7e1e60a7ad1d655d3b81b32e2dfb6095 (patch)
tree0d4725d944d54b437ac3fd7218794773197b1c2a /include/trace/events
parent88dd8934194f6d1db7f824c03d1eee169cb891b0 (diff)
f2fs: merge flags in struct f2fs_sb_info
Currently, there are several variables with Boolean type as below: struct f2fs_sb_info { ... int s_dirty; bool need_fsck; bool s_closing; ... bool por_doing; ... } For this there are some issues: 1. there are some space of f2fs_sb_info is wasted due to aligning after Boolean type variables by compiler. 2. if we continuously add new flag into f2fs_sb_info, structure will be messed up. So in this patch, we try to: 1. switch s_dirty to Boolean type variable since it has two status 0/1. 2. merge s_dirty/need_fsck/s_closing/por_doing variables into s_flag. 3. introduce an enum type which can indicate different states of sbi. 4. use new introduced universal interfaces is_sbi_flag_set/{set,clear}_sbi_flag to operate flags for sbi. After that, above issues will be fixed. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/trace/events')
-rw-r--r--include/trace/events/f2fs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 13992f3c1445..5e1c0292250c 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -184,13 +184,13 @@ TRACE_EVENT(f2fs_sync_fs,
184 184
185 TP_STRUCT__entry( 185 TP_STRUCT__entry(
186 __field(dev_t, dev) 186 __field(dev_t, dev)
187 __field(int, dirty) 187 __field(bool, dirty)
188 __field(int, wait) 188 __field(int, wait)
189 ), 189 ),
190 190
191 TP_fast_assign( 191 TP_fast_assign(
192 __entry->dev = sb->s_dev; 192 __entry->dev = sb->s_dev;
193 __entry->dirty = F2FS_SB(sb)->s_dirty; 193 __entry->dirty = is_sbi_flag_set(F2FS_SB(sb), SBI_IS_DIRTY);
194 __entry->wait = wait; 194 __entry->wait = wait;
195 ), 195 ),
196 196