From: fanchaoting <fanchaoting@cn.fujitsu.com>
To: "bfields@fieldses.org" <bfields@fieldses.org>
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: Mon, 26 Nov 2012 13:41:00 +0800 [thread overview]
Message-ID: <50B300EC.5020707@cn.fujitsu.com> (raw)
In-Reply-To: <20121123172056.GA8776@fieldses.org>
bfields@fieldses.org 写道:
> 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.
>
Yes, when I applyed the patch, this problem was solved.
I found when server deleted the file , it can return
"DELEGRETURN" to the nfs client.
> --b.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
next prev parent reply other threads:[~2012-11-26 5:34 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
2012-11-26 5:41 ` fanchaoting [this message]
-- 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=50B300EC.5020707@cn.fujitsu.com \
--to=fanchaoting@cn.fujitsu.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bfields@fieldses.org \
--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).