linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Olga Kornievskaia <olga.kornievskaia@gmail.com>
Cc: linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org,
	fweimer@redhat.com, smfrench@gmail.com
Subject: Re: [PATCH v1 02/11] VFS permit cross device vfs_copy_file_range
Date: Sat, 20 Oct 2018 05:05:30 +0100	[thread overview]
Message-ID: <20181020040530.GG32577@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20181019153018.32507-2-olga.kornievskaia@gmail.com>

On Fri, Oct 19, 2018 at 11:30:18AM -0400, Olga Kornievskaia wrote:
> Allow copy_file_range to copy between different superblocks but only
> of the same file system types. This feature was of interest to CIFS
> as well as NFS.

> +	if (file_out->f_op->copy_file_range &&
> +			(file_in->f_op->copy_file_range ==
> +				file_out->f_op->copy_file_range)) {

That is seriously asking for trouble.  If at some point we add
a library function usable as ->copy_file_range() instance, this
will turn into a hard-to-spot problem.

Comparing methods like that is best avoided.  If you want to compare
fs types, do just that - it's not hard.

Another potential issue here is the interplay with local filesystems
using vfs_clone_file_prep_inodes() (or Darrick's series lifting that
into generic code).  There we assume the same block size on both
sides; that is automatically true if they live on the same superblock,
but with your changes it's no longer true.

  parent reply	other threads:[~2018-10-20 12:14 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19 15:30 [PATCH v1 01/11] fs: Don't copy beyond the end of the file Olga Kornievskaia
2018-10-19 15:30 ` [PATCH v1 02/11] VFS permit cross device vfs_copy_file_range Olga Kornievskaia
2018-10-19 15:54   ` Amir Goldstein
2018-10-19 16:14     ` Amir Goldstein
2018-10-19 17:44       ` Matthew Wilcox
2018-10-19 17:58         ` Amir Goldstein
2018-10-19 16:24     ` Olga Kornievskaia
2018-10-19 17:04       ` Olga Kornievskaia
2018-10-20  1:37       ` Steve French
2018-10-19 17:58   ` Matthew Wilcox
2018-10-19 18:47     ` Olga Kornievskaia
2018-10-19 19:06       ` Matthew Wilcox
2018-10-21 13:01         ` Jeff Layton
2018-10-22 18:39         ` Olga Kornievskaia
2018-10-21 14:10     ` Jeff Layton
2018-10-20  4:05   ` Al Viro [this message]
2018-10-20  8:54     ` Amir Goldstein
2018-10-22 18:45       ` Olga Kornievskaia
2018-10-22 19:06         ` Matthew Wilcox
2018-10-22 19:34           ` Olga Kornievskaia
2018-10-22 19:48             ` Amir Goldstein
2018-10-22 20:29               ` Matthew Wilcox
2018-10-22 23:39             ` Jeff Layton
2018-10-23  6:05               ` Amir Goldstein
2018-10-23 15:03                 ` Olga Kornievskaia
2018-10-23 15:30                   ` Olga Kornievskaia
2018-10-23 17:16                     ` Olga Kornievskaia
2018-10-24 11:17                       ` Jeff Layton
2018-10-24 19:59                         ` Olga Kornievskaia
2018-10-25  4:58                           ` Amir Goldstein
2018-10-25 15:58                             ` Olga Kornievskaia
2018-10-25 16:00                               ` Olga Kornievskaia
2018-10-25 16:57                                 ` Amir Goldstein
2018-10-23 15:39                   ` Matthew Wilcox
2018-10-24 11:32                     ` Amir Goldstein
     [not found] <20181019152932.32462-1-olga.kornievskaia@gmail.com>
     [not found] ` <20181019152932.32462-3-olga.kornievskaia@gmail.com>
2018-10-19 16:14   ` Trond Myklebust
2018-10-19 16:26     ` Olga Kornievskaia

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=20181020040530.GG32577@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=fweimer@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=olga.kornievskaia@gmail.com \
    --cc=smfrench@gmail.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 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).