* Does AFS support RCS?
@ 1993-11-05 19:46 Paul Eggert
1993-11-07 15:32 ` John Hascall
0 siblings, 1 reply; 2+ messages in thread
From: Paul Eggert @ 1993-11-05 19:46 UTC (permalink / raw)
Someone asked the info-cvs mailing list whether the CVS and RCS version
control packages will work under AFS (or whatever the Andrew File
System is being called these days). Not having an AFS to play with, I
thought I'd ask the net.
RCS locks a file "F,v" for writing by creating a lock file ",F," as follows:
open(",F,", O_CREAT|O_EXCL|O_TRUNC|O_WRONLY, S_IRUSR|S_IRGRP|S_IROT)
This call must be atomic: if two processes execute it simultaneously,
at most one must succeed. RCS removes the lock either with
`unlink(",F,")' (to abort any changes) or `rename(",F,", "F,v")' (to
commit the changes). Both of these calls must also be atomic.
RCS does not have read locks; if you're merely reading an RCS file and
someone else unlinks it, you continue to read the same file (which now
has zero links).
Any Posix.1 system must support these atomic actions. Also, NFS
supports these atomic actions, except for a combination involving
over-the-wire root access that is so rare that it isn't worth worrying
about. It would be nice to know that AFS supports them too, at least
in the typical case.
I vaguely remember that AFS didn't support hard links, so I'm worried
about the scenario involving the file with zero links. No doubt OSF
has been busy adding Posix compliance, though. Does anybody with AFS
experience care to comment about this?
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Does AFS support RCS?
1993-11-05 19:46 Does AFS support RCS? Paul Eggert
@ 1993-11-07 15:32 ` John Hascall
0 siblings, 0 replies; 2+ messages in thread
From: John Hascall @ 1993-11-07 15:32 UTC (permalink / raw)
In article <CG1AyC.GsG@twinsun.com> eggert@twinsun.com (Paul Eggert) writes:
}Someone asked the info-cvs mailing list whether the CVS and RCS version
}control packages will work under AFS ...
}RCS locks a file "F,v" for writing by creating a lock file ",F," as follows:
} open(",F,", O_CREAT|O_EXCL|O_TRUNC|O_WRONLY, S_IRUSR|S_IRGRP|S_IROT)
}This call must be atomic: if two processes execute it simultaneously,
}at most one must succeed. RCS removes the lock either with
}`unlink(",F,")' (to abort any changes) or `rename(",F,", "F,v")' (to
}commit the changes). Both of these calls must also be atomic.
As far as I know, these are all atomic (in any event we use RCS on AFS).
}I vaguely remember that AFS didn't support hard links, so I'm worried
}about the scenario involving the file with zero links.
AFS supports hard links *within* a directory:
pooh.cc> cd /afs/iastate.edu/project/john
pooh.cc> mkdir foo
pooh.cc> touch bar
pooh.cc> ln bar baz
pooh.cc> ln bar foo/bah
foo/bah: Cross-device link
John
--
John Hascall ``An ill-chosen word is the fool's messenger.''
Systems Software Engineer
Project Vincent
Iowa State University Computation Center + Ames, IA 50011 + 515/294-9551
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1993-11-07 15:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-11-05 19:46 Does AFS support RCS? Paul Eggert
1993-11-07 15:32 ` John Hascall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox