mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
bcachefs: Don't inc io_(read|write) counters for moves
This makes 'bcachefs fs top' more useful; we can now see at a glance whether the IO to the device is being done for user reads/writes, or copygc/rebalance. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
e5a63ad343
commit
55a132c37a
|
|
@ -1091,7 +1091,8 @@ int __bch2_read_extent(struct btree_trans *trans, struct bch_read_bio *orig,
|
|||
if (rbio->bounce)
|
||||
trace_and_count(c, read_bounce, &rbio->bio);
|
||||
|
||||
this_cpu_add(c->counters[BCH_COUNTER_io_read], bio_sectors(&rbio->bio));
|
||||
if (!(flags & BCH_READ_NODECODE))
|
||||
this_cpu_add(c->counters[BCH_COUNTER_io_read], bio_sectors(&rbio->bio));
|
||||
bch2_increment_clock(c, bio_sectors(&rbio->bio), READ);
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -1644,7 +1644,8 @@ CLOSURE_CALLBACK(bch2_write)
|
|||
goto err;
|
||||
}
|
||||
|
||||
this_cpu_add(c->counters[BCH_COUNTER_io_write], bio_sectors(bio));
|
||||
if (!(op->flags & BCH_WRITE_MOVE))
|
||||
this_cpu_add(c->counters[BCH_COUNTER_io_write], bio_sectors(bio));
|
||||
bch2_increment_clock(c, bio_sectors(bio), WRITE);
|
||||
|
||||
data_len = min_t(u64, bio->bi_iter.bi_size,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user