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=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 78F4EC3A5A6 for ; Sat, 31 Aug 2019 06:35:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D7742377B for ; Sat, 31 Aug 2019 06:35:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cG4yS7h+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726489AbfHaGe7 (ORCPT ); Sat, 31 Aug 2019 02:34:59 -0400 Received: from mail-yw1-f68.google.com ([209.85.161.68]:45005 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbfHaGe7 (ORCPT ); Sat, 31 Aug 2019 02:34:59 -0400 Received: by mail-yw1-f68.google.com with SMTP id l79so3145934ywe.11; Fri, 30 Aug 2019 23:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w5dRQc/V85HUSdK58SOuqLdOPIPqHI76KYRXadjhW1Q=; b=cG4yS7h+dHwCqC7+1d/JcKh3/NJvSD6CdeEW76fj6dxOuSvT9LSkJ8Nw3jmjC0bhZ4 Sqx+lrDHzXK1l3xs8fjelflWht3rUg9LcY/+nBUGiZep0IuzstbMDRGUXyjzoHG7DxD/ FpLTH8v7U7hprKh92RiJ0SQhkoJWM2DpwrNuUDnbZXfWbVuLIira7NywHRNsESJFm/vM vs/lvXv9Jn61eYBI4hYDyFFou9UMyxS8NTMnjWc4K+2gGiTsaYN980N8H6QvMgMYgx/R FNMz2TizJuR2z4eFxtNyFMXeMJJNbhab1gIRpoX9peerBAO98/FPCgrsZ/v87KPz/xsk mAhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w5dRQc/V85HUSdK58SOuqLdOPIPqHI76KYRXadjhW1Q=; b=SAhACyWTsrEuC5zlLLgg3V9zGlziqLFjeyFkmcfef7RqNvOjWhUnO4m9qG2Aqwvohr 4nMiK+2CT4vvaIDJGPiSCxi2qg3sYpoOxcKYi5rQaC+icfbwZ9X3uhmClbziiqmnqhG3 a4fkgtfbzOiwlrjCWCvCkzuYJ80Tg0E69Uz8kgQYFUl4cXYPbQO+sdNMF36VfWfNHZan EAzw/9UunA8h4QpXyI2RsmRwHxxVDeQkA7aicA8GJsEAr576zTiHNcryVBGeDIoTG0hU 7eBGxglZXgaITVoXw3vjwbYyJCAeKIzTIZEauD32EYDYqDU/dLcXSqVWDgjX147Y8ntW kQuw== X-Gm-Message-State: APjAAAUC/+O2Bker0m3vb52ULUoIVpuzqNKBDP//jx7EfW+UHe0/DsTL 4n4ruG+8grPvRn1ckev2f4laF+1MmuxoTHAj030= X-Google-Smtp-Source: APXvYqxA5jrG+aw5cnWfvi5zFi4WHO9+wZCHT7+Yz6m0t7DUrxcUd6HDfyHU+ofMYTrsXauHYejNEsuIL56i7wezFkE= X-Received: by 2002:a81:6c8:: with SMTP id 191mr11928917ywg.181.1567233298135; Fri, 30 Aug 2019 23:34:58 -0700 (PDT) MIME-Version: 1.0 References: <20190802125347.166018-1-gaoxiang25@huawei.com> <20190802125347.166018-4-gaoxiang25@huawei.com> <20190829101545.GC20598@infradead.org> <20190829105048.GB64893@architecture4> <20190830163910.GB29603@infradead.org> <20190830171510.GC107220@architecture4> In-Reply-To: <20190830171510.GC107220@architecture4> From: Amir Goldstein Date: Sat, 31 Aug 2019 09:34:44 +0300 Message-ID: Subject: Re: [PATCH v6 03/24] erofs: add super block operations To: Gao Xiang Cc: Christoph Hellwig , Alexander Viro , Greg Kroah-Hartman , Andrew Morton , Stephen Rothwell , "Theodore Ts'o" , Pavel Machek , David Sterba , "Darrick J . Wong" , Dave Chinner , Jaegeuk Kim , Jan Kara , Linus Torvalds , linux-fsdevel , devel@driverdev.osuosl.org, LKML , linux-erofs@lists.ozlabs.org, Chao Yu , Miao Xie , Li Guifu , Fang Wei Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 30, 2019 at 8:16 PM Gao Xiang wrote: > > Hi Christoph, > > On Fri, Aug 30, 2019 at 09:39:10AM -0700, Christoph Hellwig wrote: > > On Thu, Aug 29, 2019 at 06:50:48PM +0800, Gao Xiang wrote: > > > > Please use an erofs_ prefix for all your functions. > > > > > > It is already a static function, I have no idea what is wrong here. > > > > Which part of all wasn't clear? Have you looked at the prefixes for > > most functions in the various other big filesystems? > > I will add erofs prefix to free_inode as you said. > > At least, all non-prefix functions in erofs are all static functions, > it won't pollute namespace... I will add "erofs_" to other meaningful > callbacks...And as you can see... > > cifs/cifsfs.c > 1303:cifs_init_inodecache(void) > 1509: rc = cifs_init_inodecache(); > > hpfs/super.c > 254:static int init_inodecache(void) > 771: int err = init_inodecache(); > > minix/inode.c > 84:static int __init init_inodecache(void) > 665: int err = init_inodecache(); > Hi Gao, "They did it first" is never a good reply for code review comments. Nobody cares if you copy&paste code with init_inodecache(). I understand why you thought static function names do not pollute the (linker) namespace, but they do pollute the global namespace. free_inode() as a local function name is one of the worst examples for VFS namespace pollution. VFS code uses function names like those a lot in the global namespace, e.g.: clear_inode(),new_inode(). For example from recent history of namespace collision caused by your line of thinking, see: e6fd2093a85d md: namespace private helper names Besides, you really have nothing to loose from prefixing everything with erofs_, do you? It's better for review, for debugging... Thanks, Amir.