All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Kirby <sim@hostway.ca>
To: linux-nfs@vger.kernel.org
Subject: New file doesn't show up if cached as missing
Date: Fri, 29 May 2009 10:52:43 -0700	[thread overview]
Message-ID: <20090529175243.GA30961@hostway.ca> (raw)

Hello!

On Linux 2.6.28.10 server and client, with NFSv3 or NFSv4, I can
fairly easily reproduce a case where creating a file (open,write,close)
and then attempting to open it on another client mounting the same server
returns ENOENT.  If I run "ls" before I try to cat it, it works.

To reproduce:

ssh root@lps01 'rm -f /shared/ssl/test; stat /shared/ssl/test'; \
ssh root@lps02 'echo hi > /shared/ssl/test'; \
ssh root@lps01 'cat /shared/ssl/test'

The original stat (or cat or open) is important as it seems to cache that
the file does not exist.  I can then even log in and poke around:

lps01:~# cd /shared
lps01:/shared# cat test
cat: test: No such file or directory
lps01:/shared# stat test
stat: cannot stat `test': No such file or directory
lps01:/shared# ls test
ls: test: No such file or directory
lps01:/shared# ls
<files including "test">
lps01lsh:/shared# cat test
hi

Is this expected behaviour?  The file system is mounted on both clients
with: rw,hard,intr,...,acdirmin=0,acdirmax=0,acregmin=0,acregmax=0,noac

(eg: we can't find a way to make it not happen.)

Cheers,

Simon-

             reply	other threads:[~2009-05-29 18:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-29 17:52 Simon Kirby [this message]
2009-05-29 18:36 ` New file doesn't show up if cached as missing Trond Myklebust
2009-05-29 22:04   ` Simon Kirby
2009-05-29 22:16     ` Trond Myklebust

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=20090529175243.GA30961@hostway.ca \
    --to=sim@hostway.ca \
    --cc=linux-nfs@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 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.