FIle locking across networks

Brandon Allbery allbery at ncoast.UUCP
Sat Jan 18 09:54:21 AEST 1986


Expires:

Quoted from <6726 at boring.UUCP> ["Re: File locking on networks"], by jack at boring.UUCP (Jack Jansen)...
+---------------
| [The problem: 
|  - Program on machine A has lock on file on B.
|  - Link between A and B goes down.
|  - B decides A has crashed, breask lock, and does cleanup.
|  - Link comes back up.
| ]
| In my opinion, the best thing to do is that I/O operations done
| by the program that still thinks it holds the lock return with EIO.
| This is a condition that is understood by unix programs, for instance
| when a disk goes offline), and if it is crucial to the application that
| someth action is taken when an operation is partially completed, it
| will catch the error, and do something intelligent.
+---------------

Maybe I'm missing something... but this seemed obvious to me.  Moreover, the
process should still get EIO even after the node comes back up, since the lock
will have evaporated by then anyway (most likely).  Of course, if what goes
down is the line between them, it's not certain how to detect it on the node
with the locked file, unless a program on that node tries to use that line...

Doesn't this apply to disk packs as well?  I.e. the disk pack goes offline and
all locked files on that pack should be unlocked... and processes with open
fies on that disk pack should get EIO even after the disk pack comes online
again.  Or, again, am I missing something?

--Brandon
-- 
	From the Heart of the Golden Apple...

..decvax!cwruecmp!ncoast!tdi2!brandon (cwruecmp is Case.CSNET, O ye Arpanauts)
(..ncoast!tdi2!root for business)     6615 Center St. #A1-105, Mentor, OH 44060
Phone: +01 216 974 9210      CIS 74106,1032       MCI MAIL BALLBERY (part-time)



More information about the Comp.unix.wizards mailing list