* [PATCH] btrfs: Return EXDEV for cross file system snapshot
@ 2014-01-30 7:32 Kusanagi Kouichi
0 siblings, 0 replies; 4+ messages in thread
From: Kusanagi Kouichi @ 2014-01-30 7:32 UTC (permalink / raw)
To: linux-btrfs; +Cc: linux-kernel
EXDEV seems an appropriate error if an operation fails bacause it
crosses file system boundaries.
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
---
fs/btrfs/ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 34772cb..0176045 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1573,7 +1573,7 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
if (src_inode->i_sb != file_inode(file)->i_sb) {
btrfs_info(BTRFS_I(src_inode)->root->fs_info,
"Snapshot src from another FS");
- ret = -EINVAL;
+ ret = -EXDEV;
} else if (!inode_owner_or_capable(src_inode)) {
/*
* Subvolume creation is not restricted, but snapshots
--
1.9.rc1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: Return EXDEV for cross file system snapshot
2014-01-08 10:46 Kusanagi Kouichi
2014-01-08 15:14 ` David Sterba
@ 2014-01-28 15:45 ` Josef Bacik
1 sibling, 0 replies; 4+ messages in thread
From: Josef Bacik @ 2014-01-28 15:45 UTC (permalink / raw)
To: Kusanagi Kouichi, linux-btrfs; +Cc: linux-kernel
On 01/08/2014 05:46 AM, Kusanagi Kouichi wrote:
> EXDEV seems an appropriate error if an operation fails bacause it
> crosses file system boundaries.
>
> Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
> ---
> fs/btrfs/ioctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> index 21da576..15d35cb 100644
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -1544,7 +1544,7 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
> if (src_inode->i_sb != file_inode(file)->i_sb) {
> printk(KERN_INFO "btrfs: Snapshot src from "
> "another FS\n");
> - ret = -EINVAL;
> + ret = -EXDEV;
> } else {
> ret = btrfs_mksubvol(&file->f_path, name, namelen,
> BTRFS_I(src_inode)->root,
Doesn't apply cleanly to btrfs-next, please rebase and try again. Thanks,
Josef
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: Return EXDEV for cross file system snapshot
2014-01-08 10:46 Kusanagi Kouichi
@ 2014-01-08 15:14 ` David Sterba
2014-01-28 15:45 ` Josef Bacik
1 sibling, 0 replies; 4+ messages in thread
From: David Sterba @ 2014-01-08 15:14 UTC (permalink / raw)
To: Kusanagi Kouichi; +Cc: linux-btrfs, linux-kernel
On Wed, Jan 08, 2014 at 07:46:19PM +0900, Kusanagi Kouichi wrote:
> EXDEV seems an appropriate error if an operation fails bacause it
> crosses file system boundaries.
>
> Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
Reviewed-by: David Sterba <dsterba@suse.cz>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] btrfs: Return EXDEV for cross file system snapshot
@ 2014-01-08 10:46 Kusanagi Kouichi
2014-01-08 15:14 ` David Sterba
2014-01-28 15:45 ` Josef Bacik
0 siblings, 2 replies; 4+ messages in thread
From: Kusanagi Kouichi @ 2014-01-08 10:46 UTC (permalink / raw)
To: linux-btrfs; +Cc: linux-kernel
EXDEV seems an appropriate error if an operation fails bacause it
crosses file system boundaries.
Signed-off-by: Kusanagi Kouichi <slash@ac.auone-net.jp>
---
fs/btrfs/ioctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 21da576..15d35cb 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1544,7 +1544,7 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
if (src_inode->i_sb != file_inode(file)->i_sb) {
printk(KERN_INFO "btrfs: Snapshot src from "
"another FS\n");
- ret = -EINVAL;
+ ret = -EXDEV;
} else {
ret = btrfs_mksubvol(&file->f_path, name, namelen,
BTRFS_I(src_inode)->root,
--
1.8.5.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-30 7:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-30 7:32 [PATCH] btrfs: Return EXDEV for cross file system snapshot Kusanagi Kouichi
-- strict thread matches above, loose matches on Subject: below --
2014-01-08 10:46 Kusanagi Kouichi
2014-01-08 15:14 ` David Sterba
2014-01-28 15:45 ` Josef Bacik
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.