From owner-freebsd-fs@FreeBSD.ORG Fri Dec 21 03:11:28 2007 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 75E2B16A418 for ; Fri, 21 Dec 2007 03:11:28 +0000 (UTC) (envelope-from moonshade@pnhz.kz) Received: from relay.pnhz.kz (relay.pnhz.kz [212.154.198.217]) by mx1.freebsd.org (Postfix) with ESMTP id B12B813C442 for ; Fri, 21 Dec 2007 03:11:27 +0000 (UTC) (envelope-from moonshade@pnhz.kz) Received: from [192.168.121.40] (abyss.pnhz.kz [192.168.121.40]) by relay.pnhz.kz with ESMTP id lBL3BIxd072173; Fri, 21 Dec 2007 09:11:18 +0600 (ALMT) (envelope-from moonshade@pnhz.kz) From: Denis Eremenko To: Lowell Gilbert In-Reply-To: <44mysdjrum.fsf@Lowell-Desk.lan> References: <1197437356.5183.24.camel@abyss.pnhz.kz> <44mysdjrum.fsf@Lowell-Desk.lan> Content-Type: text/plain; charset=KOI8-R Date: Fri, 21 Dec 2007 09:11:15 +0600 Message-Id: <1198206675.12065.5.camel@abyss.pnhz.kz> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit Cc: freebsd-fs@freebsd.org Subject: Re: fstat and filenames 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: Fri, 21 Dec 2007 03:11:28 -0000 ÷ ÐÔ, 14/12/2007 × 09:03 -0500, Lowell Gilbert ÐÉÛÅÔ: > moonshade@pnhz.kz (Denis Eremenko) writes: > > > Why fstat so secretive about file names and unix domain sockets? > > With respect to file names, you need to remember that there may not be > a unique answer. A file handle's metadata doesn't keep information > about how it was opened, just the inode. That inode could belong to > multiple directory entries, or none -- this is why, as the fstat(1) > manual points out, "there is no mapping from an open file back to the > directory entry that was used to open that file." Yes. I clearly understand difficulties of exact inode-name mapping. And i saw manpage note too. But doesn't _some_and_maybe_wrong_ information better than nothing? Additionally - most files has one filesystem record. > As far as unix domain sockets, I don't understand the question. Sorry. fstat doesn't show their names too.