Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2497570ybl; Thu, 29 Aug 2019 08:59:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxT8ZmkpMVMdMyV5q5AX3+JinCIZqq+735eEikKQvpctr/k5pZfS9GI3VRH9YphokIbTXis X-Received: by 2002:a17:90a:5d0d:: with SMTP id s13mr10610145pji.133.1567094380196; Thu, 29 Aug 2019 08:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567094380; cv=none; d=google.com; s=arc-20160816; b=Do5m4qGG4yj9KfA5u3YOVz4NC3Sr2fyHJquIppgI6xJydga8SslOePuQvzVZ0a0WWt eIY/FSsPipZ/mFsIhirkM1xSf4iNDVIsGc50Urg5/yV+DCZEzB+CIfuFuITioRtiPn2f 5rvZCqnDl1YJeePearnazlx7+S6jIltYY6SHvaL/fz0bpv05dMQCmCW+ah9W8u5Mabl9 fkGe271zULK50bir3+qWhp3PN+oa0s0uI+jTaVi/6ekBfPrdOfxXPgvpTIAAufcf82Pq tNqFQB9xorYOwQcPPI8Kd2flw5qJSIxR7JNSRdTfVDSPUjmQsApFER3/6UIz1yyKVHh5 Z36g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=7oDF20KFGffpEq73UMMeBvolUc5ezXdaynoZN+wr7hc=; b=kkBxjSCu3RskIeOvk6YfgNi+jiiIIpx1GcKsR7HbdpMURL1JLMVhJ11L+sywUuUV32 OOdHq6Ip12Z4xPRtx8gY4K0yNGRNZ8uuRe6K6O4JqE4GCh+SrOPk6je85kOFTiavLZov SHYfd4AIGZD9mKteXHrnP23A7kocUfVgC7w9JqR3Xb+VO60XeKkxeNg1//wsh7Q7uH0m l7aGp4oaQb7ALtqKKqFAitBR1abK30TroskV03sUZJHWAEQjRDSLwtwHOmViA0UVY0xG qgt84/5ktlJTIFqZu8OBFwhnnGTxKdZGIU+QGha7GCw8AUzqG8q4Y0UTIK7grU41Vj20 P1kw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h31si2218236pgb.67.2019.08.29.08.59.24; Thu, 29 Aug 2019 08:59:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727938AbfH2P6Z (ORCPT + 99 others); Thu, 29 Aug 2019 11:58:25 -0400 Received: from smtprelay0139.hostedemail.com ([216.40.44.139]:39409 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726283AbfH2P6Y (ORCPT ); Thu, 29 Aug 2019 11:58:24 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id 22F09182251AF; Thu, 29 Aug 2019 15:58:23 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:599:968:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2553:2559:2562:2693:2828:3138:3139:3140:3141:3142:3354:3622:3865:3867:3868:3870:3871:3872:3874:4321:4605:5007:6119:6742:6743:7903:10004:10400:10848:11026:11232:11657:11658:11914:12296:12297:12740:12760:12895:13069:13138:13161:13229:13231:13311:13357:13439:14096:14097:14180:14659:14721:21060:21080:21611:21627:21740:30012:30030:30054:30069:30070:30090:30091,0,RBL:23.242.196.136:@perches.com:.lbl8.mailshell.net-62.14.0.180 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: cub88_2b93c88708b5f X-Filterd-Recvd-Size: 3480 Received: from XPS-9350.home (cpe-23-242-196-136.socal.res.rr.com [23.242.196.136]) (Authenticated sender: joe@perches.com) by omf13.hostedemail.com (Postfix) with ESMTPA; Thu, 29 Aug 2019 15:58:19 +0000 (UTC) Message-ID: <67d6efbbc9ac6db23215660cb970b7ef29dc0c1d.camel@perches.com> Subject: Re: [PATCH v6 01/24] erofs: add on-disk layout From: Joe Perches To: Gao Xiang , Christoph Hellwig Cc: Alexander Viro , Greg Kroah-Hartman , Andrew Morton , Stephen Rothwell , Theodore Ts'o , Pavel Machek , David Sterba , 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 Date: Thu, 29 Aug 2019 08:58:17 -0700 In-Reply-To: <20190829103252.GA64893@architecture4> References: <20190802125347.166018-1-gaoxiang25@huawei.com> <20190802125347.166018-2-gaoxiang25@huawei.com> <20190829095954.GB20598@infradead.org> <20190829103252.GA64893@architecture4> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.32.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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. 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 */