svn commit: r235918 - head/sys/geom/label

Edward Tomasz Napierala trasz at FreeBSD.org
Thu May 24 16:48:34 UTC 2012


Author: trasz
Date: Thu May 24 16:48:33 2012
New Revision: 235918
URL: http://svn.freebsd.org/changeset/base/235918

Log:
  Make g_label(4) ignore provider size when looking for UFS labels.
  Without it, it fails to create labels for filesystems resized by
  growfs(8).
  
  PR:		kern/165962
  Submitted by:	Olivier Cochard-Labbe <olivier at cochard dot me>

Modified:
  head/sys/geom/label/g_label_ufs.c

Modified: head/sys/geom/label/g_label_ufs.c
==============================================================================
--- head/sys/geom/label/g_label_ufs.c	Thu May 24 16:41:26 2012	(r235917)
+++ head/sys/geom/label/g_label_ufs.c	Thu May 24 16:48:33 2012	(r235918)
@@ -81,12 +81,10 @@ g_label_ufs_taste_common(struct g_consum
 		fs = (struct fs *)g_read_data(cp, superblock, SBLOCKSIZE, NULL);
 		if (fs == NULL)
 			continue;
-		/* Check for magic and make sure things are the right size */
-		if (fs->fs_magic == FS_UFS1_MAGIC && fs->fs_fsize > 0 &&
-		    pp->mediasize / fs->fs_fsize == fs->fs_old_size) {
+		/* Check for magic */
+		if (fs->fs_magic == FS_UFS1_MAGIC && fs->fs_fsize > 0) {
 		    	/* Valid UFS1. */
-		} else if (fs->fs_magic == FS_UFS2_MAGIC && fs->fs_fsize > 0 &&
-		    pp->mediasize / fs->fs_fsize == fs->fs_size) {
+		} else if (fs->fs_magic == FS_UFS2_MAGIC && fs->fs_fsize > 0) {
 		    	/* Valid UFS2. */
 		} else {
 			g_free(fs);


More information about the svn-src-all mailing list