Skip to content

Commit

Permalink
filesystem freeze: remove XFS specific ioctl interfaces for freeze fe…
Browse files Browse the repository at this point in the history
…ature

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 <[email protected]>
Signed-off-by: Takashi Sato <[email protected]>
Cc: Dave Chinner <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Dave Kleikamp <[email protected]>
Cc: Alasdair G Kergon <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Takashi Sato authored and torvalds committed Jan 10, 2009
1 parent fcccf50 commit 8e96187
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
15 changes: 0 additions & 15 deletions fs/xfs/linux-2.6/xfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1546,21 +1546,6 @@ xfs_file_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;

Expand Down
2 changes: 0 additions & 2 deletions fs/xfs/linux-2.6/xfs_ioctl32.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,6 @@ xfs_file_compat_ioctl(
case XFS_IOC_SET_RESBLKS:
case XFS_IOC_GET_RESBLKS:
case XFS_IOC_FSGROWFSLOG:
case XFS_IOC_FREEZE:
case XFS_IOC_THAW:
case XFS_IOC_GOINGDOWN:
case XFS_IOC_ERROR_INJECTION:
case XFS_IOC_ERROR_CLEARALL:
Expand Down
4 changes: 2 additions & 2 deletions fs/xfs/xfs_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ typedef struct xfs_handle {
#define XFS_IOC_ERROR_INJECTION _IOW ('X', 116, struct xfs_error_injection)
#define XFS_IOC_ERROR_CLEARALL _IOW ('X', 117, struct xfs_error_injection)
/* XFS_IOC_ATTRCTL_BY_HANDLE -- deprecated 118 */
#define XFS_IOC_FREEZE _IOWR('X', 119, int)
#define XFS_IOC_THAW _IOWR('X', 120, int)
/* XFS_IOC_FREEZE -- FIFREEZE 119 */
/* XFS_IOC_THAW -- FITHAW 120 */
#define XFS_IOC_FSSETDM_BY_HANDLE _IOW ('X', 121, struct xfs_fsop_setdm_handlereq)
#define XFS_IOC_ATTRLIST_BY_HANDLE _IOW ('X', 122, struct xfs_fsop_attrlist_handlereq)
#define XFS_IOC_ATTRMULTI_BY_HANDLE _IOW ('X', 123, struct xfs_fsop_attrmulti_handlereq)
Expand Down

0 comments on commit 8e96187

Please sign in to comment.