From owner-svn-src-head@freebsd.org Thu Feb 11 19:01:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CBADAA6C83 for ; Thu, 11 Feb 2016 19:01:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm12-vm0.bullet.mail.bf1.yahoo.com (nm12-vm0.bullet.mail.bf1.yahoo.com [98.139.213.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 355C417A8 for ; Thu, 11 Feb 2016 19:01:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1455216961; bh=4KXPsko9wGHwyuTl07pI17AAVMsVG+n5F2A7DWUnQ5w=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From:Subject; b=A2B06Ps6XpMuEKOeyJm8Yz+GLgs6rbOWaLQKEqT6N1vvBL+1VfdFukqOkoB/iIKU3mXEkOLMF751ldNLvurMcOjhOQ80++Fu6cedF272G70lZQSXJWRBH3tSXIskBzLeXNUaLSjDu3NHrsCTCHHbtgHqjyvcgkFg0rHSDM9K0z+zjC3Ewo6KCIa4iUzn0rpUMf2O23IPlwO008KC/wNDzkga3vbCTS+xN8AF9cYly/Qabo60fF8Zeo13Fc8y/UA4WDL2yT/Iqel+4rhjv+hQBPmuaD+FJhP2JX/5b6VCwiGODgjkJlZeUnPJKzIyRUkEypZscn+pnLuwzCHPddHGwA== Received: from [98.139.170.180] by nm12.bullet.mail.bf1.yahoo.com with NNFMP; 11 Feb 2016 18:56:01 -0000 Received: from [98.139.211.194] by tm23.bullet.mail.bf1.yahoo.com with NNFMP; 11 Feb 2016 18:56:01 -0000 Received: from [127.0.0.1] by smtp203.mail.bf1.yahoo.com with NNFMP; 11 Feb 2016 18:56:01 -0000 X-Yahoo-Newman-Id: 466356.20803.bm@smtp203.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: .iZi1_cVM1k9QNqfXxZPkKjLtZ9TajZFR_cKPl0KHtOzCPJ L9ZAAi6ASlSCV5rzf9IJKtmFazegCk0zxBxWtr0cyPACwEeHXbtWRofBeQZq Uzuo3xHYGvABq_H5xfVcgnIevN1lPRFQ1sohD7Hxscp6QuYZkdhGtmg71E56 byuWDhIPAmS4EZlz1aA4sA.m3RBRjOziVapXYBX23P5O28ud4nSKhnbdXlYn b.qtAGIW10onmevrdiN7VP4fDXsd66DZ4OOKtvvuChq7qCB2irhmIaO_kh_b Svg49OW3c9U7DBtoOvvVMnUP.4Wh6s30Skbxb56T5b.AMVsYrfHNtGQZ10Ze HdJy2iXoQcIWbe8Mf_NFtz8RxakMlop2CHokuLv4qpbZ7TwT1qzXpZAkAiox zt.iTIIfLPR0pPIwB1GC_hOUp5Y4OfayDhcLJzseS1.iN3heQwe2D.yc4ys5 2F5xMEhH0.Fnn6S1u.DqpLRIAdwR1Zp2PuwukzBOPN4F8rhbKiyfIRljYYdr 2O7klw0pRwa6NJzz.Vu1xL6eXOmwyLAqQ X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Subject: Re: svn commit: r295523 - head/sys/fs/ext2fs To: Bruce Evans References: <201602111527.u1BFRFMe011283@repo.freebsd.org> <20160212030505.C1943@besplex.bde.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Pedro Giffuni Message-ID: <56BCD950.6090803@FreeBSD.org> Date: Thu, 11 Feb 2016 13:56:16 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160212030505.C1943@besplex.bde.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Feb 2016 19:01:31 -0000 On 02/11/16 11:54, Bruce Evans wrote: > On Thu, 11 Feb 2016, Pedro F. Giffuni wrote: > >> Log: >> Ext4: Use boolean type instead of '0' and '1' >> >> There are precedents of uses of bool in the kernel and >> it is incorrect style to use integers as replacement for >> a boolean type. > > This is all backwards. > > It is correct style to use integers to represent booleans. > We had this same discussion for ddb. You didn't agree there either though. > There are precedents for breaking this style by using the > bool type, but not many in fs code: > This line of code (from ext2_bmap.c): if (path.ep_is_sparse) is correct only of ep_is_sparse is boolean. If it is an int it has to be rewritten as: if (path.ep_is_sparse != 0) I chose to keep it boolean. > In all of /sys/fs/*, there were just 12 lines of declarations > that use 'bool'. All of these were in autofs. Now there are > 13 such lines (1 more in ext2fs). 1 use is especially useless > and especially unlikely to be all uses of booleans. > The age of the code matters. Ext2 has a lot of code copy/pasted from UFS and it is useful to keep it similar. The ext4 code is new, I don't expect to maintain the exact style unless it's documented as part of style(9). Pedro.