Received: by 10.213.65.68 with SMTP id h4csp1801428imn; Thu, 29 Mar 2018 11:17:05 -0700 (PDT) X-Google-Smtp-Source: AIpwx48VVfwty0OMFZTD0A0UJCsaqjq+KTzqNP2YyApL3cHq6xo7BmMcVXYDQ0oQndOicXiHalBq X-Received: by 10.99.117.68 with SMTP id f4mr6370825pgn.437.1522347425198; Thu, 29 Mar 2018 11:17:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522347425; cv=none; d=google.com; s=arc-20160816; b=Ed3pv+a6jWEvaa4jAWGS0+CJRz2VR6eLUrMnMkJSVVEprdKUA5hzujS0IekdsfXjMd qJffSDU3rHaTDZZq1v7S6p+59mcNTMItDeXmYDcubliCrj9fdGvqjsgfyycx9y3Y8KyF S9CFUdZJCy9PigQCn8SB33d+gk+kyVjMjAnZOe8zN9fkBubbBaxdE/jjqGn2qsnFFIb5 3dEOfd1ShRWJhtAdw2D27c251iRgF3lQ6Tf9GGofgergzSN3gyaFFpkMHnO+xS363zku 7R5NcGnpShzCFuqbVBzmuRUodVFlZYnEQYUkG7ubpExfCUpSQzR0uTfGDIuXzH1R85wI JEQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=fWi5hlJNobGQwmlgCr6hG7kzD84My0mYqZc+U04XHVs=; b=XVmfL5fauliRZntgV9EKyHzHLtjQ+p/E66BXHAZ8HEtgfDIRZlfT4iC2CGzYLuDbWA 2YS5h2aiY1c0rbDtQ6ix2CCZXtLd8dKKsujLh2BQb0XFElz5Dab+nlkvgOWJzaezSfCq zK0fkbbH0t32UyI2UhDgOCnmdiUphKeuCkoiwNWaVWqGuPju42zmj5uXUyqm72BrXBop Rdx5J+hutpmoMN3OwOztiK5giSoEAj7+xPkaqVHIY2JtZpEFH0zb3S/CPrL9gtrL7PeA cfO5lAgYjAQcePZ7jIPgl0NCWjLGFGD6BPqRDq3VOjt0Yc+zAD9AjgvIEM41O1BMU6kw bxzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w10si4333934pgc.400.2018.03.29.11.16.51; Thu, 29 Mar 2018 11:17:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754069AbeC2SPu (ORCPT + 99 others); Thu, 29 Mar 2018 14:15:50 -0400 Received: from verein.lst.de ([213.95.11.211]:51632 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752555AbeC2SPq (ORCPT ); Thu, 29 Mar 2018 14:15:46 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 4C9B568D3A; Thu, 29 Mar 2018 20:15:45 +0200 (CEST) Date: Thu, 29 Mar 2018 20:15:45 +0200 From: Christoph Hellwig To: Logan Gunthorpe Cc: James Smart , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, Christoph Hellwig , Sagi Grimberg Subject: Re: [PATCH 4/4] nvmet-fc: Use new SGL alloc/free helper for requests Message-ID: <20180329181545.GA16116@lst.de> References: <20180329160721.4691-1-logang@deltatee.com> <20180329160721.4691-5-logang@deltatee.com> <15f4d135-7600-02b3-f50f-ed8deddd7b98@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 29, 2018 at 11:02:10AM -0600, Logan Gunthorpe wrote: > Per the bug in the previous patch, I don't think that was ever a valid > assumption. It doesn't have anything to do with the sgl_alloc change > either. The dma_map interface is allowed to merge SGLs and that's why it > can return fewer nents than it was passed. I'm not sure how many or > which DMA ops actually do this which is why it hasn't actually > manifested itself as a bug; but it is part of how the interface is > specified to work. Most iommus can, it just is very unlikely do happen in block drivers given that the block layer already merges segments higher up.