From patchwork Thu Jan 28 07:11:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chaitanya Kulkarni X-Patchwork-Id: 12052301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B350C433E0 for ; Thu, 28 Jan 2021 07:15:35 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2D24564DDB for ; Thu, 28 Jan 2021 07:15:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2D24564DDB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B84796B0088; Thu, 28 Jan 2021 02:15:34 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B5BCA6B0092; Thu, 28 Jan 2021 02:15:34 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A4A036B0093; Thu, 28 Jan 2021 02:15:34 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0145.hostedemail.com [216.40.44.145]) by kanga.kvack.org (Postfix) with ESMTP id 90CE36B0088 for ; Thu, 28 Jan 2021 02:15:34 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 5C2D58249980 for ; Thu, 28 Jan 2021 07:15:34 +0000 (UTC) X-FDA: 77754323388.20.hook10_550205c2759d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 26A00180C07AB for ; Thu, 28 Jan 2021 07:15:34 +0000 (UTC) X-HE-Tag: hook10_550205c2759d X-Filterd-Recvd-Size: 5562 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Thu, 28 Jan 2021 07:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1611818133; x=1643354133; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cXmRF2Su1ZKio9gUSME8BeoE9pXLYvn976s4DXPYmio=; b=riDgczHtQ55sztDIv1QtqAsu62wyrDtZqeTvkrk1OGiUIgQn8gCHIiBW uKrCGemswmebfHDNHSfI2IG5fcyNC7Xw8JgAT/ZsoEXVvpI07z4Jqfx9r vIWw6geKkqEC7JgmGXpqerfUOEWzUBEnxjM5CnNSsHG7IDr5fh2hb+psJ CtXoV3+qGWQgwcikOl1Ysa32E1+5c6eXMUlUvq94y3i7FE79hkIhlZ+2a mM+3oO/qqN6UtSOSMskbrEUVClRWSiKn/ppjujmW2v5tCV6f78Wwmm6WW eSnUaIrmt90wPIOxIiE6g/CIxgzM+ZvBtKUHKRcT6F39vZxmTx1D9olfG A==; IronPort-SDR: AAZgXcGcTpwg8tYkEJQplkL+gAbd7AuMsCT40VXX1sT0KfeVl8i6fs9mhCU52CINJuwCARcTGQ tbUzmKCNiE8Px6uaJTBWpVfgAxcVSJUzKOW3+X61zkF/Q8UejvrYrubJ/8AHYATrDzLFgYNix4 WaJ+duM3KdWWzEXHsuLmhwYUIF+XypYxw90p25g+Ogs3r8m2tj5LoWSqR5M/o2U0ptWBZ41IV+ luyhshdzE4hYp2+G6WlInQU8tWHQmQb1NLR+2v7ZGH4wVFYQGkujN1p0/ibhDNr0bO2njR3Vt/ fak= X-IronPort-AV: E=Sophos;i="5.79,381,1602518400"; d="scan'208";a="158517537" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 28 Jan 2021 15:15:32 +0800 IronPort-SDR: ZVF7KARRrjx49YxRxsrC4Bhl80KR3/4XxM+wxNmjQGhh2sumkrwXfWBW3YoXV0YG7Plb5cf428 9vjLiV2tFavIkX0qaYOoddb7V8HQWGks27c5dBstIjK3V6grwBTsfFwuTGlE19yUI9ncQ1k3EJ FEyNm0B5vAAhVTKZhqcJRN6E3JpYJ2I2tCYQzpVOXOJGCRSLGGmxv3xbSvC5UiDbfjYQbH5BAg 9EN2XEnRReAH8tVnLKvHPBJf1LOczyGg9PYyT3dJyZxaoc5RNKa+FEmI7CBZ9Xq1FQfXPKSxtO umzRd9piEccPN9ShWU1Y5DqR Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2021 22:57:50 -0800 IronPort-SDR: m+UU9TJBIXCvSyFz/7O2vaYmlOCexk8ewW0e2kOKkWSuwpQEVFGI+DHENO7Q1Bf8IQzN352Mi5 5dDETfg3/zd0aL0yHDjcbUD/eS6byN5dveWHS0JlUn01j5YdJYnuzvRhCyGEwEvsPLeiwlo6h7 h47UPjLb7UDOPAPFC4EqcqtJYlkeHUwpVqBF6C8WUdWbiBbzIaj0jcLgB21R8kA1PJHycwAnr3 51c0CVR8EMmKQ6pEvymjZcIoINYcADZvl3xn96JSQjk6KW59eeMqwpBFLuZiCrCp4Zkdz1bD1j kZU= WDCIronportException: Internal Received: from vm.labspan.wdc.com (HELO vm.sc.wdc.com) ([10.6.137.102]) by uls-op-cesaip02.wdc.com with ESMTP; 27 Jan 2021 23:15:32 -0800 From: Chaitanya Kulkarni To: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, dm-devel@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com, xen-devel@lists.xenproject.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-fscrypt@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-nilfs@vger.kernel.org, ocfs2-devel@oss.oracle.com, linux-pm@vger.kernel.org, linux-mm@kvack.org Cc: axboe@kernel.dk, philipp.reisner@linbit.com, lars.ellenberg@linbit.com, konrad.wilk@oracle.com, roger.pau@citrix.com, minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com, agk@redhat.com, snitzer@redhat.com, hch@lst.de, sagi@grimberg.me, chaitanya.kulkarni@wdc.com, martin.petersen@oracle.com, viro@zeniv.linux.org.uk, tytso@mit.edu, jaegeuk@kernel.org, ebiggers@kernel.org, djwong@kernel.org, shaggy@kernel.org, konishi.ryusuke@gmail.com, mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com, damien.lemoal@wdc.com, naohiro.aota@wdc.com, jth@kernel.org, rjw@rjwysocki.net, len.brown@intel.com, pavel@ucw.cz, akpm@linux-foundation.org, hare@suse.de, gustavoars@kernel.org, tiwai@suse.de, alex.shi@linux.alibaba.com, asml.silence@gmail.com, ming.lei@redhat.com, tj@kernel.org, osandov@fb.com, bvanassche@acm.org, jefflexu@linux.alibaba.com Subject: [RFC PATCH 28/34] zonefs: use bio_new Date: Wed, 27 Jan 2021 23:11:27 -0800 Message-Id: <20210128071133.60335-29-chaitanya.kulkarni@wdc.com> X-Mailer: git-send-email 2.22.1 In-Reply-To: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> References: <20210128071133.60335-1-chaitanya.kulkarni@wdc.com> MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Signed-off-by: Chaitanya Kulkarni --- 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;