lkml.org 
[lkml]   [1997]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: File locking problems?
Date
From
Hi,
>
>Matthias Urlichs writes:
>> Remove the locking code from mount and umount.
>> ln -s /proc/mtab /etc
>> ln -s /proc/mtab /var/run
>>
>> Bingo, the problem is gone.
>
>If I do that then I a message about /dev/root not being mounted when I
>run shutdown. Furthermore, as the man page says, doing that will make
>working with the loop device less convenient.
>
Right. If you need that, use a different solution. I can live without a
cleanly-looking loop device, and my shutdown script explicitly
read-only-remounts /var, /usr and /, just to be on the safe side.

I also modified my personal kernel so that a loop device is auto-dis-
associated from its file when it is closed, thus I never have to detach
looped-back files either manually or from within umount.

But that my personal preference. Linus didn't like it last time I submitted
that patch. *shrug*

>But, as I said, I disabled the code in mount which removes the
>/etc/mtab~ lockfile. This means that the fcntl() locking will always
>work on the same file. Or is there some other effect going on?

Hmmm. Which file does your mount use to write the new mtab records to, then?

--
Matthias Urlichs
noris network GmbH

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.034 / U:2.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site