struct bio *orig = wbio->orig;
struct cache *ca = wbio->ca;
- if (cache_nonfatal_io_err_on(bio->bi_error, ca,
- "data write"))
+ if (bch_dev_nonfatal_io_err_on(bio->bi_error, ca,
+ "data write"))
set_closure_fn(cl, bch_write_io_error, index_update_wq(op));
bch_account_io_completion_time(ca, wbio->submit_time_us,
spin_lock_irqsave(&c->foreground_write_pd_lock, flags);
while ((op = c->write_wait_head)) {
- if (!test_bit(CACHE_SET_RO, &c->flags) &&
- !test_bit(CACHE_SET_STOPPING, &c->flags) &&
+ if (!test_bit(BCH_FS_RO, &c->flags) &&
+ !test_bit(BCH_FS_STOPPING, &c->flags) &&
time_after(op->expires, jiffies)) {
mod_timer(&c->foreground_write_wakeup, op->expires);
break;
}
csum = bch_checksum_bio(c, rbio->crc.csum_type, nonce, src);
- if (cache_nonfatal_io_err_on(bch_crc_cmp(rbio->crc.csum, csum), rbio->ca,
+ if (bch_dev_nonfatal_io_err_on(bch_crc_cmp(rbio->crc.csum, csum), rbio->ca,
"data checksum error, inode %llu offset %llu: expected %0llx%0llx got %0llx%0llx (type %u)",
rbio->inode, (u64) rbio->parent_iter.bi_sector << 9,
rbio->crc.csum.hi, rbio->crc.csum.lo, csum.hi, csum.lo,
}
if (rbio->promote &&
- !test_bit(CACHE_SET_RO, &c->flags) &&
- !test_bit(CACHE_SET_STOPPING, &c->flags)) {
+ !test_bit(BCH_FS_RO, &c->flags) &&
+ !test_bit(BCH_FS_STOPPING, &c->flags)) {
struct cache_promote_op *promote = rbio->promote;
struct closure *cl = &promote->cl;
bch_account_io_completion_time(rbio->ca, rbio->submit_time_us, REQ_OP_READ);
- cache_nonfatal_io_err_on(bio->bi_error, rbio->ca, "data read");
+ bch_dev_nonfatal_io_err_on(bio->bi_error, rbio->ca, "data read");
if (error) {
bch_read_error_maybe_retry(c, rbio, error);
return;
}
- if (rbio->crc.compression_type != BCH_COMPRESSION_NONE) {
+ if (rbio->crc.compression_type != BCH_COMPRESSION_NONE ||
+ bch_csum_type_is_encryption(rbio->crc.csum_type)) {
struct bio_decompress_worker *d;
preempt_disable();