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 35C79C4338F for ; Sat, 24 Jul 2021 21:57:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E1D460E92 for ; Sat, 24 Jul 2021 21:57:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229953AbhGXVRE (ORCPT ); Sat, 24 Jul 2021 17:17:04 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:52430 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbhGXVRE (ORCPT ); Sat, 24 Jul 2021 17:17:04 -0400 Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m7PeC-003gMt-NK; Sat, 24 Jul 2021 21:57:28 +0000 Date: Sat, 24 Jul 2021 21:57:28 +0000 From: Al Viro To: Andreas Gruenbacher Cc: Linus Torvalds , Christoph Hellwig , "Darrick J. Wong" , Jan Kara , Matthew Wilcox , cluster-devel , linux-fsdevel , Linux Kernel Mailing List , ocfs2-devel@oss.oracle.com Subject: Re: [PATCH v4 1/8] iov_iter: Introduce iov_iter_fault_in_writeable helper Message-ID: References: <20210724193449.361667-1-agruenba@redhat.com> <20210724193449.361667-2-agruenba@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Sat, Jul 24, 2021 at 11:38:20PM +0200, Andreas Gruenbacher wrote: > Hmm, how could we have sub-page failure areas when this is about if > and how pages are mapped? If we return the number of bytes that are > accessible, then users will know if they got nothing, something, or > everything, and they can act accordingly. What I'm saying is that in situation when you have cacheline-sized poisoned areas, there's no way to get an accurate count of readable area other than try and copy it out. What's more, "something" is essentially useless information - the pages might get unmapped right as your function returns; the caller still needs to deal with partial copies. And that's a slow path by definition, so informing them of a partial fault-in is not going to be useful. As far as callers are concerned, it's "nothing suitable in the beginning of the area" vs. "something might be accessible".