[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 08/34] dm-zoned: use bio_new in get_mblock_slow
- To: linux-xfs@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx, linux-fscrypt@xxxxxxxxxxxxxxx, jfs-discussion@xxxxxxxxxxxxxxxxxxxxx, linux-nilfs@xxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Wed, 27 Jan 2021 23:11:07 -0800
- Cc: axboe@xxxxxxxxx, philipp.reisner@xxxxxxxxxx, lars.ellenberg@xxxxxxxxxx, konrad.wilk@xxxxxxxxxx, roger.pau@xxxxxxxxxx, minchan@xxxxxxxxxx, ngupta@xxxxxxxxxx, sergey.senozhatsky.work@xxxxxxxxx, agk@xxxxxxxxxx, snitzer@xxxxxxxxxx, hch@xxxxxx, sagi@xxxxxxxxxxx, chaitanya.kulkarni@xxxxxxx, martin.petersen@xxxxxxxxxx, viro@xxxxxxxxxxxxxxxxxx, tytso@xxxxxxx, jaegeuk@xxxxxxxxxx, ebiggers@xxxxxxxxxx, djwong@xxxxxxxxxx, shaggy@xxxxxxxxxx, konishi.ryusuke@xxxxxxxxx, mark@xxxxxxxxxx, jlbec@xxxxxxxxxxxx, joseph.qi@xxxxxxxxxxxxxxxxx, damien.lemoal@xxxxxxx, naohiro.aota@xxxxxxx, jth@xxxxxxxxxx, rjw@xxxxxxxxxxxxx, len.brown@xxxxxxxxx, pavel@xxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, hare@xxxxxxx, gustavoars@xxxxxxxxxx, tiwai@xxxxxxx, alex.shi@xxxxxxxxxxxxxxxxx, asml.silence@xxxxxxxxx, ming.lei@xxxxxxxxxx, tj@xxxxxxxxxx, osandov@xxxxxx, bvanassche@xxxxxxx, jefflexu@xxxxxxxxxxxxxxxxx
- Delivery-date: Thu, 28 Jan 2021 07:12:57 +0000
- Ironport-sdr: E1fkX9mALQSpSQRqYGIloGS2cfDW2oPRzPHVlF7jQ7qBQOXa/TDr/IH3wmc6ReYeQENynSr/DV KuvglDqJ2MVpPpj9UNQIh+je/PRWnsuo5rqsq3o3L/GEhxLEarbcYUt7tRCKHmUn/h6vhFeem9 NjVp0pWhNUGvTE0tRSyregZcLO3cMwYt57yD85l4Pqsmh95fxxmB96eqXE4DJhvJZUeEwsMhJQ 65dhOKyqY5H0Swh7RCXOQX0JJOgGUVJ/IPEBQVCoPLpkYNS2PXlWifiT0lwfGI3aPvd+/ej2N9 rLM=
- Ironport-sdr: JfaHSbgsTX4tBshRNu85zNjDX4JfSgpAalYsa9ganL72RXI+lwj1CvALk7jNkTKHODDRhaPULM 2QCxQBHaDQLKLzzTTJx6sZDUI4QL2z7sj7oWlFeKpkDsPjNz6ohW6OPAT+Fj31fP0Wco69Q5Wb 9KQAR7f3aFnCh6IFqA/U90eJ4ctmO1CHn2o9RL+SRg+TzT0pUU076X0anJZOd6l64DJj/v5S2x FcDy3SpjPUZr3Me2WQqUpbt8A2reaS4klVrZtLnI9YgzishgdQzwaHzWX3zoeLKZHP4K7W5aZI /mFTgzYM+x5E5leio1xLhyRQ
- Ironport-sdr: PY5y9iQTPaVno0Uv+vDzXalBIBo52CYeNhdpn1c7TxoOle28qWYUG06GBXepBaS7SSBSs9yjco 7juMCiLNAFC5Fl7+86T3v8dT5wViZ/r3nWsFgtnjfanPUZXEs47a6Ez/SVmFCas+uBcEU4K0rz 829GMnmof7Vria8o+CPxuoND3CfaQPgb+QYuf0lvO7BAPoDvQAY10VoO7lep1Qta/l6nA5+vbg ht+uppfjRckOmE5ekZUsc4vMGzhgqqwVxG/dC7eG99G+et4hw+q4h30FxFyz73HjopgItSw/2N PHA=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Wdcironportexception: Internal
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
---
drivers/md/dm-zoned-metadata.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c
index 039d17b28938..e6252f48a49c 100644
--- a/drivers/md/dm-zoned-metadata.c
+++ b/drivers/md/dm-zoned-metadata.c
@@ -550,7 +550,8 @@ static struct dmz_mblock *dmz_get_mblock_slow(struct
dmz_metadata *zmd,
if (!mblk)
return ERR_PTR(-ENOMEM);
- bio = bio_alloc(GFP_NOIO, 1);
+ bio = bio_new(dev->bdev, dmz_blk2sect(block), REQ_OP_READ,
+ REQ_META | REQ_PRIO, 1, GFP_NOIO);
if (!bio) {
dmz_free_mblock(zmd, mblk);
return ERR_PTR(-ENOMEM);
@@ -577,11 +578,8 @@ static struct dmz_mblock *dmz_get_mblock_slow(struct
dmz_metadata *zmd,
spin_unlock(&zmd->mblk_lock);
/* Submit read BIO */
- bio->bi_iter.bi_sector = dmz_blk2sect(block);
- bio_set_dev(bio, dev->bdev);
bio->bi_private = mblk;
bio->bi_end_io = dmz_mblock_bio_end_io;
- bio_set_op_attrs(bio, REQ_OP_READ, REQ_META | REQ_PRIO);
bio_add_page(bio, mblk->page, DMZ_BLOCK_SIZE, 0);
submit_bio(bio);
--
2.22.1
|