Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
This commit is contained in:
@@ -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;
|
||||
|
||||
|
@@ -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:
|
||||
|
@@ -1269,14 +1269,14 @@ xfs_fs_remount(
|
||||
* need to take care of the metadata. Once that's done write a dummy
|
||||
* record to dirty the log in case of a crash while frozen.
|
||||
*/
|
||||
STATIC void
|
||||
xfs_fs_lockfs(
|
||||
STATIC int
|
||||
xfs_fs_freeze(
|
||||
struct super_block *sb)
|
||||
{
|
||||
struct xfs_mount *mp = XFS_M(sb);
|
||||
|
||||
xfs_quiesce_attr(mp);
|
||||
xfs_fs_log_dummy(mp);
|
||||
return -xfs_fs_log_dummy(mp);
|
||||
}
|
||||
|
||||
STATIC int
|
||||
@@ -1557,7 +1557,7 @@ static struct super_operations xfs_super_operations = {
|
||||
.put_super = xfs_fs_put_super,
|
||||
.write_super = xfs_fs_write_super,
|
||||
.sync_fs = xfs_fs_sync_super,
|
||||
.write_super_lockfs = xfs_fs_lockfs,
|
||||
.freeze_fs = xfs_fs_freeze,
|
||||
.statfs = xfs_fs_statfs,
|
||||
.remount_fs = xfs_fs_remount,
|
||||
.show_options = xfs_fs_show_options,
|
||||
|
@@ -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)
|
||||
|
@@ -595,17 +595,19 @@ out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
xfs_fs_log_dummy(
|
||||
xfs_mount_t *mp)
|
||||
{
|
||||
xfs_trans_t *tp;
|
||||
xfs_inode_t *ip;
|
||||
int error;
|
||||
|
||||
tp = _xfs_trans_alloc(mp, XFS_TRANS_DUMMY1);
|
||||
if (xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0)) {
|
||||
error = xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0);
|
||||
if (error) {
|
||||
xfs_trans_cancel(tp, 0);
|
||||
return;
|
||||
return error;
|
||||
}
|
||||
|
||||
ip = mp->m_rootip;
|
||||
@@ -615,9 +617,10 @@ xfs_fs_log_dummy(
|
||||
xfs_trans_ihold(tp, ip);
|
||||
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
|
||||
xfs_trans_set_sync(tp);
|
||||
xfs_trans_commit(tp, 0);
|
||||
error = xfs_trans_commit(tp, 0);
|
||||
|
||||
xfs_iunlock(ip, XFS_ILOCK_EXCL);
|
||||
return error;
|
||||
}
|
||||
|
||||
int
|
||||
|
@@ -25,6 +25,6 @@ extern int xfs_fs_counts(xfs_mount_t *mp, xfs_fsop_counts_t *cnt);
|
||||
extern int xfs_reserve_blocks(xfs_mount_t *mp, __uint64_t *inval,
|
||||
xfs_fsop_resblks_t *outval);
|
||||
extern int xfs_fs_goingdown(xfs_mount_t *mp, __uint32_t inflags);
|
||||
extern void xfs_fs_log_dummy(xfs_mount_t *mp);
|
||||
extern int xfs_fs_log_dummy(xfs_mount_t *mp);
|
||||
|
||||
#endif /* __XFS_FSOPS_H__ */
|
||||
|
Reference in New Issue
Block a user