[Ocfs2-commits] mfasheh commits r1620 - branches/dlm-glue/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Nov 3 13:34:24 CST 2004


Author: mfasheh
Date: 2004-11-03 13:34:22 -0600 (Wed, 03 Nov 2004)
New Revision: 1620

Modified:
   branches/dlm-glue/src/aops.c
   branches/dlm-glue/src/super.c
Log:
* bring the dlm-glue branch up to date with r1617 of trunk.



Modified: branches/dlm-glue/src/aops.c
===================================================================
--- branches/dlm-glue/src/aops.c	2004-11-03 02:25:56 UTC (rev 1619)
+++ branches/dlm-glue/src/aops.c	2004-11-03 19:34:22 UTC (rev 1620)
@@ -498,7 +498,6 @@
 {
 	int ret = -1;
 	int status;
-	ocfs_super *osb = NULL;
 	u64 vbo_max; /* file offset, max_blocks from iblock */
 	u64 p_blkno;
 	int contig_blocks;

Modified: branches/dlm-glue/src/super.c
===================================================================
--- branches/dlm-glue/src/super.c	2004-11-03 02:25:56 UTC (rev 1619)
+++ branches/dlm-glue/src/super.c	2004-11-03 19:34:22 UTC (rev 1620)
@@ -1130,6 +1130,14 @@
 	printk("clusterbits=%d\n", osb->s_clustersize_bits);
 	OCFS_ASSERT(osb->s_clustersize_bits);
 
+	if (ocfs2_clusters_to_blocks(osb->sb, le32_to_cpu(di->i_clusters) - 1)
+	    > (u32)~0UL) {
+		LOG_ERROR_ARGS("Volume might try to write to blocks beyond "
+				"what jbd can address in 32 bits.\n");
+		status = -EINVAL;
+		goto bail;
+	}
+
 	strncpy(osb->vol_label, di->id2.i_super.s_label, 63);
 	osb->vol_label[63] = '\0';
 	memcpy(osb->uuid, di->id2.i_super.s_uuid, MAX_VOL_ID_LENGTH);



More information about the Ocfs2-commits mailing list