Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp736876pxm; Fri, 25 Feb 2022 18:45:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJycXLZwJvdTcUMXrlshLbG1FYd7loOMw0ce7I/qacGJtyIRl3FkuqnFWuBqYI2I8zp11Zhg X-Received: by 2002:a65:66ca:0:b0:363:d22a:29c4 with SMTP id c10-20020a6566ca000000b00363d22a29c4mr8607296pgw.398.1645843520108; Fri, 25 Feb 2022 18:45:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645843520; cv=none; d=google.com; s=arc-20160816; b=BvDwHN9C+j1vSgihmlIhueijzkEHr1wtDNwc/LqDRtxMi+dlar/3BiQgbxxEmpO5Ia 294ZNLi2XAX/KECH62Wm73BIdqT9ywRM+k7lrVzvDxtZzqgB7zq6MhtKw8PAd7ArAJap iDCt0RkQxKHeZ2hRYd7XnLOhQKNdzGVJ2cjufMPJGYlZ32yn3MesMckHef7fgB42O4sC INd5cGeD6T3IORmxJQ3iT/LEHlmIwVjTY8O3MdOMecuYt61n+gSxzKRLb5TggYcXYFI/ QuYQCz6zCNQ61Q7mzH2cQcPFUbYrVJ02X6QRUpZEA8yTBw30gpnlVapXV1Kt5hTroUpo 8bbQ== 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; bh=/NTbqgnNV6a4doYS5rafSc4igF4fKTfwE7p2lRiueWM=; b=KbDPjdv3X4jbo81Ek2TbBf02ihXg3IQMEY1fS6MiHGjpPCODj3inVF7FHzHbJOpbxz 3gfLbmMnOlAfvy08U2gU8np9gVTkS3jSjX71I8DwhuP2fqIlYTGhkPVqMfFfgMBnLqOa Qs9/h/Ud7Y2/V02qtzrbnZ7D1fKxXM/WpvoGsu5vGYiPgNEt3mDQG2dsmR6Abrmswv4i d/DjZd1gqCXArltGlcw59O7UVjRVGFXb8rE9fFWeHZPFdN5Nj//HTTmi+XUAj4/8p945 wS61cfIaY5qDe7C5pI6c23wYZ9aRNduuh4oC8uz5HnlMyVXKzlDE0/x3wiTkcS07hnnm HzLw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id n7-20020a1709026a8700b0014f85c15c61si3224018plk.479.2022.02.25.18.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 18:45:20 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-ext4-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E77124F18B; Fri, 25 Feb 2022 18:10:14 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229470AbiBZCKp (ORCPT + 99 others); Fri, 25 Feb 2022 21:10:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbiBZCKo (ORCPT ); Fri, 25 Feb 2022 21:10:44 -0500 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E85F824152B; Fri, 25 Feb 2022 18:10:10 -0800 (PST) Received: from cwcc.thunk.org (pool-108-7-220-252.bstnma.fios.verizon.net [108.7.220.252]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 21Q20u42026574 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 Feb 2022 21:00:56 -0500 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 1041C15C0038; Fri, 25 Feb 2022 21:00:56 -0500 (EST) Date: Fri, 25 Feb 2022 21:00:56 -0500 From: "Theodore Ts'o" To: John Hubbard Cc: Eric Biggers , Lee Jones , linux-ext4@vger.kernel.org, Christoph Hellwig , Dave Chinner , Goldwyn Rodrigues , "Darrick J . Wong" , Bob Peterson , Damien Le Moal , Andreas Gruenbacher , Ritesh Harjani , Greg Kroah-Hartman , Johannes Thumshirn , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, cluster-devel@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH -v3] ext4: don't BUG if kernel subsystems dirty pages without asking ext4 first Message-ID: References: <2f9933b3-a574-23e1-e632-72fc29e582cf@nvidia.com> <303059e6-3a33-99cb-2952-82fe8079fa45@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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-ext4@vger.kernel.org On Fri, Feb 25, 2022 at 08:40:36PM -0500, Theodore Ts'o wrote: > Well, that makes it process_vm_writev()'s is that it needs to know > when to call pin_user_file_pages(). Sorry, typed too fast. What I was trying to say is this make it process_vm_writev()'s problem to figure out when it should call pin_user_file_pages() versus some other pin_user_pages function. > I suspect that for many use cases > --- for example, if this is being used by a debugger to modify a > variable on a stack, or an anonymous page in the program's data > segment, process_vm_writev() *isn't* actually pinning a file. So they > want some kind of interface that automatically DTRT regardless of > whether the user pages being edited are file-backed or not > file-backed. - Ted