Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Nov 1999 02:51:20 +0900
From:      "Daniel C. Sobral" <dcs@newsguy.com>
To:        John Polstra <jdp@polstra.com>
Cc:        Garance A Drosihn <drosih@rpi.edu>, hackers@FreeBSD.ORG
Subject:   Re: Portable way to compare struct stat's?
Message-ID:  <3836DF98.9A84EC44@newsguy.com>
References:  <XFMail.991118185611.jdp@polstra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
John Polstra wrote:
> 
> We must be interpreting the requirement differently, because it
> doesn't seem onerous at all to me.  The st_dev value needn't be the
> same on two different hosts which both mount the same filesystem.  I
> also doubt that the requirement has to hold across remounts.  Under
> that interpretation, it's simple to meet the requirement.  Just create
> a locally-unique st_dev value whenever you mount a filesystem, and
> if the filesystem is remote then record a mapping between (remote
> hostname, remote host's idea of the "device") and the local st_dev
> value.  (I've never used AFS, so I may be missing something crucial
> here.)

You are assuming the fs is local to some place. It is not. It is
distributed. Files might even migrate. So, the fs is at the same
time local and foreign to all hosts mounting it.

Anyway, st_dev+st_ino just don't give enough bits for a unique
identifier. The example of AFS (?), where a globally unique
identifier has 80 bits, is a good one.

> Well, the POSIX requirement isn't optional.  If a system doesn't
> meet it then it is not POSIX-compliant.  So any application that is
> targeted toward POSIX systems is perfectly within its rights to rely
> on the requirement.

It was stated before that FreeBSD complies with POSIX except where
POSIX is broken. Well, it's broken here. st_dev+st_ino *can't* work
with modern, distributed filesystems (without undue overhead).

--
Daniel C. Sobral			(8-DCS)
dcs@newsguy.com
dcs@freebsd.org

	"Then again maybe not going to heaven would be a blessing. Relkin
liked a certain amount of peace and harmony, since there'd been a
pronounced shortage of them in his own life; however, nothing but
peace and harmony, forever and forever? He wasn't sure about that.
And no beer? Very dubious proposition."



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3836DF98.9A84EC44>