From marck@woozle.rinet.ru  Sat Mar  6 06:33:53 2004
Return-Path: <marck@woozle.rinet.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 6DE5E16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  6 Mar 2004 06:33:53 -0800 (PST)
Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7408043D2F
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  6 Mar 2004 06:33:52 -0800 (PST)
	(envelope-from marck@woozle.rinet.ru)
Received: from woozle.rinet.ru (localhost [127.0.0.1])
	by woozle.rinet.ru (8.12.10/8.12.10) with ESMTP id i26EXoci012163
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 6 Mar 2004 17:33:50 +0300 (MSK)
	(envelope-from marck@woozle.rinet.ru)
Received: (from marck@localhost)
	by woozle.rinet.ru (8.12.10/8.12.10/Submit) id i26EXoZH012162;
	Sat, 6 Mar 2004 17:33:50 +0300 (MSK)
	(envelope-from marck)
Message-Id: <200403061433.i26EXoZH012162@woozle.rinet.ru>
Date: Sat, 6 Mar 2004 17:33:50 +0300 (MSK)
From: Dmitry Morozovsky <marck@rinet.ru>
Reply-To: Dmitry Morozovsky <marck@rinet.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] vinum fake-disklabel block/frag fix
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         63839
>Category:       kern
>Synopsis:       [patch] vinum fake-disklabel block/frag fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    le
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 06 06:40:11 PST 2004
>Closed-Date:    Tue Mar 09 02:22:49 PST 2004
>Last-Modified:  Tue Mar 09 02:22:49 PST 2004
>Originator:     Dmitry Morozovsky
>Release:        FreeBSD 4-STABLE i386
>Organization:
Cronyx Plus LLC (RiNet ISP)
>Environment:
System: FreeBSD 4-STABLE 


>Description:

This patch changes vinum fake-disklabel block/frag size from default 8k/1k to
more approppriate for modern disks 16k/2k. Also, it removes duplicate
assignment. It applies to both -current and -stable.

>How-To-Repeat:

Configure vinum volume

disklabel /dev/vinum/${volume}

Watch for values in 'a' partition.

>Fix:


Index: sys/dev/vinum/vinumio.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/vinum/vinumio.c,v
retrieving revision 1.52.2.6
diff -u -r1.52.2.6 vinumio.c
--- sys/dev/vinum/vinumio.c	2 May 2002 08:43:44 -0000	1.52.2.6
+++ sys/dev/vinum/vinumio.c	6 Mar 2004 14:18:23 -0000
@@ -750,9 +750,8 @@
      * swap, c is nothing.
      */
     lp->d_partitions[0].p_size = size;
-    lp->d_partitions[0].p_fsize = 1024;
     lp->d_partitions[0].p_fstype = FS_BSDFFS;		    /* FreeBSD File System :-) */
-    lp->d_partitions[0].p_fsize = 1024;			    /* FS fragment size */
+    lp->d_partitions[0].p_fsize = 2048;			    /* FS fragment size */
     lp->d_partitions[0].p_frag = 8;			    /* and fragments per block */
     lp->d_partitions[SWAP_PART].p_size = size;
     lp->d_partitions[SWAP_PART].p_fstype = FS_SWAP;	    /* swap partition */
>Release-Note:
>Audit-Trail:

