diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2009-01-14 00:29:08 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2009-01-14 00:29:08 -0500 |
commit | c088f4e9da74b901f7ed1749ad697d77622ed0f9 (patch) | |
tree | 84cddf20369f82f10c1c3712e6cce20dd1b9d863 /fs/xfs | |
parent | ce79735c12d62c3cda38eb31762cf98e87c7b087 (diff) | |
parent | a6525042bfdfcab128bd91fad264de10fd24a55e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl.c | 15 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_ioctl32.c | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_super.c | 8 | ||||
-rw-r--r-- | fs/xfs/xfs_fs.h | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_fsops.c | 11 | ||||
-rw-r--r-- | fs/xfs/xfs_fsops.h | 2 |
6 files changed, 14 insertions, 28 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index 67205f6198ba..e5be1e0be802 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c | |||
@@ -1546,21 +1546,6 @@ xfs_file_ioctl( | |||
1546 | return -error; | 1546 | return -error; |
1547 | } | 1547 | } |
1548 | 1548 | ||
1549 | case XFS_IOC_FREEZE: | ||
1550 | if (!capable(CAP_SYS_ADMIN)) | ||
1551 | return -EPERM; | ||
1552 | |||
1553 | if (inode->i_sb->s_frozen == SB_UNFROZEN) | ||
1554 | freeze_bdev(inode->i_sb->s_bdev); | ||
1555 | return 0; | ||
1556 | |||
1557 | case XFS_IOC_THAW: | ||
1558 | if (!capable(CAP_SYS_ADMIN)) | ||
1559 | return -EPERM; | ||
1560 | if (inode->i_sb->s_frozen != SB_UNFROZEN) | ||
1561 | thaw_bdev(inode->i_sb->s_bdev, inode->i_sb); | ||
1562 | return 0; | ||
1563 | |||
1564 | case XFS_IOC_GOINGDOWN: { | 1549 | case XFS_IOC_GOINGDOWN: { |
1565 | __uint32_t in; | 1550 | __uint32_t in; |
1566 | 1551 | ||
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c index 0504cece9f66..50903ad3182e 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl32.c +++ b/fs/xfs/linux-2.6/xfs_ioctl32.c | |||
@@ -632,8 +632,6 @@ xfs_file_compat_ioctl( | |||
632 | case XFS_IOC_SET_RESBLKS: | 632 | case XFS_IOC_SET_RESBLKS: |
633 | case XFS_IOC_GET_RESBLKS: | 633 | case XFS_IOC_GET_RESBLKS: |
634 | case XFS_IOC_FSGROWFSLOG: | 634 | case XFS_IOC_FSGROWFSLOG: |
635 | case XFS_IOC_FREEZE: | ||
636 | case XFS_IOC_THAW: | ||
637 | case XFS_IOC_GOINGDOWN: | 635 | case XFS_IOC_GOINGDOWN: |
638 | case XFS_IOC_ERROR_INJECTION: | 636 | case XFS_IOC_ERROR_INJECTION: |
639 | case XFS_IOC_ERROR_CLEARALL: | 637 | case XFS_IOC_ERROR_CLEARALL: |
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c index be846d606ae8..95a971080368 100644 --- a/fs/xfs/linux-2.6/xfs_super.c +++ b/fs/xfs/linux-2.6/xfs_super.c | |||
@@ -1269,14 +1269,14 @@ xfs_fs_remount( | |||
1269 | * need to take care of the metadata. Once that's done write a dummy | 1269 | * need to take care of the metadata. Once that's done write a dummy |
1270 | * record to dirty the log in case of a crash while frozen. | 1270 | * record to dirty the log in case of a crash while frozen. |
1271 | */ | 1271 | */ |
1272 | STATIC void | 1272 | STATIC int |
1273 | xfs_fs_lockfs( | 1273 | xfs_fs_freeze( |
1274 | struct super_block *sb) | 1274 | struct super_block *sb) |
1275 | { | 1275 | { |
1276 | struct xfs_mount *mp = XFS_M(sb); | 1276 | struct xfs_mount *mp = XFS_M(sb); |
1277 | 1277 | ||
1278 | xfs_quiesce_attr(mp); | 1278 | xfs_quiesce_attr(mp); |
1279 | xfs_fs_log_dummy(mp); | 1279 | return -xfs_fs_log_dummy(mp); |
1280 | } | 1280 | } |
1281 | 1281 | ||
1282 | STATIC int | 1282 | STATIC int |
@@ -1557,7 +1557,7 @@ static struct super_operations xfs_super_operations = { | |||
1557 | .put_super = xfs_fs_put_super, | 1557 | .put_super = xfs_fs_put_super, |
1558 | .write_super = xfs_fs_write_super, | 1558 | .write_super = xfs_fs_write_super, |
1559 | .sync_fs = xfs_fs_sync_super, | 1559 | .sync_fs = xfs_fs_sync_super, |
1560 | .write_super_lockfs = xfs_fs_lockfs, | 1560 | .freeze_fs = xfs_fs_freeze, |
1561 | .statfs = xfs_fs_statfs, | 1561 | .statfs = xfs_fs_statfs, |
1562 | .remount_fs = xfs_fs_remount, | 1562 | .remount_fs = xfs_fs_remount, |
1563 | .show_options = xfs_fs_show_options, | 1563 | .show_options = xfs_fs_show_options, |
diff --git a/fs/xfs/xfs_fs.h b/fs/xfs/xfs_fs.h index 589c41c38446..f7c06fac8229 100644 --- a/fs/xfs/xfs_fs.h +++ b/fs/xfs/xfs_fs.h | |||
@@ -465,8 +465,8 @@ typedef struct xfs_handle { | |||
465 | #define XFS_IOC_ERROR_INJECTION _IOW ('X', 116, struct xfs_error_injection) | 465 | #define XFS_IOC_ERROR_INJECTION _IOW ('X', 116, struct xfs_error_injection) |
466 | #define XFS_IOC_ERROR_CLEARALL _IOW ('X', 117, struct xfs_error_injection) | 466 | #define XFS_IOC_ERROR_CLEARALL _IOW ('X', 117, struct xfs_error_injection) |
467 | /* XFS_IOC_ATTRCTL_BY_HANDLE -- deprecated 118 */ | 467 | /* XFS_IOC_ATTRCTL_BY_HANDLE -- deprecated 118 */ |
468 | #define XFS_IOC_FREEZE _IOWR('X', 119, int) | 468 | /* XFS_IOC_FREEZE -- FIFREEZE 119 */ |
469 | #define XFS_IOC_THAW _IOWR('X', 120, int) | 469 | /* XFS_IOC_THAW -- FITHAW 120 */ |
470 | #define XFS_IOC_FSSETDM_BY_HANDLE _IOW ('X', 121, struct xfs_fsop_setdm_handlereq) | 470 | #define XFS_IOC_FSSETDM_BY_HANDLE _IOW ('X', 121, struct xfs_fsop_setdm_handlereq) |
471 | #define XFS_IOC_ATTRLIST_BY_HANDLE _IOW ('X', 122, struct xfs_fsop_attrlist_handlereq) | 471 | #define XFS_IOC_ATTRLIST_BY_HANDLE _IOW ('X', 122, struct xfs_fsop_attrlist_handlereq) |
472 | #define XFS_IOC_ATTRMULTI_BY_HANDLE _IOW ('X', 123, struct xfs_fsop_attrmulti_handlereq) | 472 | #define XFS_IOC_ATTRMULTI_BY_HANDLE _IOW ('X', 123, struct xfs_fsop_attrmulti_handlereq) |
diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c index 852b6d32e8d0..680d0e0ec932 100644 --- a/fs/xfs/xfs_fsops.c +++ b/fs/xfs/xfs_fsops.c | |||
@@ -595,17 +595,19 @@ out: | |||
595 | return 0; | 595 | return 0; |
596 | } | 596 | } |
597 | 597 | ||
598 | void | 598 | int |
599 | xfs_fs_log_dummy( | 599 | xfs_fs_log_dummy( |
600 | xfs_mount_t *mp) | 600 | xfs_mount_t *mp) |
601 | { | 601 | { |
602 | xfs_trans_t *tp; | 602 | xfs_trans_t *tp; |
603 | xfs_inode_t *ip; | 603 | xfs_inode_t *ip; |
604 | int error; | ||
604 | 605 | ||
605 | tp = _xfs_trans_alloc(mp, XFS_TRANS_DUMMY1); | 606 | tp = _xfs_trans_alloc(mp, XFS_TRANS_DUMMY1); |
606 | if (xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0)) { | 607 | error = xfs_trans_reserve(tp, 0, XFS_ICHANGE_LOG_RES(mp), 0, 0, 0); |
608 | if (error) { | ||
607 | xfs_trans_cancel(tp, 0); | 609 | xfs_trans_cancel(tp, 0); |
608 | return; | 610 | return error; |
609 | } | 611 | } |
610 | 612 | ||
611 | ip = mp->m_rootip; | 613 | ip = mp->m_rootip; |
@@ -615,9 +617,10 @@ xfs_fs_log_dummy( | |||
615 | xfs_trans_ihold(tp, ip); | 617 | xfs_trans_ihold(tp, ip); |
616 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); | 618 | xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE); |
617 | xfs_trans_set_sync(tp); | 619 | xfs_trans_set_sync(tp); |
618 | xfs_trans_commit(tp, 0); | 620 | error = xfs_trans_commit(tp, 0); |
619 | 621 | ||
620 | xfs_iunlock(ip, XFS_ILOCK_EXCL); | 622 | xfs_iunlock(ip, XFS_ILOCK_EXCL); |
623 | return error; | ||
621 | } | 624 | } |
622 | 625 | ||
623 | int | 626 | int |
diff --git a/fs/xfs/xfs_fsops.h b/fs/xfs/xfs_fsops.h index 300d0c9d61ad..88435e0a77c9 100644 --- a/fs/xfs/xfs_fsops.h +++ b/fs/xfs/xfs_fsops.h | |||
@@ -25,6 +25,6 @@ extern int xfs_fs_counts(xfs_mount_t *mp, xfs_fsop_counts_t *cnt); | |||
25 | extern int xfs_reserve_blocks(xfs_mount_t *mp, __uint64_t *inval, | 25 | extern int xfs_reserve_blocks(xfs_mount_t *mp, __uint64_t *inval, |
26 | xfs_fsop_resblks_t *outval); | 26 | xfs_fsop_resblks_t *outval); |
27 | extern int xfs_fs_goingdown(xfs_mount_t *mp, __uint32_t inflags); | 27 | extern int xfs_fs_goingdown(xfs_mount_t *mp, __uint32_t inflags); |
28 | extern void xfs_fs_log_dummy(xfs_mount_t *mp); | 28 | extern int xfs_fs_log_dummy(xfs_mount_t *mp); |
29 | 29 | ||
30 | #endif /* __XFS_FSOPS_H__ */ | 30 | #endif /* __XFS_FSOPS_H__ */ |