[Ocfs2-tools-commits] smushran commits r972 - trunk/mkfs.ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Jun 21 19:20:59 CDT 2005


Author: smushran
Signed-off-by: mfasheh
Date: 2005-06-21 19:20:56 -0500 (Tue, 21 Jun 2005)
New Revision: 972

Modified:
   trunk/mkfs.ocfs2/mkfs.c
Log:
fixes bug#486 mkfs no longer making smaller than 4M journals
Signed-off-by: mfasheh

Modified: trunk/mkfs.ocfs2/mkfs.c
===================================================================
--- trunk/mkfs.ocfs2/mkfs.c	2005-06-21 22:14:40 UTC (rev 971)
+++ trunk/mkfs.ocfs2/mkfs.c	2005-06-22 00:20:56 UTC (rev 972)
@@ -801,7 +801,7 @@
 	}
 
 	if (s->volume_size_in_blocks < 32768)
-		j_blocks = 1024;
+		j_blocks = OCFS2_MIN_JOURNAL_SIZE / s->blocksize;
 	else if (s->volume_size_in_blocks < 262144)
 		j_blocks = 4096;
 	else
@@ -2037,19 +2037,19 @@
 	ret = ocfs2_open(s->device_name, OCFS2_FLAG_RW, 0, 0, &fs);
 	if (ret) {
 		com_err(s->progname, ret, "while opening new file system");
-		exit(1);
+		goto bail;
 	}
 
 	ret = ocfs2_new_inode(fs, &lost_found_blkno, S_IFDIR | 0755);
 	if (ret) {
 		com_err(s->progname, ret, "while creating lost+found");
-		exit(1);
+		goto bail;
 	}
 
 	ret = ocfs2_expand_dir(fs, lost_found_blkno, fs->fs_root_blkno);
 	if (ret) {
 		com_err(s->progname, ret, "while adding lost+found dir data");
-		exit(1);
+		goto bail;
 	}
 
 	ret = ocfs2_link(fs, fs->fs_root_blkno, "lost+found", lost_found_blkno,
@@ -2057,8 +2057,13 @@
 	if (ret) {
 		com_err(s->progname, ret, "while linking lost+found to the "
 			"root directory");
-		exit(1);
+		goto bail;
 	}
 
 	ocfs2_close(fs);
+	return ;
+
+bail:
+	clear_both_ends(s);
+	exit(1);
 }



More information about the Ocfs2-tools-commits mailing list