Date: Sun, 7 Aug 2005 09:28:43 +0400 (MSD) From: Stanislav Sedov <stas@310.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/84637: GEOM LABEL sometimes doesn't recognize labels on UFS1 parts Message-ID: <200508070528.j775Sh7q052458@dracon.310.ru> Resent-Message-ID: <200508070530.j775UIvI073543@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 84637
>Category: kern
>Synopsis: GEOM LABEL sometimes doesn't recognize labels on UFS1 parts
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Aug 07 05:30:18 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Stanislav Sedov
>Release: FreeBSD 7.0-CURRENT i386
>Organization:
310.ru [Tridesyatoe]
>Environment:
System: FreeBSD stalingrad.realnet 7.0-CURRENT FreeBSD 7.0-CURRENT #96: Thu Jul 28 21:05:39 UTC 2005 root@stalingrad.realnet:/work/src/fbsd-cur/src/sys/i386/compile/DESKTOP i386
>Description:
GEOM label class doesn't recognize labels on UFS partitions where
mediasize % fragsize != 0.
>How-To-Repeat:
>Fix:
--- g_label_ufs.c.diff begins here ---
--- g_label_ufs.c.orig Mon Jul 25 13:42:13 2005
+++ g_label_ufs.c Mon Jul 25 13:33:29 2005
@@ -78,8 +78,8 @@
if (fs->fs_magic == FS_UFS1_MAGIC) {
G_LABEL_DEBUG(1, "UFS1 file system detected on %s.",
pp->name);
- if (fs->fs_old_size * fs->fs_fsize !=
- (int32_t)pp->mediasize) {
+ if (fs->fs_fsize <= 0 ||
+ pp->mediasize / fs->fs_fsize != fs->fs_old_size) {
G_LABEL_DEBUG(1, "Incorrect superblock " \
"parameters on %s.", pp->name);
g_free(fs);
@@ -90,6 +90,8 @@
pp->name);
if (fs->fs_fsize <= 0 ||
pp->mediasize / fs->fs_fsize != fs->fs_size) {
+ G_LABEL_DEBUG(1, "Incorrect superblock " \
+ "parameters on %s.", pp->name);
g_free(fs);
continue;
}
--- g_label_ufs.c.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508070528.j775Sh7q052458>
