linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>, Christoph Hellwig <hch@lst.de>,
	"linux-unionfs@vger.kernel.org" <linux-unionfs@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] vfs: fix vfs_clone_file_range() for overlayfs files
Date: Fri, 28 Oct 2016 16:25:28 +0200	[thread overview]
Message-ID: <CAJfpegtfa5fBozu7GFFtB+eEHKxdmsg6byysVcLGiWuXHtfL2w@mail.gmail.com> (raw)
In-Reply-To: <1477510441-24861-1-git-send-email-amir73il@gmail.com>

On Wed, Oct 26, 2016 at 9:34 PM, Amir Goldstein <amir73il@gmail.com> wrote:
> With overlayfs, it is wrong to compare file_inode(inode)->i_sb
> of regular files with those of non-regular files, because the
> former reference the real (upper/lower) sb and the latter reference
> the overlayfs sb.
>
> Move the test for same super block after the sanity tests for
> clone range of directory and non-regular file.

Better:  compare ->f_path.dentry->d_sb instead of file_inode()->i_sb.
We don't want to be mixing files that come from overlayfs and ones
that come from the underlying layers.

BTW, would it be worthwhile adding clone_file_range() support to overlayfs?

Thanks,
Miklos

  reply	other threads:[~2016-10-28 14:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26 19:34 [PATCH] vfs: fix vfs_clone_file_range() for overlayfs files Amir Goldstein
2016-10-28 14:25 ` Miklos Szeredi [this message]
2016-10-28 15:25   ` Amir Goldstein
2016-11-03 19:02     ` Amir Goldstein
2016-11-03 20:57       ` 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=CAJfpegtfa5fBozu7GFFtB+eEHKxdmsg6byysVcLGiWuXHtfL2w@mail.gmail.com \
    --to=miklos@szeredi.hu \
    --cc=amir73il@gmail.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --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).