Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp385600rwb; Thu, 12 Jan 2023 21:59:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXssC3G8pFfJJ8Kfx+MuHiAgLSSkPhWq3v1Fke+u3Mlx9bTEHQP67oJW2tgkm8dSHk7apLuH X-Received: by 2002:a05:6a20:65a7:b0:a5:df86:f0e1 with SMTP id p39-20020a056a2065a700b000a5df86f0e1mr10470488pzh.16.1673589570924; Thu, 12 Jan 2023 21:59:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673589570; cv=none; d=google.com; s=arc-20160816; b=eKESHXHaDTQtlVJk1RwE6n7VeT/1mou/rxpaGfAa5PxUvMsQ9aAnxfRdLLk4E9yRhe D7/j4ThtQtPS/5FLcwXkboo2KVIlqHYvDS8hYO0dKr00Py1cAqlkYd6rbX6LKAs0mpoC QeHa/hJ9vwWVrzsorAELO6dkCY/ROX+DWyv71FfdD2v3dyj8pQ+oq1z6wBQKDexItfwT Uvs8XHct2DZITCqnhVXsPWd5Unw2nZG+xoLNL4OE68fnrIJI3CqZX87XDR9WZEsgtRtf nr217kdYetibh0hpKKQmftSnQtP2jWB8MQ/chMD4/BiwC8jyBceT/YZ8/5MdwGK4ZHlO 6Qrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+ZokzrN3drri2VnDFvX4Yx8up6Mxws4RudIL/WSG8j4=; b=FWLuQ/Jaj648grZMEP7W4c6V+CywXvHV08AnUEN9Ffadhk2U1pFIoIOf0izlw2iF7G NhTcktqtCOKlcrULdAOjmIJNK3egxAwwdt+MEXcJ5CD9Xs4VYc29+cyUxjuqF/je5EWT Abqws9z5wk6p3T1v8Y+ksWSCYGhsL6Z1tJQVtZLnHFndXHUNaDMIpP/xl+wjtQw6E8iB ABVVdheVK6fM0Gir63bduIS+cHVv9oSNUQVufJF227yg5ZoU0AwLNNDtolzncwKXe7Io MkOSjYhWZhLLcV1yv+sckXcQ0pfMZVL0SrJePD9UEzMy+2q0UsWJibv8RJrGzpt66fJb GTDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Ec8rKXY9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d3-20020a655883000000b00477bbd92cfdsi19128344pgu.592.2023.01.12.21.59.22; Thu, 12 Jan 2023 21:59:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Ec8rKXY9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232937AbjAMFdp (ORCPT + 50 others); Fri, 13 Jan 2023 00:33:45 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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.