Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp19889rwb; Fri, 13 Jan 2023 18:15:56 -0800 (PST) X-Google-Smtp-Source: AMrXdXsUjmzlLrT5JoAXjW2SOiPFK/eatnXEu9u4SrcPUojL5Nxzhu/+le0KLQx2L11xukDk16F1 X-Received: by 2002:a17:906:854:b0:86c:a3fc:5971 with SMTP id f20-20020a170906085400b0086ca3fc5971mr1100855ejd.73.1673662556810; Fri, 13 Jan 2023 18:15:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673662556; cv=none; d=google.com; s=arc-20160816; b=NiQd/YYh7cTYpw+7ZpVS/yy5BMz32e6l7JcC/DeVcmUjCENYjRc3seaUY18X09H9EU WT0mRNL9UEYxFmBKaI0rmVN6fddKoJ0feRecgB7V3ASundYeZyLaOtZ6kjJlERH/9B4O OLe31m4Vb4PAIjaWBtfN0Chen6AVmWuwIG03mBY9OrYANMX79nl+Wz+M/Iu83clCtOLc yQl0VvlAOYTH7o0/tTkSXv2EO4/KvIv3eWUUUC2dqmjRta6GBSZnZItRRqLp7gFxAokw aYXkNtthAVGV8XeX7GBmVoFIx5zt2NoKU4JZnwCVKJyH0OZMKNrTnLUCs8x2JVSwMeeb Rg0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=0Pch1iBSVz8G2YPFpmLPOf5HGOsU4koEPM8DeuS1iMg=; b=K+fqF0oXWM46VVKOF3o36e5PsxmGRaA/9iBelTplPPXJ0gnyv508znr69sMDqJe6l/ nM1LuxHh3bX+Dchqhfl84JyUJjhFXk2BsKFH6WkSqqyJ6aDno82q3vRXpNif9i/vU9uJ XTbLs8+G9XdqQMR1mV7OetXdn48Im17PvTPZ2gU6RP+ohInRZdhR4prxSAiZAf6d6fXm ScEbkR8MhgYVCwRVPpooEz7NbnLHC1kgzTw3A1eUNVmPQ0JbGzWOnC+KBMb6JO/9pZsh J+sSvLtociGLpGxRwtOVwgkWRRb8vAb70JlzxHj2Zpf8rjaLXrqvuVXJGKx7CsCjHNWW 0aJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=UhBaYATi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xi3-20020a170906dac300b0084c3a089f39si12355449ejb.350.2023.01.13.18.15.44; Fri, 13 Jan 2023 18:15:56 -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=@linux.org.uk header.s=zeniv-20220401 header.b=UhBaYATi; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231479AbjANB7J (ORCPT + 53 others); Fri, 13 Jan 2023 20:59:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231476AbjANB7D (ORCPT ); Fri, 13 Jan 2023 20:59:03 -0500 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D79038BF22; Fri, 13 Jan 2023 17:58:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=0Pch1iBSVz8G2YPFpmLPOf5HGOsU4koEPM8DeuS1iMg=; b=UhBaYATi8IehORYPIY4qgjJCXu 0+nCD0LPdd9/yWS1hebEZHlpz+0cl8i8P0pwXkRguJyHSBR5m5JQlSgPVsBD8Z7aLwYTB04/hwQ7T Ewb9k7ggNAfDJIahAMrzRfThZ5fOxkhsF6dDoTbcOhx4dZ9nNXl7LpGdvbDQGJbsErnuqRvqaYyvj uJftPkXCBmRTx2YHjXSLRQoFYsHG6SEraiSqYBXveF+eTzxbAYRV6wV8YRAUNwjJD+WMwPF1MFuEm VzIRytohdr2xeG96TZNbF8xDfzJLNPmHucXjKH3HTkqylW8dpE/zdJ+pdJ+eYG2hVHmQEIsr0OkzI 6OXZpzew==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1pGVoV-001llh-1A; Sat, 14 Jan 2023 01:58:31 +0000 Date: Sat, 14 Jan 2023 01:58:31 +0000 From: Al Viro To: "Martin K. Petersen" Cc: Bart Van Assche , 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, 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: Sender: Al Viro X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,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 Fri, Jan 13, 2023 at 08:34:50PM -0500, Martin K. Petersen wrote: > > Bart, > > > 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. > > Yeah. I'm not aware of anything that relies on this still. But obviously > Doug has more experience in the app dependency department. Are we guaranteed to know the accurate amount of data that got transferred for all surviving drivers? If we do, we can do accurate copy-out and all apps will keep seeing what they currently do. If we don't, the best we can do is replacing copy-in + IO + copy-out with memset + IO + copy-out.