[Ocfs2-commits] mfasheh commits r1430 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Sep 7 13:41:26 CDT 2004
Author: mfasheh
Date: 2004-09-07 13:41:25 -0500 (Tue, 07 Sep 2004)
New Revision: 1430
Modified:
trunk/src/vote.c
trunk/src/vote.h
Log:
* commit parts of a patch by Christoph Hellwig <hch at lst.de>:
Subject: [Ocfs2-devel] [PATCH] remove dead code from vote.c
Modified: trunk/src/vote.c
===================================================================
--- trunk/src/vote.c 2004-09-07 18:36:29 UTC (rev 1429)
+++ trunk/src/vote.c 2004-09-07 18:41:25 UTC (rev 1430)
@@ -1098,38 +1098,6 @@
ocfs_node_map_set(target, from);
}
-// expects that "target" is already inited with correct
-// num_nodes, and that "from" is of course wide enough
-/* Force le32 as the endian format for on-disk node maps */
-#define OCFS_NODE_MAP_DISK_BITS_PER_LONG 32
-#define OCFS_NODE_MAP_DISK_BITS_TO_LONGS(bits) \
- (((bits)+OCFS_NODE_MAP_DISK_BITS_PER_LONG-1)/OCFS_NODE_MAP_DISK_BITS_PER_LONG)
-void ocfs_node_map_set_from_disk(ocfs_node_map *target, void *from)
-{
- int i, num_u32;
- u32 *t = (u32 *)target->map;
- u32 *f = from;
-
- OCFS_ASSERT(target->num_nodes > 0);
-
- num_u32 = OCFS_NODE_MAP_DISK_BITS_TO_LONGS(target->num_nodes);
- for (i = 0; i < num_u32; i++)
- t[i] = le32_to_cpu(f[i]);
-}
-
-void ocfs_node_map_set_to_disk(void *target, ocfs_node_map *from)
-{
- int i, num_u32;
- u32 *t = target;
- u32 *f = (u32 *)from->map;
-
- OCFS_ASSERT(from->num_nodes > 0);
-
- num_u32 = OCFS_NODE_MAP_DISK_BITS_TO_LONGS(from->num_nodes);
- for (i=0; i<num_u32; i++)
- t[i] = cpu_to_le32(f[i]);
-}
-
/* returns 1 if bit is the only bit set in target, 0 otherwise */
int ocfs_node_map_is_only(ocfs_super *osb, ocfs_node_map *target, int bit)
{
Modified: trunk/src/vote.h
===================================================================
--- trunk/src/vote.h 2004-09-07 18:36:29 UTC (rev 1429)
+++ trunk/src/vote.h 2004-09-07 18:41:25 UTC (rev 1430)
@@ -65,10 +65,6 @@
void ocfs_node_map_and(ocfs_node_map *target, ocfs_node_map *mask);
void ocfs_node_map_set(ocfs_node_map *target, ocfs_node_map *from);
void ocfs_node_map_dup(ocfs_super *osb, ocfs_node_map *target, ocfs_node_map *from);
-// expects that "target" is already inited with correct
-// num_nodes, and that "from" is of course wide enough
-void ocfs_node_map_set_from_disk(ocfs_node_map *target, void *from);
-void ocfs_node_map_set_to_disk(void *target, ocfs_node_map *from);
/* returns 1 if bit is the only bit set in target, 0 otherwise */
int ocfs_node_map_is_only(ocfs_super *osb, ocfs_node_map *target, int bit);
More information about the Ocfs2-commits
mailing list