From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Raphael_Manfredi@pobox.com (Raphael Manfredi)
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4.3-ac9/4 - NFS corruption
Date: 02 May 2001 13:24:48 +0200 [thread overview]
Message-ID: <shsr8y8c7sv.fsf@charged.uio.no> (raw)
In-Reply-To: <9cmd8l$s38$1@lyon.ram.loc> <shsn18x6k77.fsf@charged.uio.no> <9co2fl$qr9$1@lyon.ram.loc>
In-Reply-To: Raphael_Manfredi@pobox.com's message of "2 May 2001 04:29:41 GMT"
>>>>> " " == Raphael Manfredi <Raphael_Manfredi@pobox.com> writes:
> Yes, mail is delivered on the server by mailagent, so with
> proper local locking.
That's not good enough. The NFS client needs to know when it is in
sync with the server...
> :If so it's completely normal behaviour: the userland NFS
> doesn't :support file locking, so there's no way that the
> client can guarantee :that some task on the server won't write
> to the file behind its :back...
> Does kernel-land NFS support file locking?
Yes. See the NFS-HOWTO for details.
> In any case, "mutt" does not lock the file, so yes, I'm
> perfectly aware there could be a race. But not the kind of
> race that would NULL-ify 5 bytes on the file when read from the
> client, whilst those same bytes are perfectly normal when read
> from the server.
That can easily happen if the client thinks that the file is longer
than it is on the server. A client has to rely on its cached value of
the file length in order to append to a file, since it has to specify
an offset at which to write. If that offset exceeds the current file
length, the server does the equivalent of a truncate() to extend the
file.
See RFC1094 and RFC1813 for further details on how NFS implements
reading and writing...
Cheers,
Trond
prev parent reply other threads:[~2001-05-02 11:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-01 13:21 2.4.3-ac9/4 - NFS corruption Raphael Manfredi
2001-05-01 17:41 ` Trond Myklebust
2001-05-02 4:29 ` Raphael Manfredi
2001-05-02 11:24 ` Trond Myklebust [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=shsr8y8c7sv.fsf@charged.uio.no \
--to=trond.myklebust@fys.uio.no \
--cc=Raphael_Manfredi@pobox.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox