f2fs: separate out iostat feature
[linux-2.6-microblaze.git] / fs / f2fs / iostat.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright 2021 Google LLC
4  * Author: Daeho Jeong <daehojeong@google.com>
5  */
6 #ifndef __F2FS_IOSTAT_H__
7 #define __F2FS_IOSTAT_H__
8
9 #ifdef CONFIG_F2FS_IOSTAT
10
11 #define DEFAULT_IOSTAT_PERIOD_MS        3000
12 #define MIN_IOSTAT_PERIOD_MS            100
13 /* maximum period of iostat tracing is 1 day */
14 #define MAX_IOSTAT_PERIOD_MS            8640000
15
16 extern int __maybe_unused iostat_info_seq_show(struct seq_file *seq,
17                         void *offset);
18 extern void f2fs_reset_iostat(struct f2fs_sb_info *sbi);
19 extern void f2fs_update_iostat(struct f2fs_sb_info *sbi,
20                         enum iostat_type type, unsigned long long io_bytes);
21 extern int f2fs_init_iostat(struct f2fs_sb_info *sbi);
22 #else
23 static inline void f2fs_update_iostat(struct f2fs_sb_info *sbi,
24                 enum iostat_type type, unsigned long long io_bytes) {}
25 static inline int f2fs_init_iostat(struct f2fs_sb_info *sbi) { return 0; }
26 #endif
27 #endif /* __F2FS_IOSTAT_H__ */