From owner-freebsd-bugs@FreeBSD.ORG Fri Jul 16 17:40:08 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119201065673 for ; Fri, 16 Jul 2010 17:40:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C21658FC0C for ; Fri, 16 Jul 2010 17:40:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o6GHe7ak073492 for ; Fri, 16 Jul 2010 17:40:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o6GHe7Od073491; Fri, 16 Jul 2010 17:40:07 GMT (envelope-from gnats) Resent-Date: Fri, 16 Jul 2010 17:40:07 GMT Resent-Message-Id: <201007161740.o6GHe7Od073491@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bruce Cran Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DFED106564A for ; Fri, 16 Jul 2010 17:34:18 +0000 (UTC) (envelope-from bruce@cran.org.uk) Received: from queueout02-winn.ispmail.ntl.com (queueout02-winn.ispmail.ntl.com [81.103.221.56]) by mx1.freebsd.org (Postfix) with ESMTP id 722128FC08 for ; Fri, 16 Jul 2010 17:34:13 +0000 (UTC) Received: from know-smtpout-4.server.virginmedia.net ([62.254.123.4]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20100716170739.XXGK3075.mtaout03-winn.ispmail.ntl.com@know-smtpout-4.server.virginmedia.net> for ; Fri, 16 Jul 2010 18:07:39 +0100 Received: from [86.31.3.93] (helo=bsdbook.nessbank) by know-smtpout-4.server.virginmedia.net with smtp (Exim 4.63) (envelope-from ) id 1OZoNq-0006AR-Jp for FreeBSD-gnats-submit@freebsd.org; Fri, 16 Jul 2010 18:07:35 +0100 Received: by bsdbook.nessbank (sSMTP sendmail emulation); Fri, 16 Jul 2010 18:07:49 +0100 Message-Id: <20100716170739.XXGK3075.mtaout03-winn.ispmail.ntl.com@know-smtpout-4.server.virginmedia.net> Date: Fri, 16 Jul 2010 18:07:49 +0100 From: "Bruce Cran" To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/148687: [geom] gpart prints invalid partition number when destroying X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bruce Cran List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jul 2010 17:40:08 -0000 >Number: 148687 >Category: bin >Synopsis: [geom] gpart prints invalid partition number when destroying >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 16 17:40:07 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Bruce Cran >Release: FreeBSD 9.0-HEAD-20100715-JPSNAP amd64 >Organization: >Environment: System: FreeBSD bsdbook.nessbank 9.0-HEAD-20100715-JPSNAP FreeBSD 9.0-HEAD-20100715-JPSNAP #0: Thu Jul 15 06:37:19 UTC 2010 root@build-amd64-fbsd.allbsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: After using the feature which allows the creation of slices and partitions to be undone within gpart, deleting a freebsd partition results in geom printing a large negative number instead of "1". >How-To-Repeat: gpart create -s mbr -f x da0 gpart add -t freebsd -f x da0 gpart create -s bsd -f x da0s1 gpart destroy da0s1 gpart delete -i 1 da0 A log of the output is attached. >Fix: --- gpart.log begins here --- bsdbook# dmesg | grep da0 da0 at umass-sim0 bus 0 scbus1 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0: 40.000MB/s transfers da0: 1967MB (4030463 512 byte sectors: 255H 63S/T 250C) bsdbook# gpart show da0 gpart: No such geom: da0. bsdbook# gpart create -f x -s mbr da0 da0 created bsdbook# gpart add -f x -t freebsd da0 da0s1 added bsdbook# gpart create -f x -s bsd da0s1 da0s1 created bsdbook# gpart destroy da0s1 da0s1 destroyed bsdbook# gpart delete -i 1 da0 da0s-559038242 deleted --- gpart.log ends here --- >Release-Note: >Audit-Trail: >Unformatted: >uncommitted slice/partition.