block,fs: use REQ_* flags directly
Remove the WRITE_* and READ_SYNC wrappers, and just use the flags directly. Where applicable this also drops usage of the bio_set_op_attrs wrapper. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:

committed by
Jens Axboe

orang tua
a2b809672e
melakukan
70fd76140a
@@ -297,7 +297,7 @@ static void bch_btree_node_read(struct btree *b)
|
||||
bio->bi_iter.bi_size = KEY_SIZE(&b->key) << 9;
|
||||
bio->bi_end_io = btree_node_read_endio;
|
||||
bio->bi_private = &cl;
|
||||
bio_set_op_attrs(bio, REQ_OP_READ, REQ_META|READ_SYNC);
|
||||
bio->bi_opf = REQ_OP_READ | REQ_META;
|
||||
|
||||
bch_bio_map(bio, b->keys.set[0].data);
|
||||
|
||||
@@ -393,7 +393,7 @@ static void do_btree_node_write(struct btree *b)
|
||||
b->bio->bi_end_io = btree_node_write_endio;
|
||||
b->bio->bi_private = cl;
|
||||
b->bio->bi_iter.bi_size = roundup(set_bytes(i), block_bytes(b->c));
|
||||
bio_set_op_attrs(b->bio, REQ_OP_WRITE, REQ_META|WRITE_SYNC|REQ_FUA);
|
||||
b->bio->bi_opf = REQ_OP_WRITE | REQ_META | REQ_FUA;
|
||||
bch_bio_map(b->bio, i);
|
||||
|
||||
/*
|
||||
|
@@ -52,7 +52,7 @@ void bch_btree_verify(struct btree *b)
|
||||
bio->bi_bdev = PTR_CACHE(b->c, &b->key, 0)->bdev;
|
||||
bio->bi_iter.bi_sector = PTR_OFFSET(&b->key, 0);
|
||||
bio->bi_iter.bi_size = KEY_SIZE(&v->key) << 9;
|
||||
bio_set_op_attrs(bio, REQ_OP_READ, REQ_META|READ_SYNC);
|
||||
bio->bi_opf = REQ_OP_READ | REQ_META;
|
||||
bch_bio_map(bio, sorted);
|
||||
|
||||
submit_bio_wait(bio);
|
||||
@@ -113,7 +113,7 @@ void bch_data_verify(struct cached_dev *dc, struct bio *bio)
|
||||
check = bio_clone(bio, GFP_NOIO);
|
||||
if (!check)
|
||||
return;
|
||||
bio_set_op_attrs(check, REQ_OP_READ, READ_SYNC);
|
||||
check->bi_opf = REQ_OP_READ;
|
||||
|
||||
if (bio_alloc_pages(check, GFP_NOIO))
|
||||
goto out_put;
|
||||
|
@@ -923,7 +923,7 @@ static void cached_dev_write(struct cached_dev *dc, struct search *s)
|
||||
flush->bi_bdev = bio->bi_bdev;
|
||||
flush->bi_end_io = request_endio;
|
||||
flush->bi_private = cl;
|
||||
bio_set_op_attrs(flush, REQ_OP_WRITE, WRITE_FLUSH);
|
||||
flush->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
|
||||
|
||||
closure_bio_submit(flush, cl);
|
||||
}
|
||||
|
@@ -381,7 +381,7 @@ static char *uuid_read(struct cache_set *c, struct jset *j, struct closure *cl)
|
||||
return "bad uuid pointer";
|
||||
|
||||
bkey_copy(&c->uuid_bucket, k);
|
||||
uuid_io(c, REQ_OP_READ, READ_SYNC, k, cl);
|
||||
uuid_io(c, REQ_OP_READ, 0, k, cl);
|
||||
|
||||
if (j->version < BCACHE_JSET_VERSION_UUIDv1) {
|
||||
struct uuid_entry_v0 *u0 = (void *) c->uuids;
|
||||
@@ -600,7 +600,7 @@ static void prio_read(struct cache *ca, uint64_t bucket)
|
||||
ca->prio_last_buckets[bucket_nr] = bucket;
|
||||
bucket_nr++;
|
||||
|
||||
prio_io(ca, bucket, REQ_OP_READ, READ_SYNC);
|
||||
prio_io(ca, bucket, REQ_OP_READ, 0);
|
||||
|
||||
if (p->csum != bch_crc64(&p->magic, bucket_bytes(ca) - 8))
|
||||
pr_warn("bad csum reading priorities");
|
||||
|
Reference in New Issue
Block a user