Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1800121rwe; Sat, 27 Aug 2022 17:56:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR74KbdS+FfM9a+/ufWNuS++L6IlCTEsQj4JiQVNNrpabwdN/3FJuMOkEdhyRAMmaMO3RH1O X-Received: by 2002:a63:531e:0:b0:42b:d33a:529a with SMTP id h30-20020a63531e000000b0042bd33a529amr1757888pgb.55.1661648204853; Sat, 27 Aug 2022 17:56:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661648204; cv=none; d=google.com; s=arc-20160816; b=QblYZn/k0/D9wJbNyxGCwmtbqP0mUz405OLTebXzitmc0zEYAVtuG8VE+iDGYeg4d6 CVnR+uPDQx5Es3A4OoRaifvfcq2ypUz4eEfTYi0VTpP0XC9+WcCvLa35jevA3woXx6BE CcISI0hMUPfd59gW77z11QLAVpaz/XqR51nYjd8nVw8AhJWXa+8R/CxlMNhpCGTHlWUr wrvKdsE8fOSJJfZzlRRIhajUjtqRKr7PEpSdUgyPRiYxsnjAo9nj8YWI03lpCojC+lEg lTSY5rog9/nUeFmDTaKZc42WJAmmeexMm16H992LOd66unqm11RafA9iZB78nuwugoAK lGWw== 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=rIZZNVcFN0ZRY9l2Dgc0yVt30h1Tlu/m5EPOba3vQG8=; b=opietKinBd/O3inxHJ57kHNhE6LAWMyvszwV2UEr44qW1ES77exUfunTHpkZIHMwm7 e4Qh449VrK4WKwgPRF5Mr3/OEJjPtmSqeRrRy9Wros64Q8WHchVxsELu0DdcC7WdqVbr +yIYcpkgiJBsgkDr6FEc9jLgD9p6cSFlgL2LPc+80Cbuuoo1BfEmOuznwJxuNgC4ReiS Cq2Pw1fmoiqzGbpaAw/i/zr9ZW+jR2JCBlgFIVmiqY/FMSA2HDsN3Fvmwr+4BRnBpF4x H1nxbCq1mXwjOqIWHg35XCIMRzOZxZIq2objW9I0x0uTxJHl98Zp3xMRnUlm0PZKOI/i XvbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=dvaYvOCk; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 oa3-20020a17090b1bc300b001f738b7987bsi6183724pjb.22.2022.08.27.17.56.32; Sat, 27 Aug 2022 17:56:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=dvaYvOCk; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 S229828AbiH1AkB (ORCPT + 99 others); Sat, 27 Aug 2022 20:40:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbiH1AkA (ORCPT ); Sat, 27 Aug 2022 20:40:00 -0400 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 A02ACD139; Sat, 27 Aug 2022 17:39:59 -0700 (PDT) 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=rIZZNVcFN0ZRY9l2Dgc0yVt30h1Tlu/m5EPOba3vQG8=; b=dvaYvOCkWl882qx36QSassIMyy nMq1qz/v1H7/8vj2IhOCsQb5abzXy15QDRVnsRwG2OqqzcVYCFFJXWyT/SRo/kTkzl6F7c8w2I310 /8LE5kQ8uAVy974flLhFmALRL8LSqoszn9JuUGG2fNlYsKvNy71zbMjXcyFT6f6dNh5b8TdLdZP5Q znEDbd0QcFWNAesSvjwKI/8a/m22zGetswvzHLE8cZYNzZznR1Voq64rgbEtJOXr8rPgjO1qCp8O0 6Tuvx99bXySd81P5zrF72cWjHeMRerqYl0nMFLZ9BCA/aD1EWCyUyxFTqDvrL1bGIP/mFbREuvHoR AEY24Wwg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oS6L8-0099el-M9; Sun, 28 Aug 2022 00:39:50 +0000 Date: Sun, 28 Aug 2022 01:39:50 +0100 From: Al Viro To: John Hubbard Cc: Andrew Morton , Jens Axboe , Miklos Szeredi , Christoph Hellwig , "Darrick J . Wong" , Trond Myklebust , Anna Schumaker , Jan Kara , Logan Gunthorpe , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [PATCH 5/6] NFS: direct-io: convert to FOLL_PIN pages Message-ID: References: <20220827083607.2345453-1-jhubbard@nvidia.com> <20220827083607.2345453-6-jhubbard@nvidia.com> <353f18ac-0792-2cb7-6675-868d0bd41d3d@nvidia.com> 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,T_SCC_BODY_TEXT_LINE 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-nfs@vger.kernel.org On Sun, Aug 28, 2022 at 01:38:57AM +0100, Al Viro wrote: > On Sat, Aug 27, 2022 at 04:55:18PM -0700, John Hubbard wrote: > > On 8/27/22 15:48, Al Viro wrote: > > > On Sat, Aug 27, 2022 at 01:36:06AM -0700, John Hubbard wrote: > > >> Convert the NFS Direct IO layer to use pin_user_pages_fast() and > > >> unpin_user_page(), instead of get_user_pages_fast() and put_page(). > > > > > > Again, this stuff can be hit with ITER_BVEC iterators > > > > > >> - result = iov_iter_get_pages_alloc2(iter, &pagevec, > > >> + result = dio_w_iov_iter_pin_pages_alloc(iter, &pagevec, > > >> rsize, &pgbase); > > > > > > and this will break on those. > > > > If anyone has an example handy, of a user space program that leads > > to this situation (O_DIRECT with ITER_BVEC), it would really help > > me reach enlightenment a lot quicker in this area. :) > > Er... splice(2) to O_DIRECT-opened file on e.g. ext4? Or > sendfile(2) to the same, for that matter... s/ext4/nfs/ to hit this particular codepath, obviously.