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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A666C4320A for ; Tue, 3 Aug 2021 20:59:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4538760EE8 for ; Tue, 3 Aug 2021 20:59:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231624AbhHCU7b (ORCPT ); Tue, 3 Aug 2021 16:59:31 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:60866 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230509AbhHCU73 (ORCPT ); Tue, 3 Aug 2021 16:59:29 -0400 Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mB1TC-006YXJ-2M; Tue, 03 Aug 2021 20:57:02 +0000 Date: Tue, 3 Aug 2021 20:57:02 +0000 From: Al Viro To: Andreas Gruenbacher Cc: Linus Torvalds , Christoph Hellwig , "Darrick J. Wong" , Jan Kara , Matthew Wilcox , cluster-devel@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com Subject: Re: [PATCH v5 03/12] Turn fault_in_pages_{readable,writeable} into fault_in_{readable,writeable} Message-ID: References: <20210803191818.993968-1-agruenba@redhat.com> <20210803191818.993968-4-agruenba@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210803191818.993968-4-agruenba@redhat.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 03, 2021 at 09:18:09PM +0200, Andreas Gruenbacher wrote: > Turn fault_in_pages_{readable,writeable} into versions that return the number > of bytes faulted in instead of returning a non-zero value when any of the > requested pages couldn't be faulted in. This supports the existing users that > require all pages to be faulted in, but also new users that are happy if any > pages can be faulted in. > > Neither of these functions is entirely trivial and it doesn't seem useful to > inline them, so move them to mm/gup.c. > > Rename the functions to fault_in_{readable,writeable} to make sure that code > that uses them can be fixed instead of breaking silently. Sigh... We'd already discussed that; it's bloody pointless. Making short fault-in return success - absolutely. Reporting exact number of bytes is not going to be of any use to callers. Please, don't.