summaryrefslogtreecommitdiff
path: root/libbcachefs/sysfs.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-08-23 15:38:12 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2024-08-23 19:34:30 -0400
commitb422b19f636329e1a082bcacd3ac6b485d7a5b3e (patch)
treeee9979640d17b982ed92581557634a6df57b2fc8 /libbcachefs/sysfs.c
parent6f938e0399ce04699682459408b090387c73adb3 (diff)
Update bcachefs sources to 22fa8fc32e6a bcachefs: rcu_pending now works in userspace
Diffstat (limited to 'libbcachefs/sysfs.c')
-rw-r--r--libbcachefs/sysfs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libbcachefs/sysfs.c b/libbcachefs/sysfs.c
index 9f8ca6a5..4a373581 100644
--- a/libbcachefs/sysfs.c
+++ b/libbcachefs/sysfs.c
@@ -233,7 +233,7 @@ write_attribute(perf_test);
#define x(_name) \
static struct attribute sysfs_time_stat_##_name = \
- { .name = #_name, .mode = 0444 };
+ { .name = #_name, .mode = 0644 };
BCH_TIME_STATS()
#undef x
@@ -722,6 +722,13 @@ SHOW(bch2_fs_time_stats)
STORE(bch2_fs_time_stats)
{
+ struct bch_fs *c = container_of(kobj, struct bch_fs, time_stats);
+
+#define x(name) \
+ if (attr == &sysfs_time_stat_##name) \
+ bch2_time_stats_reset(&c->times[BCH_TIME_##name]);
+ BCH_TIME_STATS()
+#undef x
return size;
}
SYSFS_OPS(bch2_fs_time_stats);