Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Nov 1999 10:40:59 -0800 (PST)
From:      John Polstra <jdp@polstra.com>
To:        robert+freebsd@cyrus.watson.org
Cc:        hackers@freebsd.org
Subject:   Re: Portable way to compare struct stat's?
Message-ID:  <199911181840.KAA03119@vashon.polstra.com>
In-Reply-To: <Pine.BSF.3.96.991116103055.6960A-100000@fledge.watson.org>
References:  <Pine.BSF.3.96.991116103055.6960A-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In article
<Pine.BSF.3.96.991116103055.6960A-100000@fledge.watson.org>, Robert
Watson <robert+freebsd@cyrus.watson.org> wrote:
> On Mon, 15 Nov 1999, Wes Peters wrote:
>
> > On a single system, if st_dev and st_ino are equal, you must be
> > referring to the same object.  If not, I'd like to hear about it.
>
> This assumption has always caused lots of pain and suffering for
> distributed file system people -- in a distributed file system, the
> requirement that you can generate a unique 32 bit number for each
> file or directory visible in the FS is a fairly arduous one.

I don't dispute that point, but it is worth mentioning that POSIX
specifically guarantees that st_dev and st_ino "taken together
uniquely identify the file within the system."  So it is OK for
applications to rely on that.

John
-- 
  John Polstra                                               jdp@polstra.com
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "No matter how cynical I get, I just can't keep up."        -- Nora Ephron


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?199911181840.KAA03119>