Skip site navigation (1)Skip section navigation (2)
Date:      04 Dec 1999 20:42:37 +0100
From:      Assar Westerlund <assar@sics.se>
To:        Garance A Drosihn <drosih@rpi.edu>
Cc:        Wes Peters <wes@softweyr.com>, Randell Jesup <rjesup@wgate.com>, Robert Watson <robert@cyrus.watson.org>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Portable way to compare struct stat's?
Message-ID:  <5lwvqu7as2.fsf@foo.sics.se>
In-Reply-To: Garance A Drosihn's message of "Thu, 2 Dec 1999 21:13:56 -0500"
References:  <ybu4se3lomv.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net> <3845712D.F4D51A70@softweyr.com> <v04210100b46cd2f23ff6@[128.113.24.47]>

next in thread | previous in thread | raw e-mail | index | archive | help
Garance A Drosihn <drosih@rpi.edu> writes:
> In the case of AFS, I think you'd want to expand the size of st_dev.
> All files in an AFS volume are "one device", I would think.  If the
> "device" is gone (ie, the volume is not mounted), then all files in
> that "device" (volume) will not be available.

I'm confused.  Did you mean `st_ino' there?  I agree that you want to
see the whole AFS space as a single device.

> I don't know what would be best for other distributed file systems,
> though.  Maybe both variables would have to increase in size.  Maybe
> we should start by creating an "fcompare()" routine, which you'd
> pass two file descriptors to and it would say if they're the same
> file.  Initially that routine could just do two fstat()'s, and
> compare st_dev and st_ino.  We could then expand it to do better
> comparisons for other file-systems.

In solaris there's a vnode operation vop_cmp that does exactly that.
But it's not exported to userland in any way.

/assar


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?5lwvqu7as2.fsf>