[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/gfs2/convert gfs2_convert.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	rpeterso sourceware org	2006-11-08 21:14:01

Modified files:
	gfs2/convert   : gfs2_convert.c 

Log message:
	This is the fix for Bugzilla Bug 214513: gfs2_convert must reject
	file systems with block size != 4K.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs2/convert/gfs2_convert.c.diff?cvsroot=cluster&r1=1.7&r2=1.8

--- cluster/gfs2/convert/gfs2_convert.c	2006/08/14 02:03:29	1.7
+++ cluster/gfs2/convert/gfs2_convert.c	2006/11/08 21:14:01	1.8
@@ -773,6 +773,17 @@
 		close(sbp->device_fd);
 		exit(-1);
 	}
+	if (sbp->sd_sb.sb_bsize != GFS2_DEFAULT_BSIZE) {
+		log_crit("Error: GFS2 only supports a 4K block size.\n");
+		log_crit("Volume %s has a block size of ", device);
+		if (!(sbp->sd_sb.sb_bsize % 1024)) /* if even K boundary */
+			log_crit("%dK bytes.\n", sbp->sd_sb.sb_bsize / 1024);
+		else
+			log_crit("%d bytes.\n", sbp->sd_sb.sb_bsize);
+		log_crit("This file system cannot be converted with this tool.\n");
+		close(sbp->device_fd);
+		exit(-1);
+	}
 	/* get gfs1 rindex inode - gfs1's rindex inode ptr became __pad2 */
 	gfs2_inum_in(&inum, (char *)&raw_gfs1_ondisk_sb.sb_rindex_di);
 	sbp->md.riinode = gfs2_load_inode(sbp, inum.no_addr);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]