linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* nfsd dropping requests after lazy umount
@ 2013-06-25 19:10 Malahal Naineni
  2013-07-01 20:26 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Malahal Naineni @ 2013-06-25 19:10 UTC (permalink / raw)
  To: linux-nfs; +Cc: bfields

Hi All,

I have found an issue with lazy/forced unmounts with nfsd. Let us say
/nfs is a mount point, and we are exporting /nfs/exp directory.

After mounting from a client, this export will have a cache entry
"svc_export" in the kernel. The exports pathname
d_path(svc_export->ex_path) correctly resolves to "/nfs/exp"

After the /nfs is lazy unmounted, the d_path(svc_export->ex_path)
resolves to "/exp" only.

Now, if the cache entry needs revalidation, you will see "/exp" in the
nfsd.export/channel file that never gets cleared as that cache entry
will be in a forever CACHE_PENDING state. We will also see
svc_export_parse() failing with -2 err as such a pathname doesn't exist
in the system any more.

I noticed that svc_export has two fields: ex_path and ex_pathname.  Is
it possible to make a string comparison of d_path(ex_path) and
ex_pathname? If so, we should be able to fail the upcall without making
the upcall if those two don't match.

Regards, Malahal.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: nfsd dropping requests after lazy umount
  2013-06-25 19:10 nfsd dropping requests after lazy umount Malahal Naineni
@ 2013-07-01 20:26 ` J. Bruce Fields
  0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2013-07-01 20:26 UTC (permalink / raw)
  To: linux-nfs

On Tue, Jun 25, 2013 at 02:10:08PM -0500, Malahal Naineni wrote:
> Hi All,
> 
> I have found an issue with lazy/forced unmounts with nfsd. Let us say
> /nfs is a mount point, and we are exporting /nfs/exp directory.
> 
> After mounting from a client, this export will have a cache entry
> "svc_export" in the kernel. The exports pathname
> d_path(svc_export->ex_path) correctly resolves to "/nfs/exp"
> 
> After the /nfs is lazy unmounted, the d_path(svc_export->ex_path)
> resolves to "/exp" only.
> 
> Now, if the cache entry needs revalidation, you will see "/exp" in the
> nfsd.export/channel file that never gets cleared as that cache entry
> will be in a forever CACHE_PENDING state. We will also see
> svc_export_parse() failing with -2 err as such a pathname doesn't exist
> in the system any more.

So, mountd is trying to do a downcall for "/exp" but it's failing
because the kern_path("/exp",.,.) fails?

> I noticed that svc_export has two fields: ex_path and ex_pathname.

Not any more--see 2f1ddda1749a223d1a05e16dc6ea28632b9ec570 "NFSD: Remove
the ex_pathname field from struct svc_export".

--b.

> Is
> it possible to make a string comparison of d_path(ex_path) and
> ex_pathname? If so, we should be able to fail the upcall without making
> the upcall if those two don't match.
> 
> Regards, Malahal.
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-01 20:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-25 19:10 nfsd dropping requests after lazy umount Malahal Naineni
2013-07-01 20:26 ` J. Bruce Fields

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).