[RFC PATCH 2/3] Remove XFS specific ioctl interfaces for freeze feature

Previous thread: [RFC PATCH 1/3] Implement generic freeze feature by Takashi Sato on Tuesday, April 1, 2008 - 5:17 am. (1 message)

Next thread: [RFC PATCH 3/3] Add timeout feature by Takashi Sato on Tuesday, April 1, 2008 - 5:22 am. (1 message)
From: Takashi Sato
Date: Tuesday, April 1, 2008 - 5:18 am

It removes XFS specific ioctl interfaces and request codes
for freeze feature.
This patch has been supplied by David Chinner.

Signed-off-by: Dave Chinner <dgc@sgi.com>
Signed-off-by: Takashi Sato <t-sato@yk.jp.nec.com>
---
 linux-2.6/xfs_ioctl.c   |   15 ---------------
 linux-2.6/xfs_ioctl32.c |    2 --
 xfs_fs.h                |    4 ++--
 3 files changed, 2 insertions(+), 19 deletions(-)

diff -uprN -X /home/sho/pub/MC/freeze-set/dontdiff linux-2.6.25-rc7-freeze/fs/xfs/linux-2.6/xfs_ioctl.c linux-2.6.25-rc7
-xfs/fs/xfs/linux-2.6/xfs_ioctl.c
--- linux-2.6.25-rc7-freeze/fs/xfs/linux-2.6/xfs_ioctl.c	2008-04-01 13:22:43.000000000 +0900
+++ linux-2.6.25-rc7-xfs/fs/xfs/linux-2.6/xfs_ioctl.c	2008-04-01 14:34:21.000000000 +0900
@@ -906,21 +906,6 @@ xfs_ioctl(
 		return -error;
 	}
 
-	case XFS_IOC_FREEZE:
-		if (!capable(CAP_SYS_ADMIN))
-			return -EPERM;
-
-		if (inode->i_sb->s_frozen == SB_UNFROZEN)
-			freeze_bdev(inode->i_sb->s_bdev);
-		return 0;
-
-	case XFS_IOC_THAW:
-		if (!capable(CAP_SYS_ADMIN))
-			return -EPERM;
-		if (inode->i_sb->s_frozen != SB_UNFROZEN)
-			thaw_bdev(inode->i_sb->s_bdev, inode->i_sb);
-		return 0;
-
 	case XFS_IOC_GOINGDOWN: {
 		__uint32_t in;
 
diff -uprN -X /home/sho/pub/MC/freeze-set/dontdiff linux-2.6.25-rc7-freeze/fs/xfs/linux-2.6/xfs_ioctl32.c linux-2.6.25-r
c7-xfs/fs/xfs/linux-2.6/xfs_ioctl32.c
--- linux-2.6.25-rc7-freeze/fs/xfs/linux-2.6/xfs_ioctl32.c	2008-04-01 13:22:43.000000000 +0900
+++ linux-2.6.25-rc7-xfs/fs/xfs/linux-2.6/xfs_ioctl32.c	2008-04-01 14:31:59.000000000 +0900
@@ -398,8 +398,6 @@ xfs_compat_ioctl(
 	case XFS_IOC_FSGROWFSDATA:
 	case XFS_IOC_FSGROWFSLOG:
 	case XFS_IOC_FSGROWFSRT:
-	case XFS_IOC_FREEZE:
-	case XFS_IOC_THAW:
 	case XFS_IOC_GOINGDOWN:
 	case XFS_IOC_ERROR_INJECTION:
 	case XFS_IOC_ERROR_CLEARALL:
diff -uprN -X /home/sho/pub/MC/freeze-set/dontdiff linux-2.6.25-rc7-freeze/fs/xfs/xfs_fs.h linux-2.6.25-rc7-xfs/fs/xfs/x
fs_fs.h
--- linux-2.6.25-rc7-freeze/fs/xfs/xfs_fs.h	2008-04-01 ...
Previous thread: [RFC PATCH 1/3] Implement generic freeze feature by Takashi Sato on Tuesday, April 1, 2008 - 5:17 am. (1 message)

Next thread: [RFC PATCH 3/3] Add timeout feature by Takashi Sato on Tuesday, April 1, 2008 - 5:22 am. (1 message)