lkml.org 
[lkml]   [1999]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: NFS caching.
Date
In article <cistron.199910311130.MAA02204@cave.bitwizard.nl>,
Rogier Wolff <R.E.Wolff@BitWizard.nl> wrote:
>2.2.x caches NFS accesses. I have a LED on the wall that indicates
>that I have mail.

Cool ;)

>When I see it on, I want to read my Email. Is there
>a way that I can foce a cache invalidate? It is now annoying to have
>to wait something like 30 seconds before I can read Email that I know
>is simply sitting in my mailbox...

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

Mike.
--
First things first, but not necessarily in that order.

-
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.032 / U:0.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site