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

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Mar 30 20:12:50 CST 2005


Author: jlbec
Signed-off-by: manish
Date: 2005-03-30 20:12:48 -0600 (Wed, 30 Mar 2005)
New Revision: 2095

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

o Add namespacing to the config_item structure.

Signed-off-by: manish



Modified: trunk/fs/configfs/bobtest.c
===================================================================
--- trunk/fs/configfs/bobtest.c	2005-03-31 01:29:03 UTC (rev 2094)
+++ trunk/fs/configfs/bobtest.c	2005-03-31 02:12:48 UTC (rev 2095)
@@ -94,7 +94,7 @@
 	.show_attribute	= robert_attr_show,
 };
 
-static struct config_item_type uktype_robert = {
+static struct config_item_type robert_type = {
 	.ct_item_ops	= &robert_item_ops,
 	.ct_attrs	= robert_attrs,
 	.ct_owner	= THIS_MODULE,
@@ -103,8 +103,8 @@
 static struct robert robert = {
 	.group = {
 		.cg_item = {
-			.name = "robert",
-			.ktype = &uktype_robert,
+			.ci_namebuf = "robert",
+			.ci_type = &robert_type,
 		},
 	},
 };
@@ -216,7 +216,7 @@
 	.store_attribute	= bob_attr_store,
 };
 
-static struct config_item_type uktype_bob = {
+static struct config_item_type bob_type = {
 	.ct_item_ops	= &bob_item_ops,
 	.ct_attrs	= bob_attrs,
 	.ct_owner	= THIS_MODULE,
@@ -286,7 +286,7 @@
 
 	memset(bob, 0, sizeof(struct bob));
 
-	config_item_init_type_name(&bob->item, name, &uktype_bob);
+	config_item_init_type_name(&bob->item, name, &bob_type);
 
 	bob->showme = 0;
 	bob->storeme = 0;
@@ -312,7 +312,7 @@
 	.drop_item	= drop_bob,
 };
 
-static struct config_item_type uktype_bobset = {
+static struct config_item_type bobset_type = {
 	.ct_item_ops	= &bobset_item_ops,
 	.ct_group_ops	= &bobset_group_ops,
 	.ct_attrs	= bobset_attrs,
@@ -322,8 +322,8 @@
 	.subsys = {
 		.su_group = {
 			.cg_item = {
-				.name = "bobset",
-				.ktype = &uktype_bobset,
+				.ci_namebuf = "bobset",
+				.ci_type = &bobset_type,
 			},
 			.default_groups = bobset_sets,
 		},
@@ -439,7 +439,7 @@
 {
 	int ret = 0;
 
-	if (target->ktype != &uktype_bob)
+	if (target->ci_type != &bob_type)
 		ret = -EINVAL;
 
 	return ret;
@@ -452,7 +452,7 @@
 	.allow_link		= jerry_allow_link,
 };
 
-static struct config_item_type uktype_jerry = {
+static struct config_item_type jerry_type = {
 	.ct_item_ops	= &jerry_item_ops,
 	.ct_attrs	= jerry_attrs,
 	.ct_owner	= THIS_MODULE,
@@ -569,7 +569,7 @@
 	.store_attribute	= tom_attr_store,
 };
 
-static struct config_item_type uktype_tom = {
+static struct config_item_type tom_type = {
 	.ct_item_ops	= &tom_item_ops,
 	.ct_attrs	= tom_attrs,
 	.ct_owner	= THIS_MODULE,
@@ -650,13 +650,13 @@
 
 	memset(jerry, 0, sizeof(struct jerry));
 
-	config_group_init_type_name(&tom->group, name, &uktype_tom);
+	config_group_init_type_name(&tom->group, name, &tom_type);
 
 	tom->showme = 0;
 	tom->storeme = 0;
 	tomset->n_toms++;
 
-	config_group_init_type_name(&jerry->group, "jer", &uktype_jerry);
+	config_group_init_type_name(&jerry->group, "jer", &jerry_type);
 
 	tom->group.default_groups[0] = &jerry->group;
 	tom->group.default_groups[1] = NULL;
@@ -684,7 +684,7 @@
 	.drop_item	= drop_tom,
 };
 
-static struct config_item_type uktype_tomset = {
+static struct config_item_type tomset_type = {
 	.ct_item_ops	= &tomset_item_ops,
 	.ct_group_ops	= &tomset_group_ops,
 	.ct_attrs	= tomset_attrs,
@@ -694,8 +694,8 @@
 	.subsys = {
 		.su_group = {
 			.cg_item = {
-				.name = "tomset",
-				.ktype = &uktype_tomset,
+				.ci_namebuf = "tomset",
+				.ci_type = &tomset_type,
 			},
 		},
 	},

Modified: trunk/fs/configfs/configfs.h
===================================================================
--- trunk/fs/configfs/configfs.h	2005-03-31 01:29:03 UTC (rev 2094)
+++ trunk/fs/configfs/configfs.h	2005-03-31 02:12:48 UTC (rev 2095)
@@ -54,27 +54,27 @@
 struct configfs_subsystem;
 
 struct config_item {
-	char			*k_name;
-	char			name[UOBJ_NAME_LEN];
-	struct kref		kref;
-	struct list_head	entry;
-	struct config_item	*parent;
-	struct config_group	*group;
-	struct config_item_type	*ktype;
-	struct dentry		*dentry;
+	char			*ci_name;
+	char			ci_namebuf[UOBJ_NAME_LEN];
+	struct kref		ci_kref;
+	struct list_head	ci_entry;
+	struct config_item	*ci_parent;
+	struct config_group	*ci_group;
+	struct config_item_type	*ci_type;
+	struct dentry		*ci_dentry;
 };
 
 extern int config_item_set_name(struct config_item *, const char *, ...);
 
 static inline char *config_item_name(struct config_item * item)
 {
-	return item->k_name;
+	return item->ci_name;
 }
 
 extern void config_item_init(struct config_item *);
 extern void config_item_init_type_name(struct config_item *item,
 				       const char *name,
-				       struct config_item_type *ktype);
+				       struct config_item_type *type);
 extern void config_item_cleanup(struct config_item *);
 
 extern struct config_item * config_item_get(struct config_item *);
@@ -95,7 +95,7 @@
 
 struct config_group {
 	struct config_item		cg_item;
-	struct list_head		cg_list;
+	struct list_head		cg_children;
 	struct configfs_subsystem 	*cg_subsys;
 	struct config_group		**default_groups;
 };
@@ -104,7 +104,7 @@
 extern void config_group_init(struct config_group *group);
 extern void config_group_init_type_name(struct config_group *group,
 					const char *name,
-					struct config_item_type *ktype);
+					struct config_item_type *type);
 
 
 static inline struct config_group *to_config_group(struct config_item *item)
@@ -186,7 +186,7 @@
 
 
 struct configfs_subsystem {
-	struct config_group		su_group;
+	struct config_group	su_group;
 	struct semaphore	su_sem;
 };
 

Modified: trunk/fs/configfs/dir.c
===================================================================
--- trunk/fs/configfs/dir.c	2005-03-31 01:29:03 UTC (rev 2094)
+++ trunk/fs/configfs/dir.c	2005-03-31 02:12:48 UTC (rev 2095)
@@ -164,8 +164,8 @@
 
 	BUG_ON(!item);
 
-	if (item->parent)
-		parent = item->parent->dentry;
+	if (item->ci_parent)
+		parent = item->ci_parent->ci_dentry;
 	else if (configfs_mount && configfs_mount->mnt_sb)
 		parent = configfs_mount->mnt_sb->s_root;
 	else
@@ -173,7 +173,7 @@
 
 	error = create_dir(item,parent,dentry);
 	if (!error)
-		item->dentry = dentry;
+		item->ci_dentry = dentry;
 	return error;
 }
 
@@ -222,7 +222,7 @@
 
 static void configfs_remove_dir(struct config_item * item)
 {
-	struct dentry * dentry = dget(item->dentry);
+	struct dentry * dentry = dget(item->ci_dentry);
 
 	if (!dentry)
 		return;
@@ -351,7 +351,7 @@
 
 static void detach_attrs(struct config_item * item)
 {
-	struct dentry * dentry = dget(item->dentry);
+	struct dentry * dentry = dget(item->ci_dentry);
 	struct configfs_dirent * parent_sd;
 	struct configfs_dirent * sd, * tmp;
 
@@ -378,7 +378,7 @@
 
 static int populate_attrs(struct config_item *item)
 {
-	struct config_item_type *t = item->ktype;
+	struct config_item_type *t = item->ci_type;
 	struct configfs_attribute *attr;
 	int error = 0;
 	int i;
@@ -405,7 +405,7 @@
 
 static void detach_groups(struct config_group *group)
 {
-	struct dentry * dentry = dget(group->cg_item.dentry);
+	struct dentry * dentry = dget(group->cg_item.ci_dentry);
 	struct dentry *child;
 	struct configfs_dirent *parent_sd;
 	struct configfs_dirent *sd, *tmp;
@@ -457,11 +457,11 @@
 	struct qstr name;
 	struct configfs_dirent *sd;
 	/* We trust the caller holds a reference to parent */
-	struct dentry *child, *parent = parent_group->cg_item.dentry;
+	struct dentry *child, *parent = parent_group->cg_item.ci_dentry;
 
-	if (!group->cg_item.k_name)
-		group->cg_item.k_name = group->cg_item.name;
-	name.name = group->cg_item.k_name;
+	if (!group->cg_item.ci_name)
+		group->cg_item.ci_name = group->cg_item.ci_namebuf;
+	name.name = group->cg_item.ci_name;
 	name.len = strlen(name.name);
 	name.hash = full_name_hash(name.name, name.len);
 
@@ -487,7 +487,7 @@
 static int populate_groups(struct config_group *group)
 {
 	struct config_group *new_group;
-	struct dentry *dentry = group->cg_item.dentry;
+	struct dentry *dentry = group->cg_item.ci_dentry;
 	int ret = 0;
 	int i;
 
@@ -527,12 +527,12 @@
 {
 	struct config_group *group;
 
-	group = item->group;
+	group = item->ci_group;
 	if (group) {
-		list_del_init(&item->entry);
+		list_del_init(&item->ci_entry);
 
-		item->group = NULL;
-		item->parent = NULL;
+		item->ci_group = NULL;
+		item->ci_parent = NULL;
 		config_item_put(item);
 
 		config_group_put(group);
@@ -543,9 +543,9 @@
 {
 	/* Parent seems redundant with group, but it makes certain
 	 * traversals much nicer. */
-	item->parent = parent_item;
-	item->group = config_group_get(to_config_group(parent_item));
-	list_add_tail(&item->entry, &item->group->cg_list);
+	item->ci_parent = parent_item;
+	item->ci_group = config_group_get(to_config_group(parent_item));
+	list_add_tail(&item->ci_entry, &item->ci_group->cg_children);
 
 	config_item_get(item);
 }
@@ -661,18 +661,18 @@
  * Drop the initial reference from make_item()/make_group()
  * This function assumes that reference is held on item
  * and that item holds a valid reference to the parent.  Also, it
- * assumes the caller has validated uktype.
+ * assumes the caller has validated ci_type.
  */
 static void client_drop_item(struct config_item *parent_item,
 			     struct config_item *item)
 {
-	struct config_item_type *uktype;
+	struct config_item_type *type;
 
-	uktype = parent_item->ktype;
-	BUG_ON(!uktype);
+	type = parent_item->ci_type;
+	BUG_ON(!type);
 
-	if (uktype->ct_group_ops && uktype->ct_group_ops->drop_item)
-		uktype->ct_group_ops->drop_item(to_config_group(parent_item),
+	if (type->ct_group_ops && type->ct_group_ops->drop_item)
+		type->ct_group_ops->drop_item(to_config_group(parent_item),
 						item);
 	else 
 		config_item_put(item);
@@ -687,7 +687,7 @@
 	struct config_item *parent_item;
 	struct configfs_subsystem *subsys;
 	struct configfs_dirent *sd;
-	struct config_item_type *uktype;
+	struct config_item_type *type;
 	struct module *owner;
 	char *name;
 
@@ -699,13 +699,13 @@
 		return -EPERM;
 
 	parent_item = configfs_get_config_item(dentry->d_parent);
-	uktype = parent_item->ktype;
+	type = parent_item->ci_type;
 	subsys = to_config_group(parent_item)->cg_subsys;
 	BUG_ON(!subsys);
 
-	if (!uktype || !uktype->ct_group_ops ||
-	    (!uktype->ct_group_ops->make_group &&
-	     !uktype->ct_group_ops->make_item)) {
+	if (!type || !type->ct_group_ops ||
+	    (!type->ct_group_ops->make_group &&
+	     !type->ct_group_ops->make_item)) {
 		config_item_put(parent_item);
 		return -EPERM;  /* What lack-of-mkdir returns */
 	}
@@ -720,14 +720,14 @@
 	down(&subsys->su_sem);
 	group = NULL;
 	item = NULL;
-	if (uktype->ct_group_ops->make_group) {
-		group = uktype->ct_group_ops->make_group(to_config_group(parent_item), name);
+	if (type->ct_group_ops->make_group) {
+		group = type->ct_group_ops->make_group(to_config_group(parent_item), name);
 		if (group) {
 			link_group(to_config_group(parent_item), group);
 			item = &group->cg_item;
 		}
 	} else {
-		item = uktype->ct_group_ops->make_item(to_config_group(parent_item), name);
+		item = type->ct_group_ops->make_item(to_config_group(parent_item), name);
 		if (item)
 			link_obj(parent_item, item);
 	}
@@ -740,9 +740,9 @@
 	}
 
 	ret = -EINVAL;
-	uktype = item->ktype;
-	if (uktype) {
-		owner = uktype->ct_owner;
+	type = item->ci_type;
+	if (type) {
+		owner = type->ct_owner;
 		if (try_module_get(owner)) {
 			if (group) {
 				ret = configfs_attach_group(parent_item,
@@ -792,7 +792,7 @@
 	subsys = to_config_group(parent_item)->cg_subsys;
 	BUG_ON(!subsys);
 
-	if (!parent_item->ktype) {
+	if (!parent_item->ci_type) {
 		config_item_put(parent_item);
 		return -EINVAL;
 	}
@@ -809,8 +809,8 @@
 	/* Drop reference from above, item already holds one. */
 	config_item_put(parent_item); 
 
-	if (item->ktype)
-		owner = item->ktype->ct_owner;
+	if (item->ci_type)
+		owner = item->ci_type->ct_owner;
 
 	if (sd->s_type & CONFIGFS_USET_DIR) {
 		configfs_detach_group(item);
@@ -1044,15 +1044,15 @@
 	if (err)
 		return err;
 
-	if (!group->cg_item.k_name)
-		group->cg_item.k_name = group->cg_item.name;
+	if (!group->cg_item.ci_name)
+		group->cg_item.ci_name = group->cg_item.ci_namebuf;
 
 	sd = configfs_sb->s_root->d_fsdata;
 	link_group(to_config_group(sd->s_element), group);
 
 	down(&configfs_sb->s_root->d_inode->i_sem);
 
-	name.name = group->cg_item.k_name;
+	name.name = group->cg_item.ci_name;
 	name.len = strlen(name.name);
 	name.hash = full_name_hash(name.name, name.len);
 
@@ -1085,7 +1085,7 @@
 void configfs_unregister_subsystem(struct configfs_subsystem *subsys)
 {
 	struct config_group *group = &subsys->su_group;
-	struct dentry *dentry = group->cg_item.dentry;
+	struct dentry *dentry = group->cg_item.ci_dentry;
 
 	if (dentry->d_parent != configfs_sb->s_root) {
 		printk(KERN_ERR "configfs: Tried to unregister non-subsystem!\n");

Modified: trunk/fs/configfs/file.c
===================================================================
--- trunk/fs/configfs/file.c	2005-03-31 01:29:03 UTC (rev 2094)
+++ trunk/fs/configfs/file.c	2005-03-31 02:12:48 UTC (rev 2095)
@@ -245,11 +245,8 @@
 		goto Done;
 	}
 
-	/* if the config_item has no ktype, then we assume that it is a subsystem
-	 * itself, and use ops for it.
-	 */
-	if (item->ktype)
-		ops = item->ktype->ct_item_ops;
+	if (item->ci_type)
+		ops = item->ci_type->ct_item_ops;
 	else
 		goto Eaccess;
 
@@ -355,9 +352,9 @@
 
 int configfs_create_file(struct config_item * item, const struct configfs_attribute * attr)
 {
-	BUG_ON(!item || !item->dentry || !attr);
+	BUG_ON(!item || !item->ci_dentry || !attr);
 
-	return configfs_add_file(item->dentry, attr, CONFIGFS_UOBJ_ATTR);
-
+	return configfs_add_file(item->ci_dentry, attr,
+				 CONFIGFS_UOBJ_ATTR);
 }
 

Modified: trunk/fs/configfs/item.c
===================================================================
--- trunk/fs/configfs/item.c	2005-03-31 01:29:03 UTC (rev 2094)
+++ trunk/fs/configfs/item.c	2005-03-31 02:12:48 UTC (rev 2095)
@@ -37,7 +37,7 @@
 
 static inline struct config_item * to_item(struct list_head * entry)
 {
-	return container_of(entry,struct config_item,entry);
+	return container_of(entry,struct config_item,ci_entry);
 }
 
 /* Evil kernel */
@@ -49,8 +49,8 @@
  */
 void config_item_init(struct config_item * item)
 {
-	kref_init(&item->kref, config_item_release);
-	INIT_LIST_HEAD(&item->entry);
+	kref_init(&item->ci_kref, config_item_release);
+	INIT_LIST_HEAD(&item->ci_entry);
 }
 
 /**
@@ -59,8 +59,8 @@
  *	@name:	name. 
  *
  *	If strlen(name) >= UOBJ_NAME_LEN, then use a dynamically allocated
- *	string that @item->k_name points to. Otherwise, use the static 
- *	@item->name array.
+ *	string that @item->ci_name points to. Otherwise, use the static 
+ *	@item->ci_namebuf array.
  */
 
 int config_item_set_name(struct config_item * item, const char * fmt, ...)
@@ -75,10 +75,10 @@
 	 * First, try the static array 
 	 */
 	va_start(args,fmt);
-	need = vsnprintf(item->name,limit,fmt,args);
+	need = vsnprintf(item->ci_namebuf,limit,fmt,args);
 	va_end(args);
 	if (need < limit) 
-		name = item->name;
+		name = item->ci_namebuf;
 	else {
 		/* 
 		 * Need more space? Allocate it and try again 
@@ -102,11 +102,11 @@
 	}
 
 	/* Free the old name, if necessary. */
-	if (item->k_name && item->k_name != item->name)
-		kfree(item->k_name);
+	if (item->ci_name && item->ci_name != item->ci_namebuf)
+		kfree(item->ci_name);
 
 	/* Now, set the new name */
-	item->k_name = name;
+	item->ci_name = name;
  Done:
 	return error;
 }
@@ -115,19 +115,19 @@
 
 void config_item_init_type_name(struct config_item *item,
 				const char *name,
-				struct config_item_type *ktype)
+				struct config_item_type *type)
 {
 	config_item_set_name(item, name);
-	item->ktype = ktype;
+	item->ci_type = type;
 	config_item_init(item);
 }
 EXPORT_SYMBOL(config_item_init_type_name);
 
 void config_group_init_type_name(struct config_group *group, const char *name,
-			 struct config_item_type *ktype)
+			 struct config_item_type *type)
 {
 	config_item_set_name(&group->cg_item, name);
-	group->cg_item.ktype = ktype;
+	group->cg_item.ci_type = type;
 	config_group_init(group);
 }
 EXPORT_SYMBOL(config_group_init_type_name);
@@ -135,7 +135,7 @@
 struct config_item * config_item_get(struct config_item * item)
 {
 	if (item)
-		kref_get(&item->kref);
+		kref_get(&item->ci_kref);
 	return item;
 }
 
@@ -146,14 +146,14 @@
 
 void config_item_cleanup(struct config_item * item)
 {
-	struct config_item_type * t = item->ktype;
-	struct config_group * s = item->group;
-	struct config_item * parent = item->parent;
+	struct config_item_type * t = item->ci_type;
+	struct config_group * s = item->ci_group;
+	struct config_item * parent = item->ci_parent;
 
 	pr_debug("config_item %s: cleaning up\n",config_item_name(item));
-	if (item->k_name != item->name)
-		kfree(item->k_name);
-	item->k_name = NULL;
+	if (item->ci_name != item->ci_namebuf)
+		kfree(item->ci_name);
+	item->ci_name = NULL;
 	if (t && t->ct_item_ops && t->ct_item_ops->release)
 		t->ct_item_ops->release(item);
 	if (s)
@@ -164,7 +164,7 @@
 
 static void config_item_release(struct kref *kref)
 {
-	config_item_cleanup(container_of(kref, struct config_item, kref));
+	config_item_cleanup(container_of(kref, struct config_item, ci_kref));
 }
 
 /**
@@ -176,7 +176,7 @@
 void config_item_put(struct config_item * item)
 {
 	if (item)
-		kref_put(&item->kref, config_item_release);
+		kref_put(&item->ci_kref, config_item_release);
 }
 
 
@@ -188,7 +188,7 @@
 void config_group_init(struct config_group *group)
 {
 	config_item_init(&group->cg_item);
-	INIT_LIST_HEAD(&group->cg_list);
+	INIT_LIST_HEAD(&group->cg_children);
 }
 
 
@@ -208,7 +208,7 @@
 	struct config_item * ret = NULL;
 
         /* XXX LOCKING! */
-	list_for_each(entry,&group->cg_list) {
+	list_for_each(entry,&group->cg_children) {
 		struct config_item * item = to_item(entry);
 		if (config_item_name(item) &&
                     !strcmp(config_item_name(item), name)) {

Modified: trunk/fs/configfs/mount.c
===================================================================
--- trunk/fs/configfs/mount.c	2005-03-31 01:29:03 UTC (rev 2094)
+++ trunk/fs/configfs/mount.c	2005-03-31 02:12:48 UTC (rev 2095)
@@ -53,8 +53,8 @@
 
 static struct config_group configfs_root_group = {
 	.cg_item = {
-		.name	= "root",
-		.k_name	= configfs_root_group.cg_item.name,
+		.ci_namebuf	= "root",
+		.ci_name	= configfs_root_group.cg_item.ci_namebuf,
 	},
 };
 
@@ -99,7 +99,7 @@
 		return -ENOMEM;
 	}
 	config_group_init(&configfs_root_group);
-	configfs_root_group.cg_item.dentry = root;
+	configfs_root_group.cg_item.ci_dentry = root;
 	root->d_fsdata = &configfs_root;
 	sb->s_root = root;
 	return 0;

Modified: trunk/fs/configfs/symlink.c
===================================================================
--- trunk/fs/configfs/symlink.c	2005-03-31 01:29:03 UTC (rev 2094)
+++ trunk/fs/configfs/symlink.c	2005-03-31 02:12:48 UTC (rev 2095)
@@ -36,7 +36,7 @@
 {
 	struct config_item * p = item;
 	int depth = 0;
-	do { depth++; } while ((p = p->parent) && !configfs_is_root(p));
+	do { depth++; } while ((p = p->ci_parent) && !configfs_is_root(p));
 	return depth;
 }
 
@@ -46,7 +46,7 @@
 	int length = 1;
 	do {
 		length += strlen(config_item_name(p)) + 1;
-		p = p->parent;
+		p = p->ci_parent;
 	} while (p && !configfs_is_root(p));
 	return length;
 }
@@ -56,7 +56,7 @@
 	struct config_item * p;
 
 	--length;
-	for (p = item; p && !configfs_is_root(p); p = p->parent) {
+	for (p = item; p && !configfs_is_root(p); p = p->ci_parent) {
 		int cur = strlen(config_item_name(p));
 
 		/* back up enough to print this bus id with '/' */
@@ -70,7 +70,7 @@
  		       struct config_item *item,
 		       struct dentry *dentry)
 {
-	struct configfs_dirent *target_sd = item->dentry->d_fsdata;
+	struct configfs_dirent *target_sd = item->ci_dentry->d_fsdata;
 	struct configfs_symlink *sl;
 	int ret;
 
@@ -80,8 +80,8 @@
 		sl->sl_target = config_item_get(item);
 		/* FIXME: needs a lock, I'd bet */
 		list_add(&sl->sl_list, &target_sd->s_links);
-		ret = configfs_create_link(sl, parent_item->dentry,
-					 dentry);
+		ret = configfs_create_link(sl, parent_item->ci_dentry,
+					   dentry);
 		if (ret) {
 			list_del_init(&sl->sl_list);
 			config_item_put(item);
@@ -120,24 +120,24 @@
 	struct nameidata nd;
 	struct config_item *parent_item;
 	struct config_item *target_item;
-	struct config_item_type *uktype;
+	struct config_item_type *type;
 
 	ret = -EPERM;  /* What lack-of-symlink returns */
 	if (dentry->d_parent == configfs_sb->s_root)
 		goto out;
 
 	parent_item = configfs_get_config_item(dentry->d_parent);
-	uktype = parent_item->ktype;
+	type = parent_item->ci_type;
 
-	if (!uktype || !uktype->ct_item_ops ||
-	    !uktype->ct_item_ops->allow_link)
+	if (!type || !type->ct_item_ops ||
+	    !type->ct_item_ops->allow_link)
 		goto out_put;
 
 	ret = get_target(symname, &nd, &target_item);
 	if (ret)
 		goto out_put;
 
-	ret = uktype->ct_item_ops->allow_link(parent_item, target_item);
+	ret = type->ct_item_ops->allow_link(parent_item, target_item);
 	if (!ret)
 		ret = create_link(parent_item, target_item, dentry);
 
@@ -156,7 +156,7 @@
 	struct configfs_dirent *sd = dentry->d_fsdata;
 	struct configfs_symlink *sl;
 	struct config_item *parent_item;
-	struct config_item_type *uktype;
+	struct config_item_type *type;
 	int ret;
 
 	ret = -EPERM;  /* What lack-of-symlink returns */
@@ -169,7 +169,7 @@
 	sl = sd->s_element;
 
 	parent_item = configfs_get_config_item(dentry->d_parent);
-	uktype = parent_item->ktype;
+	type = parent_item->ci_type;
 
 	list_del_init(&sd->s_sibling);
 	configfs_drop_dentry(sd, dentry->d_parent);
@@ -181,9 +181,9 @@
 	 * list_del_init(&sl->sl_list), so that the order of
 	 * drop_link(this, target) and drop_item(target) is preserved.
 	 */
-	if (uktype && uktype->ct_item_ops &&
-	    uktype->ct_item_ops->drop_link)
-		uktype->ct_item_ops->drop_link(parent_item,
+	if (type && type->ct_item_ops &&
+	    type->ct_item_ops->drop_link)
+		type->ct_item_ops->drop_link(parent_item,
 					       sl->sl_target);
 
 	/* FIXME: Needs lock */

Modified: trunk/fs/ocfs2/cluster/heartbeat.c
===================================================================
--- trunk/fs/ocfs2/cluster/heartbeat.c	2005-03-31 01:29:03 UTC (rev 2094)
+++ trunk/fs/ocfs2/cluster/heartbeat.c	2005-03-31 02:12:48 UTC (rev 2095)
@@ -603,7 +603,7 @@
 	atomic_set(&reg->hr_steady_iterations, 2);
 
 	reg->hr_task = kthread_run(hb_thread, reg, "hb-%s",
-				   reg->hr_item.k_name);
+				   reg->hr_item.ci_name);
 	if (IS_ERR(reg->hr_task)) {
 		reg->hr_task = NULL;
 		goto out;

Modified: trunk/fs/ocfs2/cluster/nodemanager.c
===================================================================
--- trunk/fs/ocfs2/cluster/nodemanager.c	2005-03-31 01:29:03 UTC (rev 2094)
+++ trunk/fs/ocfs2/cluster/nodemanager.c	2005-03-31 02:12:48 UTC (rev 2095)
@@ -224,7 +224,7 @@
 {
 	/* through the first node_set .parent
 	 * mycluster/nodes/mynode == nm_cluster->nm_node_group->nm_node */
-	return to_nm_cluster(node->nd_item.parent->parent);
+	return to_nm_cluster(node->nd_item.ci_parent->ci_parent);
 }
 
 enum {
@@ -521,7 +521,7 @@
 	if (node == NULL)
 		goto out; /* ENOMEM */
 
-	strcpy(node->nd_name, name); /* use item.name instead? */
+	strcpy(node->nd_name, name); /* use item.ci_namebuf instead? */
 
 	/* this should be somewhere else */
 	nip = &node->nd_net_inode_private;
@@ -550,7 +550,7 @@
 static void nm_node_group_drop_item(struct config_group *group, struct config_item *item)
 {
 	struct nm_node *node = to_nm_node(item);
-	struct nm_cluster *cluster = to_nm_cluster(group->cg_item.parent);
+	struct nm_cluster *cluster = to_nm_cluster(group->cg_item.ci_parent);
 
 	net_stop_node_sock(node);
 
@@ -700,8 +700,8 @@
 	.cs_subsys = {
 		.su_group = {
 			.cg_item = {
-				.name = "cluster",
-				.ktype = &nm_cluster_group_type,
+				.ci_namebuf = "cluster",
+				.ci_type = &nm_cluster_group_type,
 			},
 		},
 	},



More information about the Ocfs2-commits mailing list