struct data_update write;
/* Must be last since it is variable size */
- struct bio_vec bi_inline_vecs[0];
+ struct bio_vec bi_inline_vecs[];
};
static void move_free(struct moving_io *io)
if (ret == -BCH_ERR_data_update_done)
return 0;
- this_cpu_inc(c->counters[BCH_COUNTER_move_extent_start_fail]);
+ if (bch2_err_matches(ret, EROFS) ||
+ bch2_err_matches(ret, BCH_ERR_transaction_restart))
+ return ret;
+
+ count_event(c, move_extent_start_fail);
+
if (trace_move_extent_start_fail_enabled()) {
struct printbuf buf = PRINTBUF;
if (delay)
move_ctxt_wait_event_timeout(ctxt,
- freezing(current) || kthread_should_stop(),
+ freezing(current) ||
+ kthread_should_stop(),
delay);
if (unlikely(freezing(current))) {
goto err;
while (!(ret = bch2_move_ratelimit(ctxt))) {
+ if (kthread_should_stop())
+ break;
+
bch2_trans_begin(trans);
ret = bch2_get_next_backpointer(trans, bucket, gen,