From owner-freebsd-fs@FreeBSD.ORG Thu Feb 21 10:11:52 2008 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C21E016A400; Thu, 21 Feb 2008 10:11:52 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail02.syd.optusnet.com.au (mail02.syd.optusnet.com.au [211.29.132.183]) by mx1.freebsd.org (Postfix) with ESMTP id 4986713C455; Thu, 21 Feb 2008 10:11:51 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c220-239-252-11.carlnfd3.nsw.optusnet.com.au [220.239.252.11]) by mail02.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m1LABkMH013966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Feb 2008 21:11:48 +1100 Date: Thu, 21 Feb 2008 21:11:46 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Robert Watson In-Reply-To: <20080221093203.Y52922@fledge.watson.org> Message-ID: <20080221210145.C4879@besplex.bde.org> References: <200802201208.m1KC8MHi009288@freefall.freebsd.org> <20080220132030.S14519@fledge.watson.org> <20080221202027.B29307@delplex.bde.org> <20080221093203.Y52922@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-fs@FreeBSD.org, remko@FreeBSD.org, yuri@tsoft.com, bug-followup@FreeBSD.org Subject: Re: kern/120869: [procfs] 'stat' shows that all files have 0-length when they are actually not empty X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2008 10:11:52 -0000 On Thu, 21 Feb 2008, Robert Watson wrote: > On Thu, 21 Feb 2008, Bruce Evans wrote: >>> [about files in procfs] >> The bug is mainly that stat() claims that the files are regular when they >> highly irregular (they are more like fifos). This confuses naive >> applications into thinking that normal access methods for regular files >> actually work. > > I feel this way more generally about synthetic file systems with objects in > them that don't correspond with any of the standard file system objects that > applications known how to deal with. Enough to break compatibility/portabiility by adding a new file type? :-) S_IFMT has 4 bits, so it could encode 16 file types, but it currently only encodes 8. It looks like it once had only 3 bits but was expanded for fifos. It was last changed in ~1993 in 4.4BSD to add whiteouts. Bruce