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 538B2C433B4 for ; Sun, 9 May 2021 04:59:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F608613D9 for ; Sun, 9 May 2021 04:59:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229641AbhEIFAR (ORCPT ); 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-doc@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.