[Ocfs2-commits] jlbec commits r2090 - in trunk/fs: configfs ocfs2/cluster

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Mar 30 18:07:21 CST 2005


Author: jlbec
Signed-off-by: manish
Date: 2005-03-30 18:07:20 -0600 (Wed, 30 Mar 2005)
New Revision: 2090

Modified:
   trunk/fs/configfs/bobtest.c
   trunk/fs/configfs/configfs.h
   trunk/fs/configfs/dir.c
   trunk/fs/configfs/file.c
   trunk/fs/ocfs2/cluster/heartbeat.c
   trunk/fs/ocfs2/cluster/nodemanager.c
Log:

o Provide structure namespacing for configfs_attribute.

Signed-off-by: manish



Modified: trunk/fs/configfs/bobtest.c
===================================================================
--- trunk/fs/configfs/bobtest.c	2005-03-30 23:43:11 UTC (rev 2089)
+++ trunk/fs/configfs/bobtest.c	2005-03-31 00:07:20 UTC (rev 2090)
@@ -60,7 +60,7 @@
 }
 
 static struct robert_attribute robert_attr_print = {
-	.attr	= { .name = "print", .mode = S_IRUGO },
+	.attr	= { .ca_name = "print", .ca_mode = S_IRUGO },
 	.show	= robert_print_read,
 };
 
@@ -162,11 +162,11 @@
 }
 
 static struct bob_attribute bob_attr_showme = {
-	.attr	= { .name = "showme", .mode = S_IRUGO },
+	.attr	= { .ca_name = "showme", .ca_mode = S_IRUGO },
 	.show	= bob_showme_read,
 };
 static struct bob_attribute bob_attr_storeme = {
-	.attr	= { .name = "storeme", .mode = S_IRUGO | S_IWUSR },
+	.attr	= { .ca_name = "storeme", .ca_mode = S_IRUGO | S_IWUSR },
 	.show	= bob_storeme_read,
 	.store	= bob_storeme_write,
 };
@@ -261,7 +261,7 @@
 }
 
 static struct bobset_attribute bobset_attr_bobs = {
-	.attr	= { .name = "bobs", .mode = S_IRUGO },
+	.attr	= { .ca_name = "bobs", .ca_mode = S_IRUGO },
 	.show	= bobset_bobs_read
 };
 
@@ -389,11 +389,11 @@
 }
 
 static struct jerry_attribute jerry_attr_showme = {
-	.attr	= { .name = "showme", .mode = S_IRUGO },
+	.attr	= { .ca_name = "showme", .ca_mode = S_IRUGO },
 	.show	= jerry_showme_read,
 };
 static struct jerry_attribute jerry_attr_storeme = {
-	.attr	= { .name = "storeme", .mode = S_IRUGO | S_IWUSR },
+	.attr	= { .ca_name = "storeme", .ca_mode = S_IRUGO | S_IWUSR },
 	.show	= jerry_storeme_read,
 	.store	= jerry_storeme_write,
 };
@@ -513,11 +513,11 @@
 }
 
 static struct tom_attribute tom_attr_showme = {
-	.attr	= { .name = "showme", .mode = S_IRUGO },
+	.attr	= { .ca_name = "showme", .ca_mode = S_IRUGO },
 	.show	= tom_showme_read,
 };
 static struct tom_attribute tom_attr_storeme = {
-	.attr	= { .name = "storeme", .mode = S_IRUGO | S_IWUSR },
+	.attr	= { .ca_name = "storeme", .ca_mode = S_IRUGO | S_IWUSR },
 	.show	= tom_storeme_read,
 	.store	= tom_storeme_write,
 };
@@ -616,7 +616,7 @@
 }
 
 static struct tomset_attribute tomset_attr_toms = {
-	.attr	= { .name = "toms", .mode = S_IRUGO },
+	.attr	= { .ca_name = "toms", .ca_mode = S_IRUGO },
 	.show	= tomset_toms_read
 };
 

Modified: trunk/fs/configfs/configfs.h
===================================================================
--- trunk/fs/configfs/configfs.h	2005-03-30 23:43:11 UTC (rev 2089)
+++ trunk/fs/configfs/configfs.h	2005-03-31 00:07:20 UTC (rev 2090)
@@ -78,9 +78,9 @@
 extern void config_item_put(struct config_item *);
 
 struct config_item_type {
-	struct module *owner;
-	struct configfs_item_operations	*item_ops;
-	struct configfs_group_operations		*group_ops;
+	struct module				*owner;
+	struct configfs_item_operations		*item_ops;
+	struct configfs_group_operations	*group_ops;
 	struct configfs_attribute		**attrs;
 };
 
@@ -122,9 +122,9 @@
 
 
 struct configfs_attribute {
-	char			* name;
-	struct module 		* owner;
-	mode_t			mode;
+	char			*ca_name;
+	struct module 		*ca_owner;
+	mode_t			ca_mode;
 };
 
 

Modified: trunk/fs/configfs/dir.c
===================================================================
--- trunk/fs/configfs/dir.c	2005-03-30 23:43:11 UTC (rev 2089)
+++ trunk/fs/configfs/dir.c	2005-03-31 00:07:20 UTC (rev 2090)
@@ -243,7 +243,7 @@
 	struct configfs_attribute * attr = sd->s_element;
 	int error;
 
-	error = configfs_create(dentry, (attr->mode & S_IALLUGO) | S_IFREG, init_file);
+	error = configfs_create(dentry, (attr->ca_mode & S_IALLUGO) | S_IFREG, init_file);
 	if (error)
 		return error;
 

Modified: trunk/fs/configfs/file.c
===================================================================
--- trunk/fs/configfs/file.c	2005-03-30 23:43:11 UTC (rev 2089)
+++ trunk/fs/configfs/file.c	2005-03-31 00:07:20 UTC (rev 2090)
@@ -240,7 +240,7 @@
 		goto Einval;
 
 	/* Grab the module reference for this attribute if we have one */
-	if (!try_module_get(attr->owner)) {
+	if (!try_module_get(attr->ca_owner)) {
 		error = -ENODEV;
 		goto Done;
 	}
@@ -292,7 +292,7 @@
 	goto Done;
  Eaccess:
 	error = -EACCES;
-	module_put(attr->owner);
+	module_put(attr->ca_owner);
  Done:
 	if (error && item)
 		config_item_put(item);
@@ -308,7 +308,7 @@
 {
 	struct config_item * item = to_item(filp->f_dentry->d_parent);
 	struct configfs_attribute * attr = to_attr(filp->f_dentry);
-	struct module * owner = attr->owner;
+	struct module * owner = attr->ca_owner;
 	struct configfs_buffer * buffer = filp->private_data;
 
 	if (item) 
@@ -336,7 +336,7 @@
 int configfs_add_file(struct dentry * dir, const struct configfs_attribute * attr, int type)
 {
 	struct configfs_dirent * parent_sd = dir->d_fsdata;
-	umode_t mode = (attr->mode & S_IALLUGO) | S_IFREG;
+	umode_t mode = (attr->ca_mode & S_IALLUGO) | S_IFREG;
 	int error = 0;
 
 	down(&dir->d_inode->i_sem);

Modified: trunk/fs/ocfs2/cluster/heartbeat.c
===================================================================
--- trunk/fs/ocfs2/cluster/heartbeat.c	2005-03-30 23:43:11 UTC (rev 2089)
+++ trunk/fs/ocfs2/cluster/heartbeat.c	2005-03-31 00:07:20 UTC (rev 2090)
@@ -638,22 +638,22 @@
 };
 
 static struct hb_region_attribute hb_region_attr_block_bytes = {
-	.attr	= { .name = "block_bytes", .mode = S_IRUGO | S_IWUSR },
+	.attr	= { .ca_name = "block_bytes", .ca_mode = S_IRUGO | S_IWUSR },
 	.show	= hb_region_block_bytes_read,
 	.store	= hb_region_block_bytes_write,
 };
 static struct hb_region_attribute hb_region_attr_start_block = {
-	.attr	= { .name = "start_block", .mode = S_IRUGO | S_IWUSR },
+	.attr	= { .ca_name = "start_block", .ca_mode = S_IRUGO | S_IWUSR },
 	.show	= hb_region_start_block_read,
 	.store	= hb_region_start_block_write,
 };
 static struct hb_region_attribute hb_region_attr_blocks = {
-	.attr	= { .name = "blocks", .mode = S_IRUGO | S_IWUSR },
+	.attr	= { .ca_name = "blocks", .ca_mode = S_IRUGO | S_IWUSR },
 	.show	= hb_region_blocks_read,
 	.store	= hb_region_blocks_write,
 };
 static struct hb_region_attribute hb_region_attr_dev = {
-	.attr	= { .name = "dev", .mode = S_IRUGO | S_IWUSR },
+	.attr	= { .ca_name = "dev", .ca_mode = S_IRUGO | S_IWUSR },
 	.show	= hb_region_dev_read,
 	.store	= hb_region_dev_write,
 };

Modified: trunk/fs/ocfs2/cluster/nodemanager.c
===================================================================
--- trunk/fs/ocfs2/cluster/nodemanager.c	2005-03-30 23:43:11 UTC (rev 2089)
+++ trunk/fs/ocfs2/cluster/nodemanager.c	2005-03-31 00:07:20 UTC (rev 2090)
@@ -400,22 +400,22 @@
 };
 
 static struct nm_node_attribute nm_node_attr_num = {
-	.attr	= { .name = "num", .mode = S_IRUGO | S_IWUSR },
+	.attr	= { .ca_name = "num", .ca_mode = S_IRUGO | S_IWUSR },
 	.show	= nm_node_num_read,
 	.store	= nm_node_num_write,
 };
 static struct nm_node_attribute nm_node_attr_ipv4_port = {
-	.attr	= { .name = "ipv4_port", .mode = S_IRUGO | S_IWUSR },
+	.attr	= { .ca_name = "ipv4_port", .ca_mode = S_IRUGO | S_IWUSR },
 	.show	= nm_node_ipv4_port_read,
 	.store	= nm_node_ipv4_port_write,
 };
 static struct nm_node_attribute nm_node_attr_ipv4_address = {
-	.attr	= { .name = "ipv4_address", .mode = S_IRUGO | S_IWUSR },
+	.attr	= { .ca_name = "ipv4_address", .ca_mode = S_IRUGO | S_IWUSR },
 	.show	= nm_node_ipv4_address_read,
 	.store	= nm_node_ipv4_address_write,
 };
 static struct nm_node_attribute nm_node_attr_local = {
-	.attr	= { .name = "local", .mode = S_IRUGO | S_IWUSR },
+	.attr	= { .ca_name = "local", .ca_mode = S_IRUGO | S_IWUSR },
 	.show	= nm_node_local_read,
 	.store	= nm_node_local_write,
 };



More information about the Ocfs2-commits mailing list