[Ocfs2-commits] zab commits r1595 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Oct 26 18:32:15 CDT 2004


Author: zab
Date: 2004-10-26 18:32:13 -0500 (Tue, 26 Oct 2004)
New Revision: 1595

Modified:
   trunk/src/super.c
Log:
o fail to mount a volume that might reference blocks outside of what jbd
  can address (will be refined later)


Modified: trunk/src/super.c
===================================================================
--- trunk/src/super.c	2004-10-26 01:08:32 UTC (rev 1594)
+++ trunk/src/super.c	2004-10-26 23:32:13 UTC (rev 1595)
@@ -1502,6 +1502,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