Re: NFS caching.

Trond Myklebust (trond.myklebust@fys.uio.no)
31 Oct 1999 14:38:39 +0100


>>>>> " " == 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/