[SSI] openssi/kernel/cluster/ssi/cfs cfs_svc.c, 1.20, 1.21 vfs.c, 1.33, 1.34
John Hughes <[email protected]> Sat, 13 Feb 2010 14:57:56 +0000
| Newsgroups | gmane.linux.cluster.ssic.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv31045/cluster/ssi/cfs
Modified Files:
Tag: OPENSSI-FC
cfs_svc.c vfs.c
Log Message:
Fix warnings on lp64 systems
Index: cfs_svc.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs/cfs_svc.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- cfs_svc.c 17 Dec 2009 06:43:50 -0000 1.20
+++ cfs_svc.c 13 Feb 2010 14:57:54 -0000 1.21
@@ -73,10 +73,21 @@
*/
#define CFS_NODETRAN_BKCACHE 0x00000001
+/*
+ * A note about programming for LP64 (sizeof long == sizeof pointer == 64 bits)
+ *
+ * Some of this code stores clusternode_t (32 bits, we don't cope with > 4 billion nodes
+ * yet) in void* pointers. This is safe as on 32 bit systems sizeof clusternode_t ==
+ * sizeof void* and on 64bit (LP64) sizeof clusternode_t < sizeof void*. However
+ * just casting a void* to a clusternode_ t will give us a nasty warning - the compiler
+ * thinks we may be throwing data away. Avoid the problem by casting to long.
+ *
+ */
+
void
cfs_nodedown_thread(void *arg)
{
- clusternode_t node = (clusternode_t)arg;
+ clusternode_t node = (long)arg; /* See LP64 note */
struct super_block *sb;
struct vfsmount *rootmnt;
cfs_mntinfo_t *mip; /* CFS mount information. */
@@ -310,7 +321,7 @@
* nodedown services.
*/
error = spawn_daemon_thread(
- "cfs failover", cfs_nodedown_thread, (void *)node);
+ "cfs failover", cfs_nodedown_thread, (void *)(long)node);
if (error != 0)
printk(KERN_CRIT "cfs_nodedown: spawn_daemon_thread: "
" error %d", error);
Index: vfs.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs/vfs.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- vfs.c 17 Dec 2009 06:43:50 -0000 1.33
+++ vfs.c 13 Feb 2010 14:57:54 -0000 1.34
@@ -894,7 +894,7 @@
}
#endif /* CFS_GATHERWRITES */
- dprintk("cfsd: write complete err=%d\n", err);
+ dprintk("cfsd: write complete err=%ld\n", err);
if (err >= 0)
err = 0;
out_close:
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev