linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "bfields@fieldses.org" <bfields@fieldses.org>
To: fanchaoting <fanchaoting@cn.fujitsu.com>
Cc: "Myklebust, Trond" <Trond.Myklebust@netapp.com>,
	"linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: nfs cache bug (when server delete the file ,nfs client can read file also)
Date: Fri, 23 Nov 2012 12:20:56 -0500	[thread overview]
Message-ID: <20121123172056.GA8776@fieldses.org> (raw)
In-Reply-To: <50AF10ED.3070208@cn.fujitsu.com>

On Fri, Nov 23, 2012 at 02:00:13PM +0800, fanchaoting wrote:
> Myklebust, Trond 写道:
> > On Fri, 2012-11-23 at 13:23 +0800, fanchaoting wrote:
> >> Myklebust, Trond 写道:
> >>> On Fri, 2012-11-23 at 12:18 +0800, fanchaoting wrote:
> >>>> I think  when the nfs server delete the file ,
> >>>> the  server should notice the nfs client,
> >>>> but the upstream kernel does't this.
> >>> So is this a problem with the client or the server? In other words, if
> >>> you use a different server/client combination, do you see a different
> >>> result?
> >>>
> >> I think that the server has the problem .when the server deletes the file ,
> >> it should notice the client immediately.
> > 
> > There is no notification mechanism in NFS; on open(), the client is
> > supposed to revalidate its cached information and the server is supposed
> > to return an ESTALE error if the filehandle is no longer valid. Either
> > one of these 2 mechanisms (client revalidation or server reply) could be
> > going wrong here, which is why I'm asking.
> 
> I found J. Bruce Fields's patch(break delegations on unlink)  maybe solve this problem .
> But I did't found it in the upstream kernel.

Yes, still working on getting that merged.  Next step is probably to
rebase it on top of jlayton's ESTALE patches, assuming those will go in
first.  In theory they could make 3.8 but that may be optimistic.

--b.

  reply	other threads:[~2012-11-23 17:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-23  4:18 nfs cache bug (when server delete the file ,nfs client can read file also) fanchaoting
2012-11-23  5:11 ` Myklebust, Trond
2012-11-23  5:23   ` fanchaoting
2012-11-23  5:36     ` Myklebust, Trond
2012-11-23  6:00       ` fanchaoting
2012-11-23 17:20         ` bfields [this message]
2012-11-26  5:41           ` fanchaoting
  -- strict thread matches above, loose matches on Subject: below --
2012-11-23  4:32 fanchaoting

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=20121123172056.GA8776@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=Trond.Myklebust@netapp.com \
    --cc=fanchaoting@cn.fujitsu.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).