Currently debugging an issue with copygc not running when it's supposed
to, and this is an obvious first step.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
copygc_heap copygc_heap;
struct bch_pd_controller copygc_pd;
struct write_point copygc_write_point;
copygc_heap copygc_heap;
struct bch_pd_controller copygc_pd;
struct write_point copygc_write_point;
/* STRIPES: */
GENRADIX(struct stripe) stripes[2];
/* STRIPES: */
GENRADIX(struct stripe) stripes[2];
wait = bch2_copygc_wait_amount(c);
if (wait > clock->max_slop) {
wait = bch2_copygc_wait_amount(c);
if (wait > clock->max_slop) {
+ c->copygc_wait = last + wait;
bch2_kthread_io_clock_wait(clock, last + wait,
MAX_SCHEDULE_TIMEOUT);
continue;
}
bch2_kthread_io_clock_wait(clock, last + wait,
MAX_SCHEDULE_TIMEOUT);
continue;
}
if (bch2_copygc(c))
break;
}
if (bch2_copygc(c))
break;
}
rw_attribute(label);
rw_attribute(copy_gc_enabled);
rw_attribute(label);
rw_attribute(copy_gc_enabled);
+read_attribute(copy_gc_wait);
sysfs_pd_controller_attribute(copy_gc);
rw_attribute(rebalance_enabled);
sysfs_pd_controller_attribute(copy_gc);
rw_attribute(rebalance_enabled);
sysfs_printf(rebalance_enabled, "%i", c->rebalance.enabled);
sysfs_pd_controller_show(rebalance, &c->rebalance.pd); /* XXX */
sysfs_pd_controller_show(copy_gc, &c->copygc_pd);
sysfs_printf(rebalance_enabled, "%i", c->rebalance.enabled);
sysfs_pd_controller_show(rebalance, &c->rebalance.pd); /* XXX */
sysfs_pd_controller_show(copy_gc, &c->copygc_pd);
+ sysfs_hprint(copy_gc_wait,
+ max(0LL, c->copygc_wait -
+ atomic64_read(&c->io_clock[WRITE].now)) << 9);
if (attr == &sysfs_rebalance_work) {
bch2_rebalance_work_to_text(&out, c);
if (attr == &sysfs_rebalance_work) {
bch2_rebalance_work_to_text(&out, c);
&sysfs_prune_cache,
&sysfs_copy_gc_enabled,
&sysfs_prune_cache,
&sysfs_copy_gc_enabled,
&sysfs_rebalance_enabled,
&sysfs_rebalance_work,
&sysfs_rebalance_enabled,
&sysfs_rebalance_work,