All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: remove the cross file system checks from remap
@ 2022-02-16 20:06 Josef Bacik
  2022-02-16 21:37 ` David Sterba
  2022-02-18 13:15 ` Nikolay Borisov
  0 siblings, 2 replies; 4+ messages in thread
From: Josef Bacik @ 2022-02-16 20:06 UTC (permalink / raw)
  To: linux-btrfs, kernel-team

This is handled in the generic VFS helper, we do not need to duplicate
this inside of btrfs.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
---
 fs/btrfs/reflink.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c
index a3930da4eb3f..4425030e09cb 100644
--- a/fs/btrfs/reflink.c
+++ b/fs/btrfs/reflink.c
@@ -771,10 +771,6 @@ 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;
 	}
 
 	/* Don't make the dst file partly checksummed */
-- 
2.26.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: remove the cross file system checks from remap
  2022-02-16 20:06 [PATCH] btrfs: remove the cross file system checks from remap Josef Bacik
@ 2022-02-16 21:37 ` David Sterba
  2022-02-18 13:15 ` Nikolay Borisov
  1 sibling, 0 replies; 4+ messages in thread
From: David Sterba @ 2022-02-16 21:37 UTC (permalink / raw)
  To: Josef Bacik; +Cc: linux-btrfs, kernel-team

On Wed, Feb 16, 2022 at 03:06:26PM -0500, Josef Bacik wrote:
> This is handled in the generic VFS helper, we do not need to duplicate
> this inside of btrfs.
> 
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
>  fs/btrfs/reflink.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c
> index a3930da4eb3f..4425030e09cb 100644
> --- a/fs/btrfs/reflink.c
> +++ b/fs/btrfs/reflink.c
> @@ -771,10 +771,6 @@ 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;

Should the super block check be at least an assert?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: remove the cross file system checks from remap
  2022-02-16 20:06 [PATCH] btrfs: remove the cross file system checks from remap Josef Bacik
  2022-02-16 21:37 ` David Sterba
@ 2022-02-18 13:15 ` Nikolay Borisov
  2022-02-18 13:22   ` Nikolay Borisov
  1 sibling, 1 reply; 4+ messages in thread
From: Nikolay Borisov @ 2022-02-18 13:15 UTC (permalink / raw)
  To: Josef Bacik, linux-btrfs, kernel-team



On 16.02.22 г. 22:06 ч., Josef Bacik wrote:
> This is handled in the generic VFS helper, we do not need to duplicate
> this inside of btrfs.
> 
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
> ---
>   fs/btrfs/reflink.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c
> index a3930da4eb3f..4425030e09cb 100644
> --- a/fs/btrfs/reflink.c
> +++ b/fs/btrfs/reflink.c
> @@ -771,10 +771,6 @@ 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;

Where exactly is this check performed in the vfs because I can't see 
anything in generic_remap_file_range_prep.

>   	}
>   
>   	/* Don't make the dst file partly checksummed */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: remove the cross file system checks from remap
  2022-02-18 13:15 ` Nikolay Borisov
@ 2022-02-18 13:22   ` Nikolay Borisov
  0 siblings, 0 replies; 4+ messages in thread
From: Nikolay Borisov @ 2022-02-18 13:22 UTC (permalink / raw)
  To: Josef Bacik, linux-btrfs, kernel-team



On 18.02.22 г. 15:15 ч., Nikolay Borisov wrote:
> 
> 
> On 16.02.22 г. 22:06 ч., Josef Bacik wrote:
>> This is handled in the generic VFS helper, we do not need to duplicate
>> this inside of btrfs.
>>
>> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
>> ---
>>   fs/btrfs/reflink.c | 4 ----
>>   1 file changed, 4 deletions(-)
>>
>> diff --git a/fs/btrfs/reflink.c b/fs/btrfs/reflink.c
>> index a3930da4eb3f..4425030e09cb 100644
>> --- a/fs/btrfs/reflink.c
>> +++ b/fs/btrfs/reflink.c
>> @@ -771,10 +771,6 @@ 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;
> 
> Where exactly is this check performed in the vfs because I can't see 
> anything in generic_remap_file_range_prep.


Ah it depends on another patch in the ML which is not part of the same 
series. Fair enough, though I agree with David's suggestion to have an 
assert just in case.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>

> 
>>       }
>>       /* Don't make the dst file partly checksummed */

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-18 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16 20:06 [PATCH] btrfs: remove the cross file system checks from remap Josef Bacik
2022-02-16 21:37 ` David Sterba
2022-02-18 13:15 ` Nikolay Borisov
2022-02-18 13:22   ` Nikolay Borisov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.