All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: "Drokin, Oleg" <oleg.drokin@intel.com>
Cc: "Hammond, John" <john.hammond@intel.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"Dilger, Andreas" <andreas.dilger@intel.com>
Subject: Re: [RFC] lustre treatment of dentry->d_name
Date: Wed, 22 Oct 2014 03:50:26 +0100	[thread overview]
Message-ID: <20141022025026.GW7996@ZenIV.linux.org.uk> (raw)
In-Reply-To: <D685F8A5-C992-449D-8127-DAB237D1A331@intel.com>

On Wed, Oct 22, 2014 at 01:48:48AM +0000, Drokin, Oleg wrote:

> Ah! I see now.
> We do the "pick alias from a list" for everything, not just for the directories.
> So that difference is still missing and as such there is a fear if we
> convert to d_splice_alias in its current form, dcache would explode
> from all the gazillions of invalid and unhashed dentries we produce during
> operations.

Interesting...  Where do those gazillions come from?  AFAICS, your
->d_revalidate() does that only when you get LOOKUP_OPEN | LOOKUP_CREATE
in flags, i.e. on the final component of pathname at open() with O_CREAT.
Hmm...  So basically you are trying to force them into ->atomic_open()
codepath?  Fine, but... why not simply have ->open() pick what hadn't
gone through ->atomic_open()?

Check what nfs4_file_open() is doing; if you find out that the damn thing
*was* stale (i.e. that you really need a different inode, etc.), it's not
a problem - d_drop() and return -EOPENSTALE; VFS will repeat lookups.
Note that do_dentry_open() doesn't strip O_CREAT from file->f_flags until
after return from ->open().  So you can see O_CREAT in ->open() just
fine - this case is easy to distinguish there.

Incidentally, why the hell do you have separate ll_revalidate_nd() and
ll_revalidate_dentry()?  I realize that it'll be inlined by compiler (the
only call of the latter is tail-call with identical arguments from the
former), but...

Another nasty question: is d_need_statahead() safe in RCU pathwalk mode?
When are ll_dentry_data and ll_inode_info freed?  Ditto for ->lli_sai.
Sure, actual freeing of struct inode and struct dentry is RCU-delayed,
but from the quick glance it seems that freeing those guys isn't...

  reply	other threads:[~2014-10-22  2:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-21  1:13 [RFC] lustre treatment of dentry->d_name Al Viro
2014-10-21  2:55 ` Al Viro
2014-10-21  3:55   ` Drokin, Oleg
2014-10-21  3:46 ` Drokin, Oleg
2014-10-21  4:02   ` Al Viro
2014-10-21 13:34     ` Drokin, Oleg
2014-10-21 21:17       ` Al Viro
2014-10-22  1:48         ` Drokin, Oleg
2014-10-22  2:50           ` Al Viro [this message]
2014-10-22  9:30             ` Drokin, Oleg
2014-10-21 19:30     ` Al Viro
2014-10-22  1:49       ` Drokin, Oleg
2014-10-21 20:07   ` Al Viro
2014-10-22  1:53     ` Drokin, Oleg

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=20141022025026.GW7996@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=andreas.dilger@intel.com \
    --cc=john.hammond@intel.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=oleg.drokin@intel.com \
    /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.