diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2013-05-23 22:57:53 +0900 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-05-28 15:03:05 +0900 |
commit | 35b09d82c3cf3fc0b8b6d923e7fd82ff7926aafc (patch) | |
tree | e92d7f02e6bbd19c194cd6363f1c5b0545e20523 /fs/f2fs/segment.c | |
parent | a9841c4dbbdd8a2fb919ea305ffa95ab5ec80af2 (diff) |
f2fs: push some variables to debug part
Some, counters are needed only for the statistical information
while debugging.
So, those can be controlled using CONFIG_F2FS_STAT_FS,
pushing the usage for few variables under this flag.
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 3a0d027aad7e..be668ffb001c 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -610,7 +610,10 @@ static void allocate_segment_by_default(struct f2fs_sb_info *sbi, else new_curseg(sbi, type, false); out: +#ifdef CONFIG_F2FS_STAT_FS sbi->segment_count[curseg->alloc_type]++; +#endif + return; } void allocate_new_segments(struct f2fs_sb_info *sbi) @@ -846,7 +849,9 @@ static void do_write_page(struct f2fs_sb_info *sbi, struct page *page, mutex_lock(&sit_i->sentry_lock); __refresh_next_blkoff(sbi, curseg); +#ifdef CONFIG_F2FS_STAT_FS sbi->block_count[curseg->alloc_type]++; +#endif /* * SIT information should be updated before segment allocation, |