Re: Update on file-locking problems

Andrew Walker (andy@lysaker.kvaerner.no)
Tue, 4 Nov 1997 13:22:27 +0100 (MET)


Richard Gooch wrote:
>
>
> Hi, all. Well, I'm stumped. I've written a few test programmes in an
> effort to stress the file-locking system, and they perform
> flawlessly. This is odd because my 4th generation test programme tries
> to emulate what mount(8) does fairly closely. I've included the source
> for the test programmes below in case anyone is interested.

Hi Richard,

Well, I for one am not surprised that the tests performs flawlessly -
after all, I'm the one that maintains this code ;-) You can bet your
life I've read the specs in and out (even though I think the POSIX spec
for fcntl() is fundamentally flawed, I still honour it). What always
amazes me is the number of programs, often critical ones, that are written
with a naive idea of how locking actually works. I'll take a look at your
test program and hopefully I'll have a chance to look at mount-2.7f
as well. Maybe I need to strace mount(8) a little.

I've been staying out of this discussion, because I'm convinced the
problem is in user space, not in the kernel. I'll try to pinpoint it
if I can reproduce it.

-Andy

-- 
Andy Walker                              Kvaerner Engineering a.s.
Andrew.Walker@lysaker.kvaerner.no        P.O. Box 222, N-1324 Lysaker, Norway

......if the answer isn't violence, neither is your silence......

(pwei barmy army - oslo "filial")