From: Nikolay Borisov <nborisov@suse.com>
To: Josef Bacik <josef@toxicpanda.com>,
viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH v2 1/2] btrfs: remove the cross file system checks from remap
Date: Fri, 18 Feb 2022 16:39:57 +0200 [thread overview]
Message-ID: <dc75ed71-608d-13cd-c274-04801619da8a@suse.com> (raw)
In-Reply-To: <ac03eaa51bac7c30ee4b116777ac9eb57573a280.1645194730.git.josef@toxicpanda.com>
On 18.02.22 г. 16:38 ч., Josef Bacik wrote:
> The sb check is already done in do_clone_file_range, and the mnt check
> (which will hopefully go away in a subsequent patch) is done in
> ioctl_file_clone(). Remove the check in our code and put an ASSERT() to
> make sure it doesn't change underneath us.
>
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
> ---
> fs/btrfs/reflink.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c
> index a3930da4eb3f..6fed103f1000 100644
> --- a/fs/btrfs/reflink.c
> +++ b/fs/btrfs/reflink.c
> @@ -772,9 +772,7 @@ static int btrfs_remap_file_range_prep(struct file *file_in, loff_t pos_in,
> if (btrfs_root_readonly(root_out))
> return -EROFS;
>
> - if (file_in->f_path.mnt != file_out->f_path.mnt ||
> - inode_in->i_sb != inode_out->i_sb)
> - return -EXDEV;
> + ASSERT(inode_in->i_sb == inode_out->i_sb);
> }
>
> /* Don't make the dst file partly checksummed */
next prev parent reply other threads:[~2022-02-18 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-18 14:38 [PATCH v2 0/2] fs: allow cross-vfsmount reflink/dedupe Josef Bacik
2022-02-18 14:38 ` [PATCH v2 1/2] btrfs: remove the cross file system checks from remap Josef Bacik
2022-02-18 14:39 ` Nikolay Borisov [this message]
2022-02-18 14:38 ` [PATCH v2 2/2] fs: allow cross-vfsmount reflink/dedupe Josef Bacik
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=dc75ed71-608d-13cd-c274-04801619da8a@suse.com \
--to=nborisov@suse.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@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