From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E5E2C678D6 for ; Fri, 13 Jan 2023 05:33:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234671AbjAMFdm (ORCPT ); Fri, 13 Jan 2023 00:33:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235197AbjAMFcs (ORCPT ); Fri, 13 Jan 2023 00:32:48 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55B3C62196; Thu, 12 Jan 2023 21:32:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+ZokzrN3drri2VnDFvX4Yx8up6Mxws4RudIL/WSG8j4=; b=Ec8rKXY99njoRlW0Xn2VbcvkRw IQweKuBEzdzi+UtfUbaQzhw+hA8gXzoU5dvgjLOIurHhfsTAD6WxEfrzMm8vYDsQFLWsnCYPBVmQ+ MhNp6imDiqrd2SF3umPbVCyUs0KJD2bj1m9OPPJuGRwx6HAO5e1okebU+TWe8+qJfArF7AZDfE2bB 5Lsct7A0rCgMmrKTeeskDFyN1Uv2WgqWeqy0zQ/y4LomEz/aA8MCx+cSdNdfxb+/STTrVqvynmW4b 5B5RvZ/8f2KfNWjNv4Pdf8vsHyrX1N+mO5BRvNtTj4WVLQBnrwDdd/VNi+M/GfffJ5xbFqv+la+WL AjASTIlQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGCg8-000VRY-BD; Fri, 13 Jan 2023 05:32:36 +0000 Date: Thu, 12 Jan 2023 21:32:36 -0800 From: Christoph Hellwig To: Bart Van Assche Cc: Al Viro , Christoph Hellwig , David Howells , Matthew Wilcox , Jens Axboe , Jan Kara , Jeff Layton , Logan Gunthorpe , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, "Martin K. Petersen" , Douglas Gilbert Subject: Re: [PATCH v5 3/9] iov_iter: Use IOCB/IOMAP_WRITE if available rather than iterator direction Message-ID: References: <167344725490.2425628.13771289553670112965.stgit@warthog.procyon.org.uk> <167344727810.2425628.4715663653893036683.stgit@warthog.procyon.org.uk> <15330.1673519461@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org On Thu, Jan 12, 2023 at 01:49:14PM -0800, Bart Van Assche wrote: > I'm not sure that we still need the double copy in the sg driver. It seems > obscure to me that there is user space software that relies on finding > "0xec" in bytes not originating from a SCSI device. Additionally, SCSI > drivers that do not support residuals should be something from the past. > > Others may be better qualified to comment on this topic. Yeah. And that weird (ab)use of blk_rq_map_user_iov into preallocated pages in sg has been a constant source of pain. I'd be very happy to make it match the generic SG_IO implementation and either do get_user_pages or the normal bounce buffering implemented in the common code.