From: Martin Pool <mbp@sourcefrog.net>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: nfs@lists.sourceforge.net
Subject: Re: nfs/mmap/rename file corruption
Date: Thu, 28 Aug 2003 12:14:10 +1000 [thread overview]
Message-ID: <20030828121410.4ccc4b45.mbp@sourcefrog.net> (raw)
In-Reply-To: <shs1xv6ftp9.fsf@charged.uio.no>
On 27 Aug 2003 21:37:38 -0400
Trond Myklebust <trond.myklebust@fys.uio.no> wrote:
Thanks for responding so quickly!
> >>>>> " " == Martin Pool <mbp@sourcefrog.net> writes:
>
> > - ccache runs distcc with output to a temporary file
> > - distcc opens, mmaps, writes to, munmaps, and closes the
> > temporary
> > file
> > - distcc exits
> > - ccache renames the temporary file to its proper location in
> > the
> > ccache
> > - ccache opens the file read only, and reads from it
>
> Is this a rename from one directory to the other?
Yes.
> If so, are you using
> the 'no_subtree_check' option on the server?
No, I was not. It happens that the filesystem is exported at its
root.
The manpage from Debian's nfs-kernel-server 1:1.0.3-2 says
In order to perform this check, the server must include some
information about the location of the file in the "filehandle"
that is given to the client. This can cause problems with
accessing files that are renamed while a client has them open
(though in many simple cases it will still work).
In this case, the file is not still open at the time it is renamed.
It just still has some dirty pages in the client's memory.
When I set this option on the server then the renamed file gets the
same filehandle and things work properly. I'll suggest to the user
that they should set it.
> Without the latter option enabled, I would indeed expect the
> behaviour that you describe.
It seems a bit unfortunate that we can get corruption unless a special
option is set. Will it work on non-Linux nfs servers?
Wouldn't it still be possible to get the client to flush data out
before renaming it? I tried naively calling nfs_flush_file before
renaming but that didn't seem to do it.
--
Martin
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next prev parent reply other threads:[~2003-08-28 2:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-28 1:03 nfs/mmap/rename file corruption Martin Pool
2003-08-28 1:37 ` Trond Myklebust
2003-08-28 2:14 ` Martin Pool [this message]
2003-08-28 14:04 ` Trond Myklebust
2003-08-29 0:06 ` no_subtree_check questions Bernd Schubert
2003-08-29 5:13 ` Martin Pool
-- strict thread matches above, loose matches on Subject: below --
2003-08-27 8:02 nfs/mmap/rename file corruption Martin Pool
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=20030828121410.4ccc4b45.mbp@sourcefrog.net \
--to=mbp@sourcefrog.net \
--cc=nfs@lists.sourceforge.net \
--cc=trond.myklebust@fys.uio.no \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.