All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luis de Bethencourt <luisbg@osg.samsung.com>
To: NeilBrown <neilb@suse.com>, linux-fsdevel@vger.kernel.org
Cc: Richard Weinberger <richard@nod.at>, linux-nfs@vger.kernel.org
Subject: Re: When is export_operations.get_parent triggered?
Date: Sun, 06 Nov 2016 12:24:20 +0000	[thread overview]
Message-ID: <581F20F4.2040304@osg.samsung.com> (raw)
In-Reply-To: <8760o1pose.fsf@notabene.neil.brown.name>

On 05/11/16 22:03, NeilBrown wrote:
> On Sat, Nov 05 2016, Luis de Bethencourt wrote:
> 
>> Hi all,
>>
>> I recently played with adding the basics to make befs exportable via NFS [0].
>>
>> I want to implement the get_parent member of the export_operations struct as
>> well, but I can't seem to trigger this member being called. I have implemented
>> a solution which I feel is wrong [1], but want to be able to test it before
>> moving forward.
>>
>> When is this member triggered? Any advice?
> 
> This is required when a filehandle for a directory arrives, but the
> directory is not in the dcache.
> NFSD needs to find dentries for the directory, the parent, the
> grandparent etc all the way up to the root.
> 
> The simplest way to trigger this is to mount the filesystem onto a
> different machine, 'cd' into a fairly deep directory, then reboot the
> server (or unexport, unmount, remount, re-export).
> Now 'ls -l' on the client.  That should trigger calls to ->get_parent.
> 
> ->get_parent() is a log like performing a lookup of "..".
> 
> NeilBrown
> 

Nice!

This makes a lot of sense. I just rebooted the server and saw the get_parent
being called. Before I was mistakenly trying without a reboot, but thanks to your
explanation now understand this better, the directory was still in the dcache and
it was using this instead.

Thank you Neil,
Luis

  reply	other threads:[~2016-11-06 12:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-05 12:59 When is export_operations.get_parent triggered? Luis de Bethencourt
2016-11-05 22:03 ` NeilBrown
2016-11-06 12:24   ` Luis de Bethencourt [this message]
2016-11-07 17:34     ` J. Bruce Fields
2016-11-08 15:49       ` Luis de Bethencourt

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=581F20F4.2040304@osg.samsung.com \
    --to=luisbg@osg.samsung.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.com \
    --cc=richard@nod.at \
    /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.