fam
[Top] [All Lists]

Re: [fam] Fam race condition

To: Wesley Smith <wessmith@xxxxxxx>
Subject: Re: [fam] Fam race condition
From: Alex Larsson <alexl@xxxxxxxxxx>
Date: Wed, 3 Oct 2001 10:39:58 -0400 (EDT)
Cc: <raster@xxxxxxxxxxxxx>, <fam@xxxxxxxxxxx>
In-reply-to: <3BBA698D.8CAB37F7@xxxxxxx>
Sender: owner-fam@xxxxxxxxxxx
On Tue, 2 Oct 2001, Wesley Smith wrote:

> Yes, you're right about that - we almost always use imon.  But actually, we
> did run into this problem last year on some internal machines where fam was
> watching some large mail files.  The fix for IRIX was to use a different
> field in the stat struct that has nanosecond resolution.  Unfortunately,
> Linux doesn't seem to have that, so you can't take the same approach. 

They're apparently adding that for 2.5. That will sort of solve the 
problem, if you have 'real' nanosecond resolution timers. Since I
doubt that is the case though, I think the correct fix would be to have a 
generation counter in struct stat. But I doubt that will ever happen. 

Of course, that wouldn't be perfect either, if you manage to do 2^32 
changes in one second it could fail. I don't think that would be a problem 
though. :)

> Also, you might consider checking mtime as well as ctime, as we have
> reports that some NT based NFS servers don't update ctime when they should.

Yeah, I'll add that, even though (as raster said) the polling case isn't 
that important.

/ Alex


--
Source code, list archive, and docs: http://oss.sgi.com/projects/fam/
To unsubscribe: echo unsubscribe fam | mail majordomo@xxxxxxxxxxx

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