[RFC PATCH 09/34] dm-zoned: use bio_new in dmz_write_mblock
[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 09/34] dm-zoned: use bio_new in dmz_write_mblock
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Wed, 27 Jan 2021 23:11:08 -0800
- In-reply-to: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com>
- Ironport-sdr: ips+qcbHgDovI66x7IazOAW8unTTwMuBCO3DLBbgsGevCGbPVO0rNtVvqvB79ytHFBjbIcXQLw tKOqF+xByrXDRPlhhCAej+myhwsK4Y8HvK/kav4wIJlZgiM17rXuZxa5XeqQkoRfLi3QUh9byZ w+BR9csKJDQFWQ2omiYM0JoVhr7sBcKi3Yb7dgODAT27dfj8maW4bxwFGJZYwzoC1HXI+VSPbg sPKJaMAb6W1/Tbu8q6fX3ILOwFO8skQSYIWQjHDncWbgu0DI+5qFYtX4bgUNVFJHYbIqZH1w2l DaQ=
- Ironport-sdr: MG2ERFEkA4mlL0lFT8NLsb2e6DFhVVRqB+IA5oCVIHXZcss05Vy6lTjpMJpiqCktzY57GMpYzv rszBymD49vU1leR1F5Gy3Yjc76IekQXnx0fbgXq4q0aZjEm/u7IDO3xEyEHGBGucdCzRLsxd4x MEb2W8VL4nHH1jeJZtB0IjnlBFA6yZJRoL1kCDQHzjlf477R/ofs8a+Fo5XXOsvZG7QwA3kJFl fDlxxa2j7d4s9wo8PiIP1RJltpG4SqlD86O6uKpk9Fa6dXIjjlJ5RPsA6I6R6HmnLxfL882+QO AwFSnaAcqcKHdyXK2VDLW7An
- Ironport-sdr: m8MWhLly+Q/ggpFQoQazEvRAK79hMprrsJeibomNIX1/4xtKgak83IDhV3hY33IYYgETWfckla 12cflgJcZOLhtYF332W1ZeqMwkaZsc7uQahEN2f8ydynExvlY4KkvRqWC31LBbVv2+B3KXuSeg s9mXwdZWg1TGYc2w+IbnJALYEzC776WPgdLPtLGdrMUnCNPoz5WeDSYQd/QZ1Y+MzxJurZd/eC 94O7CZ/ZfohxaTfsL58Np58+H9TOWMfDJbBI8BFZ4728SkC4ncTHu1ybMvyhjmP7gPrroYjKqQ UWE=
- 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 e6252f48a49c..fa0ee732c6e9 100644
--- a/drivers/md/dm-zoned-metadata.c
+++ b/drivers/md/dm-zoned-metadata.c
@@ -723,7 +723,8 @@ static int dmz_write_mblock(struct dmz_metadata *zmd, struct dmz_mblock *mblk,
if (dmz_bdev_is_dying(dev))
return -EIO;
- bio = bio_alloc(GFP_NOIO, 1);
+ bio = bio_new(dev->bdev, dmz_blk2sect(block), REQ_OP_WRITE,
+ REQ_META | REQ_PRIO, 1, GFP_NOIO);
if (!bio) {
set_bit(DMZ_META_ERROR, &mblk->state);
return -ENOMEM;
@@ -731,11 +732,8 @@ static int dmz_write_mblock(struct dmz_metadata *zmd, struct dmz_mblock *mblk,
set_bit(DMZ_META_WRITING, &mblk->state);
- 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_WRITE, 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]