Re: Summary: File locking discussion
On Tue, 24 Jun 1997, Philip Hands wrote:
> Hi,
>
> I noticed that during this discussion two issues that are not intrinsically
> related keep on getting tied together:
>
> 1) Reliable file locking, including over NFS
>
> 2) Reliable mail delivery to users' inboxes
>
> I cannot claim to be an expert on NFS locking, but I have a fairly strong
> feeling that 1) is almost impossible. Of course, if it is possible then I
> think we should do the Unix community a great service by providing an easy to
> use library, as has been suggested.
It would be good if a "real NFS export" could comment on this. I always
thought that there is a single safe way of file locking over NFS, that is
the one Miquel implemented in his new lib (and the one that is mentioned
in open(2)).
> Regardless of whether 1) is attainable, 2) is _not_ possible by use of locks
> alone. The reasons for this are covered in a fair amount of detail in the
> qmail documentation, but boil down to the fact that it is possible to corrupt
> a conventional mbox by writing a partial message to the end.
Of course, there are other ways to do "mail folder locking". Simpliest
(IMHO) would be to have a daemon run on the server where "/var/spool/mail"
is located. Each mail "client" (MTA, MUA, etc.) will have to contact that
server over a socket and ask for permission to modify the file.
This has another advantage: When the client dies, the socket goes down and
the server could unlock the file automatically.
Of course, this would require another daemon, and a little more code to
the client's lib.
> If we are serious about changing our mail delivery policy, then I think we
> should seriously consider moving to Maildir delivery as our default, with
> dot-locking as a required alternative (for backwards compatibility).
I don't know the "Maildir" locking technique yet. Could you please
describe it with a little more details?
Thanks for your input,
Chris
-- Christian Schwarz
schwarz@monet.m.isar.de, schwarz@schwarz-online.com,
Debian is looking schwarz@debian.org, schwarz@mathematik.tu-muenchen.de
for a logo! Have a
look at our drafts PGP-fp: 8F 61 EB 6D CF 23 CA D7 34 05 14 5C C8 DC 22 BA
at http://fatman.mathematik.tu-muenchen.de/~schwarz/debian-logo/
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: