[SSI] openssi/kernel/include/cluster/ssi namespace.h, 1.5, 1.6 ssidev.h, 1.14, 1.15

Roger Tsang <[email protected]> Tue, 02 Feb 2010 05:23:57 +0000
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20997/include/cluster/ssi

Modified Files:
      Tag: OPENSSI-FC
	namespace.h ssidev.h 
Log Message:
SSIDEV:
- Optimize away kmalloc() calls in rssidev_sync() code path; pre-allocate
  ic_chunks in ics_chunk_t.

SSIDEV (#ifdef SSIDEV_HASH_SD_LIST_FIX):
- Fix dereferencing uninitialized list_head struct in ssidev_hash struct.
  Affects ssidev_unique_list and ssidev_free_list list traversal.
- Fix inappropriate use of doubly linked-list for single linked-list traversal.
- Convert ssidev_linux_hash[] array of pointers to array of Linux list_head
  structs allocated from the slab.


Index: namespace.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/namespace.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- namespace.h	12 Nov 2004 03:21:46 -0000	1.5
+++ namespace.h	2 Feb 2010 05:23:55 -0000	1.6
@@ -40,6 +40,9 @@
 	error = ssidev_get_unique(&dev);
 	if (error >= 0)
 		mnt->mnt_uniqueid = (unsigned long)dev;
+	else
+		printk(KERN_ERR "%s: ssidev_get_unique error %d\n",
+				__FUNCTION__, error);
 }
 
 static inline void ssi_put_mntid(struct vfsmount *mnt)

Index: ssidev.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/include/cluster/ssi/ssidev.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- ssidev.h	24 Mar 2009 04:26:29 -0000	1.14
+++ ssidev.h	2 Feb 2010 05:23:55 -0000	1.15
@@ -57,8 +57,10 @@
 	struct list_head	sd_list;
 	ssidev_hash_data_t	sd_data;
 };
+#ifndef SSIDEV_HASH_SD_LIST_FIX
 #define sd_linuxnext	sd_list.prev
 #define sd_ssinext	sd_list.next
+#endif /* !SSIDEV_HASH_SD_LIST_FIX */
 
 typedef struct {
 	int		sf_transid;
@@ -241,12 +243,10 @@
 
 static inline int ssidev_is_local(int mode, dev_t linuxdev)
 {
-	int major = MAJOR(linuxdev);
-	int minor = MINOR(linuxdev);
-
 	SSI_ASSERT(S_ISBLK(mode) || S_ISCHR(mode));
-	return ((major == UNNAMED_MAJOR && minor >= 1
-		 && minor <= UNNAMED_HACK_LEN));
+
+	return (MAJOR(linuxdev) == UNNAMED_MAJOR && MINOR(linuxdev) >= 1
+		&& MINOR(linuxdev) <= UNNAMED_HACK_LEN);
 	/* SSI_XXX: 121 was a hack for GFS.
 		(S_ISBLK(mode) && major == 121));
 	*/


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com