Date: Thu, 24 May 2012 16:48:33 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r235918 - head/sys/geom/label Message-ID: <201205241648.q4OGmXha049187@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205241648.q4OGmXha049187>