diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-12-19 14:47:35 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2022-12-19 14:47:35 -0500 |
commit | 71111771690f244d13650c73d52ff601ad914d95 (patch) | |
tree | 4877e26805b2c0666930c8ee417396a2c8e5b728 /libbcachefs/sysfs.c | |
parent | 3c0484687d00f3f2818d13c0c6f65123abcf4517 (diff) |
Update bcachefs sources to 7958ebe324 bcachefs: Fix alloc_v4_backpointers()
Diffstat (limited to 'libbcachefs/sysfs.c')
-rw-r--r-- | libbcachefs/sysfs.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/libbcachefs/sysfs.c b/libbcachefs/sysfs.c index bad3eafd..6e49cf98 100644 --- a/libbcachefs/sysfs.c +++ b/libbcachefs/sysfs.c @@ -27,6 +27,7 @@ #include "journal.h" #include "keylist.h" #include "move.h" +#include "nocow_locking.h" #include "opts.h" #include "rebalance.h" #include "replicas.h" @@ -446,22 +447,9 @@ SHOW(bch2_fs) if (attr == &sysfs_data_jobs) data_progress_to_text(out, c); - if (attr == &sysfs_nocow_lock_table) { - int i, count = 1; - long last, curr = 0; - - last = atomic_long_read(&c->nocow_locks.l[0].v); - for (i = 1; i < BUCKET_NOCOW_LOCKS; i++) { - curr = atomic_long_read(&c->nocow_locks.l[i].v); - if (last != curr) { - prt_printf(out, "%li: %d\n", last, count); - count = 1; - last = curr; - } else - count++; - } - prt_printf(out, "%li: %d\n", last, count); -} + if (attr == &sysfs_nocow_lock_table) + bch2_nocow_locks_to_text(out, &c->nocow_locks); + return 0; } |