xfs
[Top] [All Lists]

Re: lock files after crash

To: stimits@xxxxxxxxxx
Subject: Re: lock files after crash
From: Jim Crilly <noth@xxxxxxxxxxxxxxxx>
Date: 24 Sep 2001 08:20:10 -0400
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <3BAEE051.33A3656E@xxxxxxxxxx>
References: <4.3.2.7.2.20010912091115.03368618@xxxxxxxxxxxxx> <3B9F1B27.49261933@xxxxxxxxxx> <3B9F879E.3FB8976@xxxxxxxxxxxxxxxx> <news2mail-20010921202520.283D45A7.NOFFLE@xxxxxxxxxxxxxxxxxxx> <3BAEE051.33A3656E@xxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Mon, 2001-09-24 at 03:27, D. Stimits wrote:
> I've noticed that the problem isn't that the .ICEauthority-* files are
> still there, it is because it claims it can't lock the files. This is
> why I suggested a while back that whenever a filesystem recovery occurs,
> if flags are present in the filesystem that mark files that are already
> locked, they should be cleared. Apparently there is no flag preserved by
> the filesystem, at least not relevant to fcntl (does the kernel keep a
> list of locks in ram?).
> 
> D. Stimits, stimits@xxxxxxxxxx

Most programs just use regular files, (like file.lock) to determine if a
lock is held or not because the Linux kernel doesn't enforce mandatory
locking by default, and you have to jump some hoops to get it enabled so
it's not common.

Also, the kernel associates fcntl (POSIX style) locks with the process
and the inode the lock is on, but flock (BSD style) are associated with
the file object in memory, neither touch the filesystem on disk. They
don't work together and are totally oblivious to the other's existance.

Jim
-- 
Help protect your rights on-line.
Join the Electronic Frontiers Foundation today: http://www.eff.org/join
-----------------------------------------------------------------------
Security: Antonyms: See Microsoft
-----------------------------------------------------------------------
"We are coming after you. God may have mercy on you, but we won't,"
declared Sen. John McCain, R-Arizona.


<Prev in Thread] Current Thread [Next in Thread>