From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Miklos Szeredi <miklos@szeredi.hu>, Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
David Howells <dhowells@redhat.com>
Subject: Re: [PATCH 1/3] vfs: merge .d_select_inode() into .d_real()
Date: Sun, 22 May 2016 09:39:33 -0700 [thread overview]
Message-ID: <1463935173.2257.6.camel@HansenPartnership.com> (raw)
In-Reply-To: <20160517215326.GA1589@veci.piliscsaba.szeredi.hu>
On Tue, 2016-05-17 at 23:53 +0200, Miklos Szeredi wrote:
> The two methods essentially do the same: find the real dentry/inode
> belonging to an overlay dentry. The difference is in the usage:
>
> vfs_open() uses ->d_select_inode() and expects the function to
> perform copy-up if necessary based on the open flags argument.
>
> file_dentry() uses ->d_real() passing in the overlay dentry as well
> as the underlying inode.
>
> vfs_rename() uses ->d_select_inode() but passes zero flags.
> ->d_real() with a zero inode would have worked just as well here.
>
> This patch merges the functionality of ->d_select_inode() into
> ->d_real() by adding an 'open_flags' argument to the latter.
Actually, before you do this, I have a use case for keeping them
separate: The shiftfs prototype I've posted cannot use d_select_inode
because it's shifting the uid/gids, so the inode permissions have to be
done on the upper inode. However, several filesystems make use of
file_dentry() and for them, I need to supply the lower dentry, so I end
up setting d_real but not d_select_inode.
for me, then vfs_open and vfs_rename have to operate on the upper inode
but all uses of file_dentry should return the lower dentry.
James
next prev parent reply other threads:[~2016-05-22 16:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-17 21:53 [PATCH 1/3] vfs: merge .d_select_inode() into .d_real() Miklos Szeredi
2016-05-17 21:55 ` [PATCH 2/3] vfs: document ->d_real() Miklos Szeredi
2016-05-17 21:57 ` [PATCH 3/3] vfs: clean up documentation Miklos Szeredi
2016-05-22 16:39 ` James Bottomley [this message]
2016-05-27 8:14 ` [PATCH 1/3] vfs: merge .d_select_inode() into .d_real() Miklos Szeredi
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=1463935173.2257.6.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=dhowells@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=viro@ZenIV.linux.org.uk \
/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).