summaryrefslogtreecommitdiff
path: root/fs/zonefs/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/zonefs/sysfs.c')
-rw-r--r--fs/zonefs/sysfs.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/zonefs/sysfs.c b/fs/zonefs/sysfs.c
index eaeaf983ed87..9cb6755ce39a 100644
--- a/fs/zonefs/sysfs.c
+++ b/fs/zonefs/sysfs.c
@@ -51,9 +51,23 @@ static ssize_t nr_wro_seq_files_show(struct zonefs_sb_info *sbi, char *buf)
}
ZONEFS_SYSFS_ATTR_RO(nr_wro_seq_files);
+static ssize_t max_active_seq_files_show(struct zonefs_sb_info *sbi, char *buf)
+{
+ return sysfs_emit(buf, "%u\n", sbi->s_max_active_seq_files);
+}
+ZONEFS_SYSFS_ATTR_RO(max_active_seq_files);
+
+static ssize_t nr_active_seq_files_show(struct zonefs_sb_info *sbi, char *buf)
+{
+ return sysfs_emit(buf, "%d\n", atomic_read(&sbi->s_active_seq_files));
+}
+ZONEFS_SYSFS_ATTR_RO(nr_active_seq_files);
+
static struct attribute *zonefs_sysfs_attrs[] = {
ATTR_LIST(max_wro_seq_files),
ATTR_LIST(nr_wro_seq_files),
+ ATTR_LIST(max_active_seq_files),
+ ATTR_LIST(nr_active_seq_files),
NULL,
};
ATTRIBUTE_GROUPS(zonefs_sysfs);