Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1556050pxj; Sat, 8 May 2021 22:09:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbrHcPhAWrwMcoD1bHYQRvGXMdXVqIYGGsYlmSRFJv96HHNHghaApU8fso4EEq9k4Zok53 X-Received: by 2002:a50:f9cc:: with SMTP id a12mr21924017edq.24.1620536947168; Sat, 08 May 2021 22:09:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620536947; cv=none; d=google.com; s=arc-20160816; b=UawLwZeRKcEKbCf1TIuro1RUX+86Eg+cJGPxk5f/gaG7IuJxFfCjSeVlxq6x2WSN+Q jJdWjmNokXjFaI4K5YjqTxcYXtMsmc7cuCrkSXEnf0O1ZQfbsDezr3+RHiKI7OJBhzIq hmW//aqS584ztMOl+GV3FhgehxgxwZ0sBv9bhnu9ZFw4IG04g1YvDWx6u4G/MAJrxWpl q85OCIwlMK817Tw0KxG519dZr44Xqy0zOeFKkNQFTvH7t+D2jBTxAvmebPQClbHNe9Ip ThZu2B4TosgQhwiqzz35cwH9qg9Qp2TYHjp/Wx+JbU6As/VIphmKuSkpLyXY6kQrMVYt S61A== 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; bh=Ez7tCr8usLwsE/egENccUUDNXh/U5RKc+118OPfYMXU=; b=k+7peC1PCtBNu8v6DjFS5y9zMMvQ4Kj2eeGkvyG5RlJmuMWF/aUugbr5NkuB1yBY7N LI3UwxFuSInHYfK5kzHgvxu7YuqKrQfxxSilm1LJmbUbSMUINEQMJ8Hh0JBUeu/vbmzC BQemDK4/TNRt7Ovrj/9NR1Cn6ahwnOlr3G0l5X9tN0jwygxCL46E33fuNFzZY6vuGPDF Q06HFnEUZP4kV7+8HYhhd46pkndPNDh2Ji8grmRRpAcJlHMligTbgTarDEQILlD8CMaT E36zf75NNtplwKBU6oWhfjZgNzDZlxJhn6DLe7YT7M1urgTm3TT55CDpD15G440Xr/sm /leA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si9305954ejv.549.2021.05.08.22.08.43; Sat, 08 May 2021 22:09:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229660AbhEIFAR (ORCPT + 99 others); Sun, 9 May 2021 01:00:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229617AbhEIFAQ (ORCPT ); Sun, 9 May 2021 01:00:16 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F458C061573; Sat, 8 May 2021 21:59:13 -0700 (PDT) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94 #2 (Red Hat Linux)) id 1lfbWM-00CsoW-7J; Sun, 09 May 2021 04:58:26 +0000 Date: Sun, 9 May 2021 04:58:26 +0000 From: Al Viro To: Linus Torvalds Cc: Jia He , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Jonathan Corbet , Al Viro , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , "Eric W . Biederman" , "Darrick J. Wong" , "Peter Zijlstra (Intel)" , Ira Weiny , Eric Biggers , "Ahmed S. Darwish" , "open list:DOCUMENTATION" , Linux Kernel Mailing List , linux-s390 , linux-fsdevel Subject: Re: [PATCH RFC 1/3] fs: introduce helper d_path_fast() Message-ID: References: <20210508122530.1971-1-justin.he@arm.com> <20210508122530.1971-2-justin.he@arm.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-kernel@vger.kernel.org On Sun, May 09, 2021 at 02:20:32AM +0000, Al Viro wrote: > Umm... Interesting, especially considering the way dyname_dname() looks like. dynamic_dname(), obviously. > Looks like there's a piece of prepend() open-coded in it. And > since all ->d_dname() instances are either simple_dname() or end up > with call of dynamic_dname()... > > Might make sense to turn that method into > int (*d_dname)(struct dentry *, struct prepend_buffer *); > > Followup patch, obviously, but it might be worth looking into. > > Another thing that keeps bugging me about prepend_path() is the > set of return values. I mean, 0/1/2/3/-ENAMETOOLONG, and all > except 0 are unlikely? Might as well make that 0/1/2/3/-1, if > not an outright 0/1/2/3/4. And prepend() could return bool, while > we are at it (true - success, false - overflow)... OK... I think I see how to carve it up sanely, will post after I get some sleep.