[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 28/34] zonefs: use bio_new
- To: Chaitanya Kulkarni <Chaitanya.Kulkarni@xxxxxxx>, "linux-xfs@xxxxxxxxxxxxxxx" <linux-xfs@xxxxxxxxxxxxxxx>, "linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx>, "dm-devel@xxxxxxxxxx" <dm-devel@xxxxxxxxxx>, "linux-block@xxxxxxxxxxxxxxx" <linux-block@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "drbd-dev@xxxxxxxxxxxxxxxx" <drbd-dev@xxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "linux-nvme@xxxxxxxxxxxxxxxxxxx" <linux-nvme@xxxxxxxxxxxxxxxxxxx>, "linux-scsi@xxxxxxxxxxxxxxx" <linux-scsi@xxxxxxxxxxxxxxx>, "target-devel@xxxxxxxxxxxxxxx" <target-devel@xxxxxxxxxxxxxxx>, "linux-fscrypt@xxxxxxxxxxxxxxx" <linux-fscrypt@xxxxxxxxxxxxxxx>, "jfs-discussion@xxxxxxxxxxxxxxxxxxxxx" <jfs-discussion@xxxxxxxxxxxxxxxxxxxxx>, "linux-nilfs@xxxxxxxxxxxxxxx" <linux-nilfs@xxxxxxxxxxxxxxx>, "ocfs2-devel@xxxxxxxxxxxxxx" <ocfs2-devel@xxxxxxxxxxxxxx>, "linux-pm@xxxxxxxxxxxxxxx" <linux-pm@xxxxxxxxxxxxxxx>, "linux-mm@xxxxxxxxx" <linux-mm@xxxxxxxxx>
- From: Damien Le Moal <Damien.LeMoal@xxxxxxx>
- Date: Thu, 28 Jan 2021 07:25:08 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jSgQdFikue5ip6XRlyXPzYKx1++P+Hg8uK52x5aYL+k=; b=KUUNYeeXKSAbS8LV+b7WXja6brRVaKoFOOm0ujkmkWuJSLPzgus7drFwpT6L7Ot2K4uRF84HiOSSRTJ/a1vz14uMNSrmk+D9cmd4fog2uuZkq8Bg4yioVRqhjkmTj95TPpunAFyXu7wrfwI+6bUToQUict0wo7eAxK2IKlx9ih/NNFUjYgwBtAu2Gc9hsgJ9vjHItWNsy/YUwdnRsmPGo4+Lx7RcpvBVDiWHK/y4ptKzFiztsD/lV909+yhlv4jzL9U/PMYvvQ46Zlbx5vG6kL0q+Dd7XlcNgHHYYN46v11y9UnCCpJz2FcBxuVohCL+wb9/1zfcSBwhN80oplJPxg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mPdcK/wrqdrll5sSKfk/tpq+HKxGIlQ0olUV0quQ8r2P/3nkAWU1JEEJynwYK81uPBXyiVe8P/0ReiX0vWx1ysl3aPlfWX/zWMKqDpP3Q5OUw49avJXJH2gTxuUGjO1ciVP4bhrZgRGcJvgcVGiWfncxPWNr4BpcNlSKmoScyPyxO+CsrdP/WJneJ6H0ickT2bAe8XRmNbNkCDwsfGyW0Z0LbNI+jh0D89leTmSOwyP/lyte+GTjeNnQuv3TwgkY8ipQuG5F0C6TnV/hLz2zC8MxcG19vCz2vtGsbqAPOIHDQ1zaNzys+NQGoUOAO83YzvMc1YgQqq42Ugx4+leh+Q==
- Authentication-results: wdc.com; dkim=none (message not signed) header.d=none;wdc.com; dmarc=none action=none header.from=wdc.com;
- Cc: "axboe@xxxxxxxxx" <axboe@xxxxxxxxx>, "philipp.reisner@xxxxxxxxxx" <philipp.reisner@xxxxxxxxxx>, "lars.ellenberg@xxxxxxxxxx" <lars.ellenberg@xxxxxxxxxx>, "konrad.wilk@xxxxxxxxxx" <konrad.wilk@xxxxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, "minchan@xxxxxxxxxx" <minchan@xxxxxxxxxx>, "ngupta@xxxxxxxxxx" <ngupta@xxxxxxxxxx>, "sergey.senozhatsky.work@xxxxxxxxx" <sergey.senozhatsky.work@xxxxxxxxx>, "agk@xxxxxxxxxx" <agk@xxxxxxxxxx>, "snitzer@xxxxxxxxxx" <snitzer@xxxxxxxxxx>, "hch@xxxxxx" <hch@xxxxxx>, "sagi@xxxxxxxxxxx" <sagi@xxxxxxxxxxx>, "martin.petersen@xxxxxxxxxx" <martin.petersen@xxxxxxxxxx>, "viro@xxxxxxxxxxxxxxxxxx" <viro@xxxxxxxxxxxxxxxxxx>, "tytso@xxxxxxx" <tytso@xxxxxxx>, "jaegeuk@xxxxxxxxxx" <jaegeuk@xxxxxxxxxx>, "ebiggers@xxxxxxxxxx" <ebiggers@xxxxxxxxxx>, "djwong@xxxxxxxxxx" <djwong@xxxxxxxxxx>, "shaggy@xxxxxxxxxx" <shaggy@xxxxxxxxxx>, "konishi.ryusuke@xxxxxxxxx" <konishi.ryusuke@xxxxxxxxx>, "mark@xxxxxxxxxx" <mark@xxxxxxxxxx>, "jlbec@xxxxxxxxxxxx" <jlbec@xxxxxxxxxxxx>, "joseph.qi@xxxxxxxxxxxxxxxxx" <joseph.qi@xxxxxxxxxxxxxxxxx>, Naohiro Aota <Naohiro.Aota@xxxxxxx>, "jth@xxxxxxxxxx" <jth@xxxxxxxxxx>, "rjw@xxxxxxxxxxxxx" <rjw@xxxxxxxxxxxxx>, "len.brown@xxxxxxxxx" <len.brown@xxxxxxxxx>, "pavel@xxxxxx" <pavel@xxxxxx>, "akpm@xxxxxxxxxxxxxxxxxxxx" <akpm@xxxxxxxxxxxxxxxxxxxx>, "hare@xxxxxxx" <hare@xxxxxxx>, "gustavoars@xxxxxxxxxx" <gustavoars@xxxxxxxxxx>, "tiwai@xxxxxxx" <tiwai@xxxxxxx>, "alex.shi@xxxxxxxxxxxxxxxxx" <alex.shi@xxxxxxxxxxxxxxxxx>, "asml.silence@xxxxxxxxx" <asml.silence@xxxxxxxxx>, "ming.lei@xxxxxxxxxx" <ming.lei@xxxxxxxxxx>, "tj@xxxxxxxxxx" <tj@xxxxxxxxxx>, "osandov@xxxxxx" <osandov@xxxxxx>, "bvanassche@xxxxxxx" <bvanassche@xxxxxxx>, "jefflexu@xxxxxxxxxxxxxxxxx" <jefflexu@xxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 28 Jan 2021 07:25:21 +0000
- Ironport-sdr: 1XO4jceGpXsh5IubGHdLerxe4aeG9SxsSlvvinyZ7xz57Mp/Yn2xXzprrhv/lGRMw7sD89FT+6 0aDVxAiCPzDc65NGiWOiKo5gxtNSPZKz5mlSA/25VzwvVnfoogtEwKBkNuupemZT6VWxmBVgoz 1kutj7VUKXVePpFPNy7xf0zdg+eN3kJwPBnQ3H0UcYQsyPV+WI7edJnh+Tc18j4bolIOp7HUx9 V4l3St9H+gnv0HQImdqL8myuAw+VCjktcivp9mOSzOLzABQ8HsgpcL3yN2K451BrUxmzcCQRu1 NX8=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHW9UVkomvF2vpeIk+EkJoBWTZvag==
- Thread-topic: [RFC PATCH 28/34] zonefs: use bio_new
- Wdcipoutbound: EOP-TRUE
On 2021/01/28 16:15, Chaitanya Kulkarni wrote:
> 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;
I do not see the point of adding this variable since it is used only for the
bio_new() call. Pass the op value directly.
> 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;
>
>
--
Damien Le Moal
Western Digital Research
|