From: Greg 'groggy' Lehey <grog@FreeBSD.org>
To: Dmitry Morozovsky <marck@rinet.ru>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: kern/63839: [patch] vinum fake-disklabel block/frag fix
Date: Sun, 7 Mar 2004 10:45:54 +1030

 --On39KRpqOYGa2XmA
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Saturday,  6 March 2004 at 17:33:50 +0300, Dmitry Morozovsky wrote:
 >
 >> Number:         63839
 >> Category:       kern
 >> Synopsis:       [patch] vinum fake-disklabel block/frag fix
 >> Confidential:   no
 >> Severity:       non-critical
 >> Priority:       low
 >> Responsible:    freebsd-bugs
 >> State:          open
 >> Quarter:
 >> Keywords:
 >> Date-Required:
 >> Class:          sw-bug
 >> Submitter-Id:   current-users
 >> Arrival-Date:   Sat Mar 06 06:40:11 PST 2004
 >> Closed-Date:
 >> Last-Modified:
 >> Originator:     Dmitry Morozovsky
 >> Release:        FreeBSD 4-STABLE i386
 >> Organization:
 > Cronyx Plus LLC (RiNet ISP)
 >> Environment:
 > System: FreeBSD 4-STABLE
 >
 >
 >> Description:
 >
 > This patch changes vinum fake-disklabel block/frag size from default 8k/1k to
 > more approppriate for modern disks 16k/2k. Also, it removes duplicate
 > assignment. It applies to both -current and -stable.
 
 Why do you want to do this?  When do you ever use the "label"?  I'd
 much rather see the label go away.  It's not needed for anything that
 I know about.
 
 Greg
 --
 Note: I discard all HTML mail unseen.
 Finger grog@FreeBSD.org for PGP public key.
 See complete headers for address and phone numbers.
 
 --On39KRpqOYGa2XmA
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.0 (FreeBSD)
 
 iD8DBQFASmm6IubykFB6QiMRAkkPAJ446ailUPdZyvSfH568s50bvDnMxwCfRGH7
 AHkw+8iUcz0Oxy2msX7PMWw=
 =MT0G
 -----END PGP SIGNATURE-----
 
 --On39KRpqOYGa2XmA--

From: Dmitry Morozovsky <marck@rinet.ru>
To: "Greg 'groggy' Lehey" <grog@FreeBSD.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: kern/63839: [patch] vinum fake-disklabel block/frag fix
Date: Sun, 7 Mar 2004 10:41:36 +0300 (MSK)

 On Sun, 7 Mar 2004, Greg 'groggy' Lehey wrote:
 
 GgL> > This patch changes vinum fake-disklabel block/frag size from default 8k/1k to
 GgL> > more approppriate for modern disks 16k/2k. Also, it removes duplicate
 GgL> > assignment. It applies to both -current and -stable.
 GgL>
 GgL> Why do you want to do this?  When do you ever use the "label"?  I'd
 GgL> much rather see the label go away.  It's not needed for anything that
 GgL> I know about.
 
 Not exactly ;-) Yes, AFAIK it is not needed in -current, but it simplify
 newfs'ing Vinum volume under -stable, where newfs uses fake disklabel info to
 determine default frag/block size.
 
 Before this patch news with default parameters would use
 
 root@whale:/# newfs -N -v /dev/vinum/obj
 Warning: Block size and bytes per inode restrict cylinders per group to 22.
 Warning: 1536 sector(s) in last cylinder unallocated
 /dev/vinum/obj: 25164288 sectors in 6144 cylinders of 1 tracks, 4096 sectors
         12287.2MB in 280 cyl groups (22 c/g, 44.00MB/g, 10944 i/g)
 super-block backups (for fsck -b #) at:
  32, 90144, 180256, 270368, 360480, 450592, 540704, 630816, 720928, 811040,
 [...]
 
 So you should explicitely use -f/-b for setting 2k/16k.
 
 After patch, you will automagically get more appropriate for multi-gigabyte
 partition blocksizes:
 
 root@whale:/# newfs -N -v /dev/vinum/obj
 Warning: Block size and bytes per inode restrict cylinders per group to 89.
 Warning: 1536 sector(s) in last cylinder unallocated
 /dev/vinum/obj: 25164288 sectors in 6144 cylinders of 1 tracks, 4096 sectors
         12287.2MB in 70 cyl groups (89 c/g, 178.00MB/g, 22144 i/g)
 super-block backups (for fsck -b #) at:
  32, 364576, 729120, 1093664, 1458208, 1822752, 2187296, 2551840, 2916384,
 [...]
 
 Sincerely,
 D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
 ------------------------------------------------------------------------
 *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
 ------------------------------------------------------------------------
Responsible-Changed-From-To: freebsd-bugs->le 
Responsible-Changed-By: le 
Responsible-Changed-When: Sun Mar 7 16:25:02 PST 2004 
Responsible-Changed-Why:  
I'll handle this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63839 
State-Changed-From-To: open->closed 
State-Changed-By: le 
State-Changed-When: Tue Mar 9 02:22:38 PST 2004 
State-Changed-Why:  
Patch committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=63839 
>Unformatted:
