Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1666874ybl; Fri, 30 Aug 2019 23:40:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxI4jlD1iYLlNIlKK7UEcFPHacMtjkHEFKxYhfeNJHOqIImiaFDt6G8iB+6AH/z9/VAfnc3 X-Received: by 2002:a63:b346:: with SMTP id x6mr16285768pgt.218.1567233621012; Fri, 30 Aug 2019 23:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567233621; cv=none; d=google.com; s=arc-20160816; b=oN6W1Ps2Dx5Eha1ayhjMie/Z4lvFr8PnYivmKc4w5K4E8ANgo5mEqJxV8KEi4+6xkh eiMcIIpMFEPrBZTCqmq7kkXb6fiZsfEE9DTeZrqMNS9Yu4OZ4WqUFnMO2183SSaX+Yr4 Hd2cig/D9gi+RdUEQpd2zPZKj5wdkyMmnhQciuCvl7WaSZS0G3SDJTJnncvSvi7POJHK VGZzwKzuE2D7J04cwc0Y55kss1WU8yKPY604HuG85y1kHb02zTyDRwOR6294dPl1WND5 3UEl2lZSJiXazEPvO42/yoZWTBDmL32R5fKQBC84+s90dLqn1RhHB5g8xUeDpHPlCcpQ Sm6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=w5dRQc/V85HUSdK58SOuqLdOPIPqHI76KYRXadjhW1Q=; b=bk3lIZ5yS/oEpy3HKhQwOdNOcQ8QaH8uDfDY2ozRBPx5b7aix8oEbu/pdBDJSnpeOG o//sxuwVwRhNi7o58ULSRvJzag4R65HttACvSBHCOE0hwK4cimkmsanl9DYnzGA+K8/0 vYzXxlxXsMRjbfQr3k+338NL4Tr9jnaWcQh5XkDKgaJO8MzbUKR3uq4Xb2U0BPaqA84F MpKDBGHWghjVkMUNC1U1dKGtMFFXzTvOw9JmbWosBrAJuliUEkVwZVQH5wxmopcwwDMI gzSuKO/CrTFUEUN0cffpvkR6bSb2ND3EHGgeFFzRYs2ByWrbV5qdDnR6avH9Ogy/8k1p GW1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cG4yS7h+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si5590319plt.277.2019.08.30.23.39.53; Fri, 30 Aug 2019 23:40:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cG4yS7h+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726323AbfHaGe7 (ORCPT + 99 others); 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-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.