This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cluster: RHEL5 - gfs-kernel: bz487610 - Change gfs freeze/unfreeze touse new standard


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=28daa9be2045dc307701144631d118e46ed685d3
Commit:        28daa9be2045dc307701144631d118e46ed685d3
Parent:        9dbd7d93e1cde85ac243e439d95bd137748ebe43
Author:        Abhijith Das <adas@redhat.com>
AuthorDate:    Fri May 22 14:36:10 2009 -0500
Committer:     Abhijith Das <adas@redhat.com>
CommitterDate: Fri May 22 14:36:10 2009 -0500

gfs-kernel: bz487610 - Change gfs freeze/unfreeze to use new standard

This patch adds support to gfs(FS_HAS_FREEZE) to freeze/thaw through
the new ioctl interface.

Signed-off-by: Abhi Das <adas@redhat.com>
---
 gfs-kernel/src/gfs/ops_fstype.c |    2 +-
 gfs-kernel/src/gfs/ops_super.c  |   20 +++++++++++---------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/gfs-kernel/src/gfs/ops_fstype.c b/gfs-kernel/src/gfs/ops_fstype.c
index 4f0b471..a9d7733 100644
--- a/gfs-kernel/src/gfs/ops_fstype.c
+++ b/gfs-kernel/src/gfs/ops_fstype.c
@@ -819,7 +819,7 @@ gfs_kill_sb(struct super_block *sb)
 
 struct file_system_type gfs_fs_type = {
 	.name = "gfs",
-	.fs_flags = FS_REQUIRES_DEV,
+	.fs_flags = FS_REQUIRES_DEV | FS_HAS_FREEZE,
 	.get_sb = gfs_get_sb,
 	.kill_sb = gfs_kill_sb,
 	.owner = THIS_MODULE,
diff --git a/gfs-kernel/src/gfs/ops_super.c b/gfs-kernel/src/gfs/ops_super.c
index 7f92691..fb7ee0e 100644
--- a/gfs-kernel/src/gfs/ops_super.c
+++ b/gfs-kernel/src/gfs/ops_super.c
@@ -195,19 +195,19 @@ gfs_write_super(struct super_block *sb)
 }
 
 /**
- * gfs_write_super_lockfs - prevent further writes to the filesystem
+ * gfs_freeze - prevent further writes to the filesystem
  * @sb: the VFS structure for the filesystem
  *
  */
 
-static void
-gfs_write_super_lockfs(struct super_block *sb)
+static int
+gfs_freeze(struct super_block *sb)
 {
 	struct gfs_sbd *sdp = get_v2sdp(sb);
 	int error;
 
 	if (test_bit(SDF_SHUTDOWN, &sdp->sd_flags))
-		return;
+		return -EINVAL;
 
 	atomic_inc(&sdp->sd_ops_super);
 
@@ -233,22 +233,24 @@ gfs_write_super_lockfs(struct super_block *sb)
 		set_current_state(TASK_UNINTERRUPTIBLE);
 		schedule_timeout(HZ);
 	}
+	return 0;
 }
 
 /**
- * gfs_unlockfs - reallow writes to the filesystem
+ * gfs_unfreeze - reallow writes to the filesystem
  * @sb: the VFS structure for the filesystem
  *
  */
 
-static void
-gfs_unlockfs(struct super_block *sb)
+static int
+gfs_unfreeze(struct super_block *sb)
 {
 	struct gfs_sbd *sdp = get_v2sdp(sb);
 
 	atomic_inc(&sdp->sd_ops_super);
 
 	gfs_unfreeze_fs(sdp);
+	return 0;
 }
 
 /**
@@ -458,8 +460,8 @@ struct super_operations gfs_super_ops = {
 	.put_inode = gfs_put_inode,
 	.put_super = gfs_put_super,
 	.write_super = gfs_write_super,
-	.write_super_lockfs = gfs_write_super_lockfs,
-	.unlockfs = gfs_unlockfs,
+	.freeze_fs = gfs_freeze,
+	.unfreeze_fs = gfs_unfreeze,
 	.statfs = gfs_statfs,
 	.remount_fs = gfs_remount_fs,
 	.clear_inode = gfs_clear_inode,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]