All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@fb.com>
To: "J. Bruce Fields" <bfields@fieldses.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Cc: <linux-fsdevel@vger.kernel.org>
Subject: Re: find_fh_dentry returned a DISCONNECTED directory
Date: Fri, 14 Feb 2014 09:17:15 -0500	[thread overview]
Message-ID: <52FE256B.1000807@fb.com> (raw)
In-Reply-To: <20140214033030.GC21982@fieldses.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On 02/13/2014 10:30 PM, J. Bruce Fields wrote:
> On Thu, Feb 13, 2014 at 03:45:16PM -0800, Eric W. Biederman wrote:
>> "J. Bruce Fields" <bfields@fieldses.org> writes:
>> 
>>> Yesterday you passed on a report of this printk from nfsdfh.c
>>> firing:
>>> 
>>> printk("nfsd: find_fh_dentry returned a DISCONNECTED directory:
>>> %pd2\n", dentry);
>>> 
>>> I think the dentry probably comes from the FILEID_ROOT case
>>> of:
>>> 
>>> if (fileid_type == FILEID_ROOT) dentry =
>>> dget(exp->ex_path.dentry); else { dentry =
>>> exportfs_decode_fh(exp->ex_path.mnt, fid, data_left,
>>> fileid_type, nfsd_acceptable, exp); }
>>> 
>>> In that case the dentry was found using ordinary filesystem
>>> lookups, so doesn't go through the same DISCONNECTED-clearing
>>> logic as in the case of lookups by filehandle.
>>> 
>>> Probably they have an export root that's not a filesystem root,
>>> and the lookups happened in the right order?
>>> 
>>> I suspect that's fine, and that the printk is just stupid, but
>>> maybe we should clear DISCONNECTED when possible on normal
>>> lookups.  The following is my attempt, though I'm not sure if
>>> d_alloc is the right place to do this.  In any case it might
>>> help confirm this is what's happening.
>>> 
>>> So if you pass along this patch to the person who was seeing
>>> that printk I'd be interested in the results.
>> 
>> I have been reading through the dentry code for other reasons and
>> your patch definitely won't change anything. __d_alloc sets
>> d_flags = 0. Therefore d_alloc always returns with d_flags == 0.
> 
> You're right, of course.  I wasn't thinking straight.
> 
> So the only dentries with DISCONNECTED set are those created with 
> d_obtain_alias, which is normally only used when you're looking up
> by filehandle.
> 
> Except btrfs has a weird use in get_default_root().  So maybe they
> were running into the dentry that created?
> 
> So btrfs should probably be using something else, I'm not sure
> what.
> 

Urgh sorry for the wild goose chase Bruce, I'll fix this up,

Josef
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJS/iVdAAoJEANb+wAKly3BfE0P/2U3wV18Dr4IRzZN/sOIlv4s
4ni9wPbGdOocySmFTvqAFDxixRzbfW+5JCigbFuTZFHpuJTffnCBwoXJVoIrmnWw
dfStqJBOG/yrAKNK+2gV1W8CYdNwKD5/QYt/9MNj+Txn2PQXiNJIPPaiKiiJfyQz
Ht+ABvyTDb00YcsAss5ldbYDVCvZ6UzfWZZ9j2lfDbAL4zsF2p3YUcANTiNKPe01
5crJ1//5bvlFNFAgLqJNJSq1JlHdbD3ANr86Cv1ikDercmvyIeuUY1Yk5kpH/+p+
BqQATQ3qvJ9C6U/sbZyBaNa86Jt7NyxgD4HgmyeTQHtk7H42Jv2HSrnPy31MYF44
VksMTkaSNFrR6RUI88X82JHuax/bhT8MBjBuXbrD50AnFXzZuUT70lcUGDfIoUni
+BgHzaCa06DHgzZCEmnP0/KEy6f5Zty9eEMMgqL30WtZGsKPZA98RsobuV3IVw67
dW6bnmdx9kIZRhyUM/hh8Cqyep7Y54lxBzUtG7KMYZDNP9tZsjCtWxWIq+j9htYW
RJ6KPs9rnjdJoRp7Ca8jGaTbuOa8OmhS62C9sFmmiXbuh40KNbSKea+rO63roUs5
5MwqYjqv8OvHNukxtRQyX2FxZwJojx8IUXf18urJnzvffCOAw2tg47GRkbRKVE51
WqW/C6HcSxxOOUr92Lup
=ZYeX
-----END PGP SIGNATURE-----

  parent reply	other threads:[~2014-02-14 14:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13 21:27 find_fh_dentry returned a DISCONNECTED directory J. Bruce Fields
2014-02-13 23:45 ` Eric W. Biederman
2014-02-14  3:30   ` J. Bruce Fields
2014-02-14  4:25     ` Eric W. Biederman
2014-02-14 14:46       ` J. Bruce Fields
2014-02-14 15:49         ` Eric W. Biederman
2014-02-14 16:14           ` J. Bruce Fields
2014-02-14 16:38             ` Josef Bacik
2014-02-14 16:45               ` J. Bruce Fields
2014-02-14 17:02                 ` Josef Bacik
2014-02-14 17:14                   ` Eric W. Biederman
2014-02-14 17:11               ` Eric W. Biederman
2014-02-14 17:02             ` Eric W. Biederman
2014-02-14 22:19               ` J. Bruce Fields
2014-02-14 22:41                 ` J. Bruce Fields
2014-02-14 14:17     ` Josef Bacik [this message]
2014-02-14 15:13     ` Josef Bacik
2014-02-14 15:38       ` J. Bruce Fields

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=52FE256B.1000807@fb.com \
    --to=jbacik@fb.com \
    --cc=bfields@fieldses.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-fsdevel@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.