[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 28/34] zonefs: use bio_new
- 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:27 -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:15:43 +0000
- Ironport-sdr: +DeOHSiPuYXzZqiyAIX3LDlBHW0KIsbf68EHkSE9GrD05QRZOrlk03Yfgm5CJwWUthdVGMbUwy dKZsvQTGYjdKmFmEg83qwiiRFxPWI7aLa4+FXj2MY/vEPxOX3vp5N5vxIeB2c1JtSyJ5jEXqCI 8KGIicmmBmGNtkYRzYBdcUmu2Tu9Xmmr+qNb9zdN7bUCxUdIxqypReAimH4dVO50H9zsNjMO0M HK1ikRb+vDT3qfVV0QH7h0g0VxE5KpEk31o9hjw9aQmVscpEbk6AuB7YGDErOxL8wJjwiCr/NG fjc=
- Ironport-sdr: 9ERyHW2iXRv3pJTiHfQ6FCkvxQIn6RJoWyH5LT+UwXZT6ya7nLIzPeXSBcUtFJlYLbzJ1jDzxN pHV16noZdfrJgeYrFgZiSV9/HCaVgGMNxhaPnz3oXfu0fVwYpGlTH/1bmIIXWjjR2b9nT1t/4l 0Z2IC1wX2I3hVw8IlpAjOMZ7GJogy47Ic6kGXndqejrVNVoYa8f+ikzzvDphAHKl1xbxW+pbly uH1WBsmk4xtsYcu3MZd4HwNMp+vBKja986bP94zC3xKVEq5SqQYTyn/o9akXG36Lx7xn5fsdTW aUf4tCGYfqHI98qHkVuQcnZn
- Ironport-sdr: m+UU9TJBIXCvSyFz/7O2vaYmlOCexk8ewW0e2kOKkWSuwpQEVFGI+DHENO7Q1Bf8IQzN352Mi5 5dDETfg3/zd0aL0yHDjcbUD/eS6byN5dveWHS0JlUn01j5YdJYnuzvRhCyGEwEvsPLeiwlo6h7 h47UPjLb7UDOPAPFC4EqcqtJYlkeHUwpVqBF6C8WUdWbiBbzIaj0jcLgB21R8kA1PJHycwAnr3 51c0CVR8EMmKQ6pEvymjZcIoINYcADZvl3xn96JSQjk6KW59eeMqwpBFLuZiCrCp4Zkdz1bD1j kZU=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Wdcironportexception: Internal
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
---
fs/zonefs/super.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c
index ab68e27bb322..620d67965a22 100644
--- a/fs/zonefs/super.c
+++ b/fs/zonefs/super.c
@@ -661,6 +661,7 @@ static const struct iomap_dio_ops zonefs_write_dio_ops = {
static ssize_t zonefs_file_dio_append(struct kiocb *iocb, struct iov_iter
*from)
{
+ unsigned int op = REQ_OP_ZONE_APPEND | REQ_SYNC | REQ_IDLE;
struct inode *inode = file_inode(iocb->ki_filp);
struct zonefs_inode_info *zi = ZONEFS_I(inode);
struct block_device *bdev = inode->i_sb->s_bdev;
@@ -678,15 +679,12 @@ static ssize_t zonefs_file_dio_append(struct kiocb *iocb,
struct iov_iter *from)
if (!nr_pages)
return 0;
- bio = bio_alloc(GFP_NOFS, nr_pages);
+ bio = bio_new(bdev, zi->i_zsector, op, 0, GFP_NOFS, nr_pages);
if (!bio)
return -ENOMEM;
- bio_set_dev(bio, bdev);
- bio->bi_iter.bi_sector = zi->i_zsector;
bio->bi_write_hint = iocb->ki_hint;
bio->bi_ioprio = iocb->ki_ioprio;
- bio->bi_opf = REQ_OP_ZONE_APPEND | REQ_SYNC | REQ_IDLE;
if (iocb->ki_flags & IOCB_DSYNC)
bio->bi_opf |= REQ_FUA;
--
2.22.1
|