diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2013-05-23 09:57:53 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-05-28 02:03:05 -0400 |
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, | |||
610 | else | 610 | else |
611 | new_curseg(sbi, type, false); | 611 | new_curseg(sbi, type, false); |
612 | out: | 612 | out: |
613 | #ifdef CONFIG_F2FS_STAT_FS | ||
613 | sbi->segment_count[curseg->alloc_type]++; | 614 | sbi->segment_count[curseg->alloc_type]++; |
615 | #endif | ||
616 | return; | ||
614 | } | 617 | } |
615 | 618 | ||
616 | void allocate_new_segments(struct f2fs_sb_info *sbi) | 619 | 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, | |||
846 | 849 | ||
847 | mutex_lock(&sit_i->sentry_lock); | 850 | mutex_lock(&sit_i->sentry_lock); |
848 | __refresh_next_blkoff(sbi, curseg); | 851 | __refresh_next_blkoff(sbi, curseg); |
852 | #ifdef CONFIG_F2FS_STAT_FS | ||
849 | sbi->block_count[curseg->alloc_type]++; | 853 | sbi->block_count[curseg->alloc_type]++; |
854 | #endif | ||
850 | 855 | ||
851 | /* | 856 | /* |
852 | * SIT information should be updated before segment allocation, | 857 | * SIT information should be updated before segment allocation, |