Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751973AbdDNFGl (ORCPT ); Fri, 14 Apr 2017 01:06:41 -0400 Received: from ale.deltatee.com ([207.54.116.67]:39314 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750750AbdDNFGh (ORCPT ); Fri, 14 Apr 2017 01:06:37 -0400 To: Christoph Hellwig References: <1492121135-4437-1-git-send-email-logang@deltatee.com> <1492121135-4437-3-git-send-email-logang@deltatee.com> <20170414045951.GA22206@lst.de> Cc: "Martin K. Petersen" , Sagi Grimberg , Jens Axboe , Tejun Heo , Greg Kroah-Hartman , Dan Williams , Ross Zwisler , Matthew Wilcox , Sumit Semwal , Ming Lin , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, intel-gfx@lists.freedesktop.org, linux-raid@vger.kernel.org, linux-mmc@vger.kernel.org, linux-nvme@lists.infradead.org, linux-nvdimm@ml01.01.org, linux-scsi@vger.kernel.org, fcoe-devel@open-fcoe.org, open-iscsi@googlegroups.com, megaraidlinux.pdl@broadcom.com, sparmaintainer@unisys.com, devel@driverdev.osuosl.org, target-devel@vger.kernel.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, Steve Wise , Stephen Bates From: Logan Gunthorpe Message-ID: <4df3e41b-591e-a500-a428-4bc529224030@deltatee.com> Date: Thu, 13 Apr 2017 23:06:16 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170414045951.GA22206@lst.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 50.66.97.235 X-SA-Exim-Rcpt-To: sbates@raithlin.com, swise@opengridcomputing.com, rds-devel@oss.oracle.com, linux-rdma@vger.kernel.org, netdev@vger.kernel.org, target-devel@vger.kernel.org, devel@driverdev.osuosl.org, sparmaintainer@unisys.com, megaraidlinux.pdl@broadcom.com, open-iscsi@googlegroups.com, fcoe-devel@open-fcoe.org, linux-scsi@vger.kernel.org, linux-nvdimm@lists.01.org, linux-nvme@lists.infradead.org, linux-mmc@vger.kernel.org, linux-raid@vger.kernel.org, intel-gfx@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, ming.l@ssi.samsung.com, sumit.semwal@linaro.org, mawilcox@microsoft.com, ross.zwisler@linux.intel.com, dan.j.williams@intel.com, gregkh@linuxfoundation.org, tj@kernel.org, axboe@kernel.dk, sagi@grimberg.me, martin.petersen@oracle.com, hch@lst.de X-SA-Exim-Mail-From: logang@deltatee.com Subject: Re: [PATCH 02/22] nvmet: Make use of the new sg_map helper function X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 746 Lines: 20 On 13/04/17 10:59 PM, Christoph Hellwig wrote: > On Thu, Apr 13, 2017 at 04:05:15PM -0600, Logan Gunthorpe wrote: >> This is a straight forward conversion in two places. Should kmap fail, >> the code will return an INVALD_DATA error in the completion. > > It really should be using nvmet_copy_from_sgl to make things safer, > as we don't want to rely on any particular SG list layout. In fact > I'm pretty sure I did the conversion at some point, but it must never > have made it upstream. Ha, I did the conversion too a couple times for my RFC series. I can change this patch to do that. Or maybe I'll just send a patch for that separately seeing it doesn't depend on anything and is pretty simple. I can do that next week. Thanks, Logan