linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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
* [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

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-08 10:46 [PATCH] btrfs: Return EXDEV for cross file system snapshot Kusanagi Kouichi
2014-01-08 15:14 ` David Sterba
2014-01-28 15:45 ` Josef Bacik
  -- strict thread matches above, loose matches on Subject: below --
2014-01-30  7:32 Kusanagi Kouichi

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).