linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Goldwyn Rodrigues <rgoldwyn@suse.de>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
	"linux-unionfs@vger.kernel.org" <linux-unionfs@vger.kernel.org>,
	Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	David Howells <dhowells@redhat.com>,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH 3/3] nfs: Store and use inode in nfs_open_context
Date: Thu, 3 Mar 2016 09:16:33 +0100	[thread overview]
Message-ID: <CAJfpegtwDD4Qaect-5qzvG80vnn44iKawYCeTqQKneSK-FU3Lg@mail.gmail.com> (raw)
In-Reply-To: <56D70D64.9010705@suse.de>

On Wed, Mar 2, 2016 at 4:57 PM, Goldwyn Rodrigues <rgoldwyn@suse.de> wrote:
> On 03/02/2016 08:43 AM, Miklos Szeredi wrote:

>> Not sure how any dentry seen by NFS became associated with overlayfs.
>> Through ->f_path by any chance?
>>
>
> Yes, NFS extracts dentry from filp->f_path.dentry in fs/nfs/inode.c
> nfs_open(). What can it use to evaluate dentry?

Commit 4bacc9c9234c ("overlayfs: Make f_path always point to the
overlay and f_inode to the underlay") broke this.  Breakage only
affects regular files.  Accessing file->f_path.dentry->d_name (and
"%pD" format etc) is OK for everything.   ->d_fsdata is not OK.

I have no idea what the plan was with filesystems that use
f_path.dentry a separate open file for them.  David?  Al?

My plan was to introduce a file_dentry() helper that MUST be used by
filesystems to get the dentry from the file and that makes sure it's
the right one (check against file_inode()).   If not, then we could
call into overlayfs to return the right one, similar to
->d_select_inode(), except we want to have a dentry and we want to
have *a particular dentry* matching file_inode() (the file could have
been copied up in the mean time).

Thanks,
Miklos

Thanks,
Miklos

  reply	other threads:[~2016-03-03  8:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-01 18:12 [PATCH 0/3] Fix overlayfs with NFS as lowerdir Goldwyn Rodrigues
2016-03-01 18:12 ` [PATCH 1/3] ovl: Add d_select_inode to reval dentry operations Goldwyn Rodrigues
2016-03-01 18:12 ` [PATCH 2/3] vfs: Add d_select_inode for overlayfs translation Goldwyn Rodrigues
2016-03-01 18:12 ` [PATCH 3/3] nfs: Store and use inode in nfs_open_context Goldwyn Rodrigues
2016-03-01 20:46   ` Trond Myklebust
2016-03-02 14:27     ` Goldwyn Rodrigues
2016-03-02 14:31       ` Trond Myklebust
2016-03-02 14:38         ` Trond Myklebust
2016-03-02 14:43           ` Miklos Szeredi
2016-03-02 15:57             ` Goldwyn Rodrigues
2016-03-03  8:16               ` Miklos Szeredi [this message]
2016-03-04 10:17                 ` Miklos Szeredi
2016-03-04 13:41                   ` Trond Myklebust
2016-03-04 14:52                     ` Goldwyn Rodrigues

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=CAJfpegtwDD4Qaect-5qzvG80vnn44iKawYCeTqQKneSK-FU3Lg@mail.gmail.com \
    --to=miklos@szeredi.hu \
    --cc=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=rgoldwyn@suse.de \
    --cc=trond.myklebust@primarydata.com \
    --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).