lkml.org 
[lkml]   [1999]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: NFS and cached atime
According to Thomas Pornin:
> In article <7gae80$2jd$1@q.cistron.nl> you write:
> > Right now my "you have new mail" doesn't work, because even if I read
> > my mail, the atime stamp doesn't get updated.
>
> For the last year, I used a Linux box (Alpha) with many 2.1.x and 2.2.x
> kernels, with mailbox on a NFSv2 server (SunOS 4.1.x) and the "new mail"
> message would never fail (except with early versions of the NFSv3 patch,
> which is now correct).

It fails for me.

> I use my own "new mail" detection and it reports new mail if and only
> if mtime is strictly greater than atime. And this works both on NFSv2
> and NFSv3. You do not want to update the atime each time you read from
> a file (it would defeat the purpose of read-caching) and therefore
> its value is not reliable alone. However, upon modification, atime is
> correctly updated.

No, then something is wrong. When new mail gets delivered, the atime
on the mailbox shouldn't be updated. Why should the delivery agent
want to read the mailbox first? It just appends to the mailbox, so
only mtime gets updated, and atime stays the same.

Ah wait, I understand. Your mail program probably rewrites your
mailbox - so atime and mtime both get updated. Mine doesn't.
(In fact, it's not an mbox, but a maildir-style mailbox).

Now when I read my mail, atime doesn't get updated so the mailcheck
routine doesn't know I read my mail. When new mail comes in I don't get
a message "You have new mail" since it already told me that before, and
it thinks I still haven't read my mail.

Mike.
--
Indifference will certainly be the downfall of mankind, but who cares?

-
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:51    [W:0.046 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site