Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp654936ybl; Fri, 30 Aug 2019 05:19:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqybRfhiGQPMitRe25KSm0S4WJf5Ypy6jgF0tiZRALiZz8zDYXp4J0eSCFAIVMjD9CP6jyji X-Received: by 2002:a17:902:8f81:: with SMTP id z1mr15378009plo.110.1567167572395; Fri, 30 Aug 2019 05:19:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567167572; cv=none; d=google.com; s=arc-20160816; b=zENO7bFmGjuL2A/d8fgHxlz851sePk15IFZs1YT6dXEuQZgtH0qiRWCjMmpdAEfrok XX2z5S4pmPfvYTDAjr0re/tSy6ffAiYJux9ir0czYeFwfMH1YRvUhQHBU3zdlxSCwUkb aQHemaE3KGSUwK8dsuOHnpfsv0fiLhVk38IZHZ5eiAAxgwTkQzKM10vPKniNwXt59ngU f2y2VoztnoJglVw02JRXPcCJcNIPjPF4xJXScz1FaquKkpueIuke2pMxYgvKglzcB+a4 vQWRxDsqd6TI/RPtyZR6YyYpm/qdpFkpK7rvvtKvU//jJ9eL0IVPr1x6nOP2IhQmux2L FOgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :from:date:dkim-signature; bh=pJNmdYW4A3IZxLHwMlL3CbYdeyHCPUoPhyy4gROfL18=; b=s68TXogL9fD+9Tj5sQn1HPycmzhkez2SlHaj2QdhPSH8fSv0A2QuQGqVL9biylAE0X Ua7HSiALpviL9/kKhHMVfyDE/fYRuSABRTBAhFv5VMZ07CAgkj4dDm/HmMMD9eQlB+gI 1qUlgGRB5W8VLqfOJPmLgKl3+/pS/vd9zLMe2eTBlWn08bJvS8UiXRr02300/mYHqYlL tjjJrc1uMnoJAwpfzJf/q9hVWrTxGxUemScTf21Ipr4HvKj56aOaK/rBEa0hvdQeeShx o34bmtUOKL0AS6fHP4JNSn6owX4LOQ7DwgNuX+YJ7SCwKew+I4U0c/iOBSXessj4Jgww mY5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aol.com header.s=a2048 header.b=p2WSfTLF; 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=REJECT sp=REJECT dis=NONE) header.from=aol.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4si4638909pjw.28.2019.08.30.05.19.16; Fri, 30 Aug 2019 05:19:32 -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=@aol.com header.s=a2048 header.b=p2WSfTLF; 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=REJECT sp=REJECT dis=NONE) header.from=aol.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728026AbfH3MSX (ORCPT + 99 others); Fri, 30 Aug 2019 08:18:23 -0400 Received: from sonic302-21.consmr.mail.gq1.yahoo.com ([98.137.68.147]:44600 "EHLO sonic302-21.consmr.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727326AbfH3MSW (ORCPT ); Fri, 30 Aug 2019 08:18:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1567167501; bh=pJNmdYW4A3IZxLHwMlL3CbYdeyHCPUoPhyy4gROfL18=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=p2WSfTLFAYduPbFLvCGjVOey3q8rv3EnshLFdJa5Kqg5dhrJz3lS3HXDCW3ZtXx0S8nvxPJ+JPA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Ehf77pDtl0nqwtu4KvDJXBa bAn0IH57T8TyKPn0N.izAQrtp9pIk_aq1.KrU8rZVnqCJalLI1eR902Q_6zB6QM9KZelD0WQF_2j c4BR8os0PJu6vz4H3howOskPmFCfKkcRHq8zWPnOzB_mR0t_lG98dYSdqn7mTDT6P8qvKEuEaBcp 6XNMLDq8LoJZwYf_j2HGj4OJ.pLlAlGlCgGZS59ORqiNkI231hnKLvDqLz_7VEGDUbOqqevpSqXx zEPC42KUCju0SBWrsyduO2frlp5tsZKXhzz.LB50MFz31bZtIiYdgMvCppqZBReybAcOqTgoORiS kIrMKia8ThBFCS3NAphkJJMacbKztxVRmkitC8b9LB_cgkreRA1WZysacsCImITGKyGY84C0PaDm ukFVGCl9UfLZu0T3MEPD46av11c3cxMw3wvvX4WFMh3CuhaFRmq1dTfJ3qi9vUCUpgT7wDc.eLY_ hN3XezaBvlQxEjIlz9jf5PPFKMTqbd0nP8DU- Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.gq1.yahoo.com with HTTP; Fri, 30 Aug 2019 12:18:21 +0000 Received: by smtp405.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID b6c3fb5892809f707687e2f58172e2b8; Fri, 30 Aug 2019 12:18:19 +0000 (UTC) Date: Fri, 30 Aug 2019 20:18:07 +0800 From: Gao Xiang To: dsterba@suse.cz, Joe Perches , Gao Xiang , Christoph Hellwig , Alexander Viro , Greg Kroah-Hartman , Andrew Morton , Stephen Rothwell , Theodore Ts'o , Pavel Machek , Amir Goldstein , "Darrick J . Wong" , Dave Chinner , Jaegeuk Kim , Jan Kara , Linus Torvalds , linux-fsdevel@vger.kernel.org, devel@driverdev.osuosl.org, LKML , linux-erofs@lists.ozlabs.org, Chao Yu , Miao Xie , Li Guifu , Fang Wei Subject: Re: [PATCH v6 01/24] erofs: add on-disk layout Message-ID: <20190830121806.GA20984@hsiangkao-HP-ZHAN-66-Pro-G1> References: <20190802125347.166018-1-gaoxiang25@huawei.com> <20190802125347.166018-2-gaoxiang25@huawei.com> <20190829095954.GB20598@infradead.org> <20190829103252.GA64893@architecture4> <67d6efbbc9ac6db23215660cb970b7ef29dc0c1d.camel@perches.com> <20190830120714.GN2752@twin.jikos.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190830120714.GN2752@twin.jikos.cz> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On Fri, Aug 30, 2019 at 02:07:14PM +0200, David Sterba wrote: > On Thu, Aug 29, 2019 at 08:58:17AM -0700, Joe Perches wrote: > > On Thu, 2019-08-29 at 18:32 +0800, Gao Xiang wrote: > > > Hi Christoph, > > > > > > On Thu, Aug 29, 2019 at 02:59:54AM -0700, Christoph Hellwig wrote: > > > > > --- /dev/null > > > > > +++ b/fs/erofs/erofs_fs.h > > > > > @@ -0,0 +1,316 @@ > > > > > +/* SPDX-License-Identifier: GPL-2.0-only OR Apache-2.0 */ > > > > > +/* > > > > > + * linux/fs/erofs/erofs_fs.h > > > > > > > > Please remove the pointless file names in the comment headers. > > > > > > Already removed in the latest version. > > > > > > > > +struct erofs_super_block { > > > > > +/* 0 */__le32 magic; /* in the little endian */ > > > > > +/* 4 */__le32 checksum; /* crc32c(super_block) */ > > > > > +/* 8 */__le32 features; /* (aka. feature_compat) */ > > > > > +/* 12 */__u8 blkszbits; /* support block_size == PAGE_SIZE only */ > > > > > > > > Please remove all the byte offset comments. That is something that can > > > > easily be checked with gdb or pahole. > > > > > > I have no idea the actual issue here. > > > It will help all developpers better add fields or calculate > > > these offsets in their mind, and with care. > > > > > > Rather than they didn't run "gdb" or "pahole" and change it by mistake. > > > > I think Christoph is not right here. > > > > Using external tools for validation is extra work > > when necessary for understanding the code. > > The advantage of using the external tools that the information about > offsets is provably correct ... > > > The expected offset is somewhat valuable, but > > perhaps the form is a bit off given the visual > > run-in to the field types. > > > > The extra work with this form is manipulating all > > the offsets whenever a structure change occurs. > > ... while this is error prone. I will redo a full patchset and comments addressing what Christoph all said yesterday. Either form is fine with me for this case, let's remove them instead. Thanks, Gao Xiang > > > The comments might be better with a form more like: > > > > struct erofs_super_block { /* offset description */ > > __le32 magic; /* 0 */ > > __le32 checksum; /* 4 crc32c(super_block) */ > > __le32 features; /* 8 (aka. feature_compat) */ > > __u8 blkszbits; /* 12 support block_size == PAGE_SIZE only */