[RFC PATCH 08/34] dm-zoned: use bio_new in get_mblock_slow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: linux-xfs@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, dm-devel@xxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxx, 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
- Subject: [RFC PATCH 08/34] dm-zoned: use bio_new in get_mblock_slow
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Wed, 27 Jan 2021 23:11:07 -0800
- In-reply-to: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com>
- Ironport-sdr: HzPerQaiztFUEasMSGBL7pufEwyW6IIqPAvQBON6N3S3qbv2A/1T6LTjYaiTF4Ys5SbmFbwQh7 YPboUWym3b+HtkZAcFyRMxwHIjXcO7RpDGDJAVRLx1zi5Z+hea9ap6MZHbNrBvN3ce/90zv1hm mIxPdZZeQKw+DHdc0Im435VhTXy3E8CO66bwvyOJouUTqtibzAJ4057uiZNbkkpHGWJsx42QEA /ACZSERNohlfRoHrjMf+9mSJqoiwlyDPkzzEvQLbMJnnhfI0QqL/5HXAUxEUTzIH6vdwczF1Nr yds=
- Ironport-sdr: QDmlDniK+Qg2wmCIrPidpFhBCW4Gs2rBnZVvp0UJtmX7iw51NrOfmxDB3vABBV5Y///TftVWbw C3vN34g0s+vhOOj9aMfsP0NCmUMxrAD3hvvdvhIxqmnY28R2IZVjEOstkF8aMK69VBp/PrmZeN lB6462D1Snv0shDe59MOlVfNEX1cQuVxfcQtx1amHQ7IxaIjPZXOsWYWZysqq99Yx3mxiAim+f NQsJGXf011KB06lmXp3si6yLr25GGmDlwo39F0ICU5r9LyIjhQ35O6E+JpFcUhSstH/8se00Sx kKtuVS1qJi2PkmFdrn+EONtS
- Ironport-sdr: PY5y9iQTPaVno0Uv+vDzXalBIBo52CYeNhdpn1c7TxoOle28qWYUG06GBXepBaS7SSBSs9yjco 7juMCiLNAFC5Fl7+86T3v8dT5wViZ/r3nWsFgtnjfanPUZXEs47a6Ez/SVmFCas+uBcEU4K0rz 829GMnmof7Vria8o+CPxuoND3CfaQPgb+QYuf0lvO7BAPoDvQAY10VoO7lep1Qta/l6nA5+vbg ht+uppfjRckOmE5ekZUsc4vMGzhgqqwVxG/dC7eG99G+et4hw+q4h30FxFyz73HjopgItSw/2N PHA=
- References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com>
- 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
[Index of Archives]
[linux Cryptography]
[Asterisk App Development]
[PJ SIP]
[Gnu Gatekeeper]
[IETF Sipping]
[Info Cyrus]
[ALSA User]
[Fedora Linux Users]
[Linux SCTP]
[DCCP]
[Gimp]
[Yosemite News]
[Deep Creek Hot Springs]
[Yosemite Campsites]
[ISDN Cause Codes]