@@ -1075,6 +1075,7 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
atomic_inc(&pkt->io_wait);
bio->bi_rw = READ;
+ bio->bi_op = REQ_OP_READ;
pkt_queue_bio(pd, bio);
frames_read++;
}
@@ -1337,6 +1338,7 @@ static void pkt_start_write(struct pktcdvd_device *pd, struct packet_data *pkt)
/* Start the write request */
atomic_set(&pkt->io_wait, 1);
pkt->w_bio->bi_rw = WRITE;
+ pkt->w_bio->bi_op = REQ_OP_WRITE;
pkt_queue_bio(pd, pkt->w_bio);
}
@@ -1132,6 +1132,7 @@ static void clone_init(struct dm_crypt_io *io, struct bio *clone)
clone->bi_private = io;
clone->bi_end_io = crypt_endio;
clone->bi_bdev = cc->dev->bdev;
+ clone->bi_op = io->base_bio->bi_op;
clone->bi_rw = io->base_bio->bi_rw;
}
@@ -2329,6 +2329,7 @@ static struct mapped_device *alloc_dev(int minor)
bio_init(&md->flush_bio);
md->flush_bio.bi_bdev = md->bdev;
+ md->flush_bio.bi_op = REQ_OP_WRITE;
md->flush_bio.bi_rw = WRITE_FLUSH;
dm_stats_init(&md->stats);
@@ -729,6 +729,7 @@ static int _osd_req_list_objects(struct osd_request *or,
return PTR_ERR(bio);
}
+ bio->bi_op = REQ_OP_READ;
bio->bi_rw &= ~REQ_WRITE;
or->in.bio = bio;
or->in.total_bytes = bio->bi_iter.bi_size;
@@ -842,6 +843,7 @@ int osd_req_write_kern(struct osd_request *or,
if (IS_ERR(bio))
return PTR_ERR(bio);
+ bio->bi_op = REQ_OP_WRITE;
bio->bi_rw |= REQ_WRITE; /* FIXME: bio_set_dir() */
osd_req_write(or, obj, offset, bio, len);
return 0;
@@ -959,6 +961,7 @@ static int _osd_req_finalize_cdb_cont(struct osd_request *or, const u8 *cap_key)
if (IS_ERR(bio))
return PTR_ERR(bio);
+ bio->bi_op = REQ_OP_WRITE;
bio->bi_rw |= REQ_WRITE;
/* integrity check the continuation before the bio is linked
@@ -1080,6 +1083,7 @@ int osd_req_write_sg_kern(struct osd_request *or,
if (IS_ERR(bio))
return PTR_ERR(bio);
+ bio->bi_op = REQ_OP_WRITE;
bio->bi_rw |= REQ_WRITE;
osd_req_write_sg(or, obj, bio, sglist, numentries);
@@ -921,8 +921,10 @@ pscsi_map_sg(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
if (!bio)
goto fail;
- if (rw)
+ if (rw) {
+ bio->bi_op = REQ_OP_WRITE;
bio->bi_rw |= REQ_WRITE;
+ }
pr_debug("PSCSI: Allocated bio: %p,"
" dir: %s nr_vecs: %d\n", bio,
@@ -5847,6 +5847,7 @@ static noinline void btrfs_schedule_bio(struct btrfs_root *root,
atomic_inc(&root->fs_info->nr_async_bios);
WARN_ON(bio->bi_next);
bio->bi_next = NULL;
+ bio->bi_op = op;
bio->bi_rw |= op | op_flags;
spin_lock(&device->io_lock);
@@ -878,6 +878,7 @@ static int _write_mirror(struct ore_io_state *ios, int cur_comp)
} else {
bio = master_dev->bio;
/* FIXME: bio_set_dir() */
+ bio->bi_op = REQ_OP_WRITE;
bio->bi_rw |= REQ_WRITE;
}