[Ocfs2-tools-commits] zab commits r1069 - in trunk: libocfs2 libocfs2/include mkfs.ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Aug 31 18:04:34 CDT 2005


Author: zab
Signed-off-by: mfasheh
Date: 2005-08-31 18:04:31 -0500 (Wed, 31 Aug 2005)
New Revision: 1069

Modified:
   trunk/libocfs2/chainalloc.c
   trunk/libocfs2/getsize.c
   trunk/libocfs2/include/ocfs2.h
   trunk/mkfs.ocfs2/mkfs.c
Log:
o fix some 32->64bit wrapping problems that start to appear with large volumes

Signed-off-by: mfasheh


Modified: trunk/libocfs2/chainalloc.c
===================================================================
--- trunk/libocfs2/chainalloc.c	2005-08-30 18:55:27 UTC (rev 1068)
+++ trunk/libocfs2/chainalloc.c	2005-08-31 23:04:31 UTC (rev 1069)
@@ -307,7 +307,7 @@
 	if (cinode->ci_chains)
 		ocfs2_bitmap_free(cinode->ci_chains);
 
-	total_bits = fs->fs_clusters *
+	total_bits = (uint64_t)fs->fs_clusters *
 		cinode->ci_inode->id2.i_chain.cl_bpc;
 
 	snprintf(name, sizeof(name),

Modified: trunk/libocfs2/getsize.c
===================================================================
--- trunk/libocfs2/getsize.c	2005-08-30 18:55:27 UTC (rev 1068)
+++ trunk/libocfs2/getsize.c	2005-08-31 23:04:31 UTC (rev 1069)
@@ -124,7 +124,7 @@
  * Returns the number of blocks in a partition
  */
 errcode_t ocfs2_get_device_size(const char *file, int blocksize,
-				 uint32_t *retblocks)
+				 uint64_t *retblocks)
 {
 	int	fd;
 	int valid_blkgetsize64 = 1;

Modified: trunk/libocfs2/include/ocfs2.h
===================================================================
--- trunk/libocfs2/include/ocfs2.h	2005-08-30 18:55:27 UTC (rev 1068)
+++ trunk/libocfs2/include/ocfs2.h	2005-08-31 23:04:31 UTC (rev 1069)
@@ -433,7 +433,7 @@
 				   uint64_t first_bit);
 
 errcode_t ocfs2_get_device_size(const char *file, int blocksize,
-				uint32_t *retblocks);
+				uint64_t *retblocks);
 
 errcode_t ocfs2_get_device_sectsize(const char *file, int *sectsize);
 

Modified: trunk/mkfs.ocfs2/mkfs.c
===================================================================
--- trunk/mkfs.ocfs2/mkfs.c	2005-08-30 18:55:27 UTC (rev 1068)
+++ trunk/mkfs.ocfs2/mkfs.c	2005-08-31 23:04:31 UTC (rev 1069)
@@ -817,7 +817,7 @@
 	errcode_t err;
 	uint32_t blocksize;
 	int sectsize;
-	uint32_t ret;
+	uint64_t ret;
 	struct ocfs2_cluster_group_sizes cgs;
 	uint64_t tmp;
 



More information about the Ocfs2-tools-commits mailing list