From stas@dracon.310.ru  Sun Aug  7 05:28:50 2005
Return-Path: <stas@dracon.310.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A41B916A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  7 Aug 2005 05:28:50 +0000 (GMT)
	(envelope-from stas@dracon.310.ru)
Received: from dracon.310.ru (dracon.310.ru [83.97.105.66])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0BE3B43D49
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  7 Aug 2005 05:28:49 +0000 (GMT)
	(envelope-from stas@dracon.310.ru)
Received: from dracon.310.ru (localhost.310.ru [127.0.0.1])
	by dracon.310.ru (8.13.3/8.13.1) with ESMTP id j775SmpP052459
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 7 Aug 2005 09:28:48 +0400 (MSD)
	(envelope-from stas@dracon.310.ru)
Received: (from stas@localhost)
	by dracon.310.ru (8.13.3/8.13.1/Submit) id j775Sh7q052458;
	Sun, 7 Aug 2005 09:28:43 +0400 (MSD)
	(envelope-from stas)
Message-Id: <200508070528.j775Sh7q052458@dracon.310.ru>
Date: Sun, 7 Aug 2005 09:28:43 +0400 (MSD)
From: Stanislav Sedov <stas@310.ru>
Reply-To: Stanislav Sedov <stas@310.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: GEOM LABEL sometimes doesn't recognize labels on UFS1 parts
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         84637
>Category:       kern
>Synopsis:       [geom] [patch] GEOM LABEL sometimes doesn't recognize labels on UFS1 parts
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pjd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 07 05:30:18 GMT 2005
>Closed-Date:    Sat Sep 16 11:25:30 GMT 2006
>Last-Modified:  Sat Sep 23 10:00:44 GMT 2006
>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:
Responsible-Changed-From-To: freebsd-bugs->pjd 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Thu Aug 11 11:14:36 GMT 2005 
Responsible-Changed-Why:  
Assign to author. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=84637 
State-Changed-From-To: open->feedback 
State-Changed-By: pjd 
State-Changed-When: Sat Sep 16 10:57:14 UTC 2006 
State-Changed-Why:  
Is it still the case? If so, can you update the patch? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=84637 
State-Changed-From-To: feedback->closed 
State-Changed-By: pjd 
State-Changed-When: Sat Sep 16 11:24:46 UTC 2006 
State-Changed-Why:  
Author's e-mail doesn't work, but I confirmed the problem still exist 
and committed a fix. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=84637 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/84637: commit references a PR
Date: Sat, 16 Sep 2006 11:24:57 +0000 (UTC)

 pjd         2006-09-16 11:24:41 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/geom/label       g_label_ufs.c 
   Log:
   Fix detecting of UFS1 label when mediasize%fragsize != 0.
   
   Submitted by:   Stanislav Sedov
   PR:             kern/84637
   MFC after:      1 week
   
   Revision  Changes    Path
   1.11      +2 -2      src/sys/geom/label/g_label_ufs.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/84637: commit references a PR
Date: Sat, 23 Sep 2006 09:59:04 +0000 (UTC)

 pjd         2006-09-23 09:58:50 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sys/geom/label       g_label_ufs.c 
   Log:
   MFC:    sys/geom/label/g_label_ufs.c    1.11
   
   Fix detecting of UFS1 label when mediasize%fragsize != 0.
   
   Submitted by:   Stanislav Sedov
   PR:             kern/84637
   Approved by:    re (hrs)
   
   Revision  Changes    Path
   1.3.2.4   +2 -2      src/sys/geom/label/g_label_ufs.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
