Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13728717pxu; Mon, 4 Jan 2021 02:50:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLFIGINDgglo4LI+Tcg6pPIhKYrXpnaDJY+ucvEtXwZQc64mST7bUf2NdgG7iipgxV7fH/ X-Received: by 2002:a05:6402:366:: with SMTP id s6mr69501565edw.44.1609757453490; Mon, 04 Jan 2021 02:50:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609757453; cv=none; d=google.com; s=arc-20160816; b=EmKrzq2CDy1H9GO66l7J5QrDX0LaE2EFK0CiUF7eRRCLUWlu2M88drPCsd3Rma4DBF Wd8hvV8WNh899KI3RR0M7SxqLrtOE6A5yHZn+4WXqveQ6CJOY5+7CA3WghvX/VRB7xQE 8tumI/lDb4YJkDS60Mk0knX9xSktqn7Uo11L7OCFK+hB9HavBKtWX+/8wD2eneSfyzwJ uBhxE0S/vu9unWVh6eKxLjHN3UMdjhhDCIm+cOw6ojkg6+6MeQvaS+3wZGn5LjBUE4BI z74iiqWhxlJLUkWpxua/i922ZF2QzvB3sbSsR6ECICK+SOIS6lUQdQRnIUhCp5Ackk99 K4dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :mime-version:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=se1iOPEZbpJwXQhd0pgbmujHr0vCQMYue/1sZVmCAt8=; b=GQeSxd/busrwVqcAMlz2HQbHPiPcC0w00QzGMVeUTfndMkkTOu3FNJyWaKDlEu6Csi pL7o495g2KMX77QLkPk6I+k9X8y0vMrgMwaJ6C9dGdf+FtrMZHGRgptmukV8joRe2nf5 M0EtO8PObEqtxkhfDNWdxmVi4E8tA25uqReLe9BUGUcwHGFslUwL0SUWXSb9bSoC8SL+ FFTGrB851TSw6o/XEC+qqY6sb3h0AYrFxYmAS3dhkgA3dJBfKa8/v8xMcBFF4xtMYUaE c+n4hzptQ28bL+lVjw7jwz6wYPSkLiNHNI1aD/+uzE/9cNk1KNJeIKO2ZntwQixOFWCk xExQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=P0Yw5KzH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id df20si30429732edb.366.2021.01.04.02.50.30; Mon, 04 Jan 2021 02:50:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=P0Yw5KzH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726935AbhADKsl (ORCPT + 99 others); Mon, 4 Jan 2021 05:48:41 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:28567 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726663AbhADKsk (ORCPT ); Mon, 4 Jan 2021 05:48:40 -0500 Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20210104104757epoutp01664815afba48e1618285dffa0fa8aca4~XAbcBKCCp2277222772epoutp01S for ; Mon, 4 Jan 2021 10:47:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20210104104757epoutp01664815afba48e1618285dffa0fa8aca4~XAbcBKCCp2277222772epoutp01S DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1609757277; bh=se1iOPEZbpJwXQhd0pgbmujHr0vCQMYue/1sZVmCAt8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P0Yw5KzH19Zu3gXh+13AhhgSH6DKdnZnQxLlovu2paw8APiR94L+Rp4Msec0wFOFZ IBXlqYK1FQORfnJDAGYbOLLI1+apqzdBS6dx9c9lCF7mx8nZL3RKV6429GsPlKNevf GEgl38tRErGCxpJXcVaK8WyLW2wmTyyhhk5E4GUs= Received: from epsmges5p1new.samsung.com (unknown [182.195.42.73]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20210104104756epcas5p2463d7073352e6e05c863a2e0fa5e6c3e~XAbbZzIUP1369413694epcas5p2K; Mon, 4 Jan 2021 10:47:56 +0000 (GMT) Received: from epcas5p2.samsung.com ( [182.195.41.40]) by epsmges5p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 54.EB.15682.C52F2FF5; Mon, 4 Jan 2021 19:47:56 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20210104104245epcas5p26ed395efbf74e78a4e44048a6d7d6ba7~XAW5TGqSH1410114101epcas5p2B; Mon, 4 Jan 2021 10:42:45 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20210104104245epsmtrp26734063a694e2facc96f3b410277c463~XAW5L3Al02765227652epsmtrp2a; Mon, 4 Jan 2021 10:42:45 +0000 (GMT) X-AuditID: b6c32a49-8bfff70000013d42-ee-5ff2f25c2282 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id E8.49.13470.421F2FF5; Mon, 4 Jan 2021 19:42:44 +0900 (KST) Received: from localhost.localdomain (unknown [107.110.206.5]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210104104241epsmtip117c7fe2b1a2f9988eaeba82911994104~XAW2Q7Njl1453914539epsmtip1b; Mon, 4 Jan 2021 10:42:41 +0000 (GMT) From: SelvaKumar S To: linux-nvme@lists.infradead.org Cc: kbusch@kernel.org, axboe@kernel.dk, damien.lemoal@wdc.com, Johannes.Thumshirn@wdc.com, hch@lst.de, sagi@grimberg.me, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, martin.petersen@oracle.com, bvanassche@acm.org, mpatocka@redhat.com, hare@suse.de, dm-devel@redhat.com, snitzer@redhat.com, selvajove@gmail.com, nj.shetty@samsung.com, joshi.k@samsung.com, javier.gonz@samsung.com, SelvaKumar S Subject: [RFC PATCH v4 1/3] block: export bio_map_kern() Date: Mon, 4 Jan 2021 16:11:57 +0530 Message-Id: <20210104104159.74236-2-selvakuma.s1@samsung.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210104104159.74236-1-selvakuma.s1@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA02SfUxTVxjGc+69vb0tKbsWMo7dB9Aom5DyETc9Wza3xLndxX/MMrO5oKzC DcWVj7QwUDZlgiJVCzYOpaJgZYpFC9auVrTLUgQFQxBaKOLAGgvJrNgKzAkIDHpr5n/P+z7P e37nPTkULi4jJVRWTj6rypErpaSQsLateleWOjGRlrzvVDRqGq4kUXVgGkf7yp9hyP7kBA9d N+gwdL6pHUMP/5rkoznNCIbaF8ZJpHMMAGQfSkDO1loS1Z0d5aODbhuJzt2cx9CRA/0Yss7W 4ch11IAjk89PII/fzUe+550k2n/pH/Dp64zTtZG5qh/mMz0jlwjG2V3AmI0VJHO5YQ9z7W4J yTwdHSIY/x/9JKO1GAFz+XYxM2l+myn/8yC2SfSd8KMMVpn1I6tKWve9UOE/PsDPqwovap9q wUpAV5gGCChIvwc7DvmABggpMX0NwIaxoVAxAeBJU3WoeAbgea2F93Kka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 4/MmOY/2A91MAbxRXDYpqTmZZalF+nYJXBnvZ1xjL5jAV3H0ywamBsZT3F2MnBwSAiYSE75c Zuli5OIQEtjNKDH19zMmiISMxNq7nWwQtrDEyn/P2SGKPjJK3Fx8GizBJqArcW3JJhYQW0RA SeLv+iawScwCn5kl5u9qA0sIC1hI/DzcxwpiswioSsz538wMYvMK2EqcaJzODLFBXmLmpe/s IDangJ3EpIv3gOo5gLbZSixqFYYoF5Q4OfMJ2EhmoPLmrbOZJzAKzEKSmoUktYCRaRWjZGpB cW56brFhgWFearlecWJucWleul5yfu4mRnDMamnuYNy+6oPeIUYmDsZDjBIczEoivBUXPsQL 8aYkVlalFuXHF5XmpBYfYpTmYFES573QdTJeSCA9sSQ1OzW1ILUIJsvEwSnVwHT5W7mz2e6T ky+knWLJuV+ldKnq7tzyTrsFaS+E89Tyly+M1mUW2DIj5EtfoULmiZA3B7/WOgU5sXUZ3e/v /3vDjHFqpn9a+t6eZ1MqwxTjSycwrhGLOLmf9Rszm5HmrlhrQct7i39+PsVx8+k075Kcn7w7 PwoZyjvUT7vtffRwq8GBpxJHnb5+4Ln01vq9I7PubNWNbgu2/FixmWHHyr/22Sd396W+3JB+ 3WLJinfntlUE+nH7zrRw5Gd46Xj9+ERuN8tf7Qsj9nxMnzfr5irZL+dmpUe6iMpMDCrKyHxl v8TyzZ6U1uKoCZ1aujXrlN99cDyi7tQ6LSNpdyPX1j/fRfVMDCoOSV87tG7t5HAlluKMREMt 5qLiRADXL7wrSAMAAA== X-CMS-MailID: 20210104104245epcas5p26ed395efbf74e78a4e44048a6d7d6ba7 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: REQ_APPROVE CMS-TYPE: 105P X-CMS-RootMailID: 20210104104245epcas5p26ed395efbf74e78a4e44048a6d7d6ba7 References: <20210104104159.74236-1-selvakuma.s1@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Export bio_map_kern() so that copy offload emulation can use it to add vmalloced memory to bio. Signed-off-by: SelvaKumar S --- block/blk-map.c | 3 ++- include/linux/blkdev.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/block/blk-map.c b/block/blk-map.c index 21630dccac62..50d61475bb68 100644 --- a/block/blk-map.c +++ b/block/blk-map.c @@ -378,7 +378,7 @@ static void bio_map_kern_endio(struct bio *bio) * Map the kernel address into a bio suitable for io to a block * device. Returns an error pointer in case of error. */ -static struct bio *bio_map_kern(struct request_queue *q, void *data, +struct bio *bio_map_kern(struct request_queue *q, void *data, unsigned int len, gfp_t gfp_mask) { unsigned long kaddr = (unsigned long)data; @@ -428,6 +428,7 @@ static struct bio *bio_map_kern(struct request_queue *q, void *data, bio->bi_end_io = bio_map_kern_endio; return bio; } +EXPORT_SYMBOL(bio_map_kern); static void bio_copy_kern_endio(struct bio *bio) { diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 070de09425ad..81f9e7bec16c 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -936,6 +936,8 @@ extern int blk_rq_map_user(struct request_queue *, struct request *, struct rq_map_data *, void __user *, unsigned long, gfp_t); extern int blk_rq_unmap_user(struct bio *); +extern struct bio *bio_map_kern(struct request_queue *q, void *data, + unsigned int len, gfp_t gfp_mask); extern int blk_rq_map_kern(struct request_queue *, struct request *, void *, unsigned int, gfp_t); extern int blk_rq_map_user_iov(struct request_queue *, struct request *, struct rq_map_data *, const struct iov_iter *, -- 2.25.1