From owner-svn-src-all@freebsd.org Sat Mar 17 07:23:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23CF0F4CEED; Sat, 17 Mar 2018 07:23:51 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 8C2C56C063; Sat, 17 Mar 2018 07:23:50 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id AD98E107F7C; Sat, 17 Mar 2018 18:23:40 +1100 (AEDT) Date: Sat, 17 Mar 2018 18:23:39 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ed Maste cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r331083 - in head: lib/libufs sbin/dump sbin/fsck_ffs sbin/fsdb sbin/newfs sbin/quotacheck sbin/restore sbin/tunefs stand/libsa sys/fs/ext2fs sys/fs/nandfs sys/ufs/ffs sys/ufs/ufs usr.s... In-Reply-To: <201803170148.w2H1mR46082991@repo.freebsd.org> Message-ID: <20180317161131.W962@besplex.bde.org> References: <201803170148.w2H1mR46082991@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=OiG0oiQOHz3uAAuwjYQA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2018 07:23:51 -0000 On Sat, 17 Mar 2018, Ed Maste wrote: > Log: > Prefix UFS symbols with UFS_ to reduce namespace pollution > > Followup to r313780. Also prefix ext2's and nandfs's versions with > EXT2_ and NANDFS_. S_IFMT is already MI. So this churnge is mostly wrong unless file systems do the identity translations from their "internal" IFMT to S_IFMT, etc., everywhere, but they mostly don't. Using IFMT, etc., was correct under the assumption that IFMT is just an old spelling of S_IFMT. Now it is assumed that FOOFS_IFMT is just a new spelling of S_IFMT. There are many more logically different translations that have to be physically the identity to work. UFS_IFMT is a wrong spelling for ffs. If ffs were actually different from ufs, then there would be different file systems layered under ufs (or is it different file systems layered under ffs?). ext2fs needs a separate set of mode macros less than ffs, since it has less trivial translation layer that converts from the on-disk inode to the in-core inode. Translations are less confusing for file flags since they are only the identity for ffs. All file systems use the MI SF_* and convert to that if necessary. ffs assumes that SF_* match its disk encoding and will never change. ext2fs has to do nontrivial translations of file flags and does this at low levels so that upper levels can just use SF_* like ffs, except with no assumptions. File modes should be handled similarly. IFMT is then just a better (shorter) spelling of S_IFMT like it used to be. Bruce