]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/sysfs.c
Update bcachefs sources to 26409a8f75 bcachefs: Journal updates to dev usage
[bcachefs-tools-debian] / libbcachefs / sysfs.c
index 80964bdf6237432af7fe3f91c000720d607f5950..f934f12bc677c7c6b9c92788bb9193bcc481e179 100644 (file)
@@ -705,7 +705,7 @@ static unsigned bucket_last_io_fn(struct bch_fs *c, struct bch_dev *ca,
 {
        int rw = (private ? 1 : 0);
 
-       return bucket_last_io(c, bucket(ca, b), rw);
+       return atomic64_read(&c->io_clock[rw].now) - bucket(ca, b)->io_time[rw];
 }
 
 static unsigned bucket_sectors_used_fn(struct bch_fs *c, struct bch_dev *ca,
@@ -718,7 +718,7 @@ static unsigned bucket_sectors_used_fn(struct bch_fs *c, struct bch_dev *ca,
 static unsigned bucket_oldest_gen_fn(struct bch_fs *c, struct bch_dev *ca,
                                     size_t b, void *private)
 {
-       return bucket_gc_gen(ca, b);
+       return bucket_gc_gen(bucket(ca, b));
 }
 
 static int unsigned_cmp(const void *_l, const void *_r)