lkml.org 
[lkml]   [1999]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: NFS caching.
From
Date
>>>>> " " == Miquel van Smoorenburg <miquels@cistron.nl> writes:

> fd = open("/var/spool/mail/rogier", O_RDONLY); if (lockf(fd,
> F_TLOCK, 0) == 0)
> lockf(fd, F_ULOCK, 0);
> fstat(fd, &st); .....

> Setting or trying to set a POSIX lock on a filedescriptor
> invalidates the NFS cache - all programs dealing with mail
> should use this

Note: the cache is only invalidated if the lock operation
succeeds. Trying and failing isn't good enough.

Cheers,
Trond

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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