[RFC PATCH 28/34] zonefs: use bio_new
[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 28/34] zonefs: use bio_new
- From: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
- Date: Wed, 27 Jan 2021 23:11:27 -0800
- In-reply-to: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com>
- Ironport-sdr: qouX7FEWYku/EIcaLeSvDRO+nyGygc86CJQZ/lACj5d19vSYhuJ2gxYOfp9F/nXKdgSYK92iTr J6AE7z08It9HOwE2pVMP+g9PqCSufiBc29kc0/jOxhuL6J4VAwA2/ChXsqwlAOXViWOs6J81VX ESOTyhs79gzXc/mAzlsUWoqdKioxtVzk40e0opML6S2FMalHHgK+OiHrpOvLELog3no8jQyqnH OtFcCx32NR++XVsPwWMLlZJ/rif6zEzrLNqw7opEEeRPOPP0a9sBViXLeVMkCHThUiLTtm8YGu RtM=
- Ironport-sdr: F7D+JzTIMNuOM9rJE9rzREWmu3a0T7ckKAGVF47FdUVeiVjpgSf0x03/GemY2eE2EGoGHzHnSA WKHWnPkM9aQPHSnKTf5Ke7RvxvdU7Xd6iU6jFQJ/LM9Hse5xpvBepv5X6uPX5msmvWG6EcMU0s Hk+bWOzZJAyWfOsrGVj6WjTEUd7skZ4DGKzt9TkRgMQ6JLgsbCpCupvMVhRFNVwIh10oQopAfs 2lhR9odEZL1hzlV1xJmQRPgoI76/vIBgJgI5JpeWn4dwqLrq1gqKR9eo4A79TAeA+VZoXGsFQY oVbd22FYkDwLZU1ciz2nNIJf
- Ironport-sdr: m+UU9TJBIXCvSyFz/7O2vaYmlOCexk8ewW0e2kOKkWSuwpQEVFGI+DHENO7Q1Bf8IQzN352Mi5 5dDETfg3/zd0aL0yHDjcbUD/eS6byN5dveWHS0JlUn01j5YdJYnuzvRhCyGEwEvsPLeiwlo6h7 h47UPjLb7UDOPAPFC4EqcqtJYlkeHUwpVqBF6C8WUdWbiBbzIaj0jcLgB21R8kA1PJHycwAnr3 51c0CVR8EMmKQ6pEvymjZcIoINYcADZvl3xn96JSQjk6KW59eeMqwpBFLuZiCrCp4Zkdz1bD1j kZU=
- References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com>
- 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
[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]