From owner-freebsd-geom@FreeBSD.ORG Mon Jan 28 11:06:43 2013 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E966C915 for ; Mon, 28 Jan 2013 11:06:43 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id CD512CD2 for ; Mon, 28 Jan 2013 11:06:43 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0SB6hiI034545 for ; Mon, 28 Jan 2013 11:06:43 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0SB6hc5034543 for freebsd-geom@FreeBSD.org; Mon, 28 Jan 2013 11:06:43 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 28 Jan 2013 11:06:43 GMT Message-Id: <201301281106.r0SB6hc5034543@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-geom@FreeBSD.org Subject: Current problem reports assigned to freebsd-geom@FreeBSD.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jan 2013 11:06:44 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/171865 geom [geom] [patch] g_wither_washer() keeping a core busy o kern/170038 geom [geom] geom_mirror always starts degraded after reboot o kern/169539 geom [geom] [patch] fix ability to run gmirror on MSI MegaR a bin/169077 geom bsdinstall(8) does not use partition labels in /etc/fs f kern/165745 geom [geom] geom_multipath page fault on removed drive o kern/165428 geom [glabel][patch] Add xfs support to glabel o kern/164254 geom [geom] gjournal not stopping on GPT partitions o kern/164252 geom [geom] gjournal overflow o kern/164143 geom [geom] Partition table not recognized after upgrade R8 a kern/163020 geom [geli] [patch] enable the Camellia-XTS on GEOM ELI o kern/162690 geom [geom] gpart label changes only take effect after a re o kern/162010 geom [geli] panic: Provider's error should be set (error=0) o kern/161979 geom [geom] glabel doesn't update after newfs, and glabel s o kern/161752 geom [geom] glabel(8) doesn't get gpt label change o bin/161677 geom gpart(8) Probably bug in gptboot o kern/160562 geom [geom][patch] Allow to insert new component to geom_ra o kern/160409 geom [geli] failed to attach provider f kern/159595 geom [geom] [panic] panic on gmirror unload in vbox [regres f kern/159414 geom [isp] isp(4)+gmultipath(8) : removing active fiber pat p kern/158398 geom [headers] [patch] includes o kern/158197 geom [geom] geom_cache with size>1000 leads to panics o kern/157879 geom [libgeom] [regression] ABI change without version bump o kern/157863 geom [geli] kbdmux prevents geli passwords from being enter o kern/157739 geom [geom] GPT labels with geom_multipath o kern/157724 geom [geom] gpart(8) 'add' command must preserve gap for sc o kern/157723 geom [geom] GEOM should not process 'c' (raw) partitions fo o kern/157108 geom [gjournal] dumpon(8) fails on gjournal providers o kern/155994 geom [geom] Long "Suspend time" when reading large files fr o kern/154226 geom [geom] GEOM label does not change when you modify them o kern/150858 geom [geom] [geom_label] [patch] glabel(8) is not compatibl o kern/150626 geom [geom] [gjournal] gjournal(8) destroys label o kern/150555 geom [geom] gjournal unusable on GPT partitions o kern/150334 geom [geom] [udf] [patch] geom label does not support UDF o kern/149762 geom volume labels with rogue characters o bin/149215 geom [panic] [geom_part] gpart(8): Delete linux's slice via o kern/147667 geom [gmirror] Booting with one component of a gmirror, the o kern/145818 geom [geom] geom_stat_open showing cached information for n o kern/145042 geom [geom] System stops booting after printing message "GE o kern/143455 geom gstripe(8) in RELENG_8 (31st Jan 2010) broken o kern/142563 geom [geom] [hang] ioctl freeze in zpool o kern/141740 geom [geom] gjournal(8): g_journal_destroy concurrent error o kern/140352 geom [geom] gjournal + glabel not working o kern/135898 geom [geom] Severe filesystem corruption - large files or l o kern/134113 geom [geli] Problem setting secondary GELI key o kern/133931 geom [geli] [request] intentionally wrong password to destr o bin/132845 geom [geom] [patch] ggated(8) does not close files opened a o bin/131415 geom [geli] keystrokes are unregulary sent to Geli when typ o kern/131353 geom [geom] gjournal(8) kernel lock o kern/129674 geom [geom] gjournal root did not mount on boot o kern/129645 geom gjournal(8): GEOM_JOURNAL causes system to fail to boo o kern/129245 geom [geom] gcache is more suitable for suffix based provid o kern/127420 geom [geom] [gjournal] [panic] Journal overflow on gmirrore o kern/124973 geom [gjournal] [patch] boot order affects geom_journal con o kern/124969 geom gvinum(8): gvinum raid5 plex does not detect missing s o kern/123962 geom [panic] [gjournal] gjournal (455Gb data, 8Gb journal), o kern/123122 geom [geom] GEOM / gjournal kernel lock o kern/122738 geom [geom] gmirror list "losts consumers" after gmirror de o kern/122067 geom [geom] [panic] Geom crashed during boot o kern/121364 geom [gmirror] Removing all providers create a "zombie" mir o kern/120091 geom [geom] [geli] [gjournal] geli does not prompt for pass o kern/115856 geom [geli] ZFS thought it was degraded when it should have o kern/115547 geom [geom] [patch] [request] let GEOM Eli get password fro f kern/113957 geom [gmirror] gmirror is intermittently reporting a degrad o kern/113837 geom [geom] unable to access 1024 sector size storage o kern/113419 geom [geom] geom fox multipathing not failing back o kern/107707 geom [geom] [patch] [request] add new class geom_xbox360 to o kern/94632 geom [geom] Kernel output resets input while GELI asks for o kern/90582 geom [geom] [panic] Restore cause panic string (ffs_blkfree o bin/90093 geom fdisk(8) incapable of altering in-core geometry o kern/87544 geom [gbde] mmaping large files on a gbde filesystem deadlo o bin/86388 geom [geom] [geom_part] periodic(8) daily should backup gpa o kern/84556 geom [geom] [panic] GBDE-encrypted swap causes panic at shu o kern/79251 geom [2TB] newfs fails on 2.6TB gbde device o kern/79035 geom [vinum] gvinum unable to create a striped set of mirro o bin/78131 geom gbde(8) "destroy" not working. 75 problems total. From owner-freebsd-geom@FreeBSD.ORG Tue Jan 29 17:24:19 2013 Return-Path: Delivered-To: freebsd-geom@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 66A4293C; Tue, 29 Jan 2013 17:24:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 405C5A58; Tue, 29 Jan 2013 17:24:19 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0THOJ0D077421; Tue, 29 Jan 2013 17:24:19 GMT (envelope-from mav@freefall.freebsd.org) Received: (from mav@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0THOIN9077417; Tue, 29 Jan 2013 17:24:18 GMT (envelope-from mav) Date: Tue, 29 Jan 2013 17:24:18 GMT Message-Id: <201301291724.r0THOIN9077417@freefall.freebsd.org> To: ayochum@pair.com, mav@FreeBSD.org, freebsd-geom@FreeBSD.org From: mav@FreeBSD.org Subject: Re: kern/113957: [gmirror] gmirror is intermittently reporting a degraded mirror array upon reboot. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2013 17:24:19 -0000 Synopsis: [gmirror] gmirror is intermittently reporting a degraded mirror array upon reboot. State-Changed-From-To: feedback->closed State-Changed-By: mav State-Changed-When: Tue Jan 29 17:23:15 UTC 2013 State-Changed-Why: Fix committed and merged to 8/9-STABLE. http://www.freebsd.org/cgi/query-pr.cgi?pr=113957 From owner-freebsd-geom@FreeBSD.ORG Tue Jan 29 17:30:01 2013 Return-Path: Delivered-To: freebsd-geom@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 39001B00 for ; Tue, 29 Jan 2013 17:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 2C871A99 for ; Tue, 29 Jan 2013 17:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0THU1VY077671 for ; Tue, 29 Jan 2013 17:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0THU1qr077670; Tue, 29 Jan 2013 17:30:01 GMT (envelope-from gnats) Date: Tue, 29 Jan 2013 17:30:01 GMT Message-Id: <201301291730.r0THU1qr077670@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: kern/113957: commit references a PR X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2013 17:30:01 -0000 The following reply was made to PR kern/113957; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/113957: commit references a PR Date: Tue, 29 Jan 2013 17:20:57 +0000 (UTC) Author: mav Date: Tue Jan 29 17:20:49 2013 New Revision: 246076 URL: http://svnweb.freebsd.org/changeset/base/246076 Log: MFC r245443: Alike to r242314 for GRAID make GMIRROR more aggressive in marking volumes as clean on shutdown and move that action from shutdown_pre_sync stage to shutdown_post_sync to avoid extra flapping. ZFS tends to not close devices on shutdown, that doesn't allow GEOM MIRROR to shutdown gracefully. To handle that, mark volume as clean just when shutdown time comes and there are no active writes. PR: kern/113957 Modified: stable/9/sys/geom/mirror/g_mirror.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/9/sys/geom/mirror/g_mirror.c Tue Jan 29 17:05:21 2013 (r246075) +++ stable/9/sys/geom/mirror/g_mirror.c Tue Jan 29 17:20:49 2013 (r246076) @@ -80,7 +80,8 @@ SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, G_MIRROR_DEBUG(4, "%s: Woken up %p.", __func__, (ident)); \ } while (0) -static eventhandler_tag g_mirror_pre_sync = NULL; +static eventhandler_tag g_mirror_post_sync = NULL; +static int g_mirror_shutdown = 0; static int g_mirror_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp); @@ -814,7 +815,7 @@ g_mirror_idle(struct g_mirror_softc *sc, return (0); if (acw > 0 || (acw == -1 && sc->sc_provider->acw > 0)) { timeout = g_mirror_idletime - (time_uptime - sc->sc_last_write); - if (timeout > 0) + if (!g_mirror_shutdown && timeout > 0) return (timeout); } sc->sc_idle = 1; @@ -2820,7 +2821,7 @@ g_mirror_access(struct g_provider *pp, i error = ENXIO; goto end; } - if (dcw == 0 && !sc->sc_idle) + if (dcw == 0) g_mirror_idle(sc, dcw); if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0) { if (acr > 0 || acw > 0 || ace > 0) { @@ -3231,7 +3232,7 @@ g_mirror_dumpconf(struct sbuf *sb, const } static void -g_mirror_shutdown_pre_sync(void *arg, int howto) +g_mirror_shutdown_post_sync(void *arg, int howto) { struct g_class *mp; struct g_geom *gp, *gp2; @@ -3241,6 +3242,7 @@ g_mirror_shutdown_pre_sync(void *arg, in mp = arg; DROP_GIANT(); g_topology_lock(); + g_mirror_shutdown = 1; LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) { if ((sc = gp->softc) == NULL) continue; @@ -3249,6 +3251,7 @@ g_mirror_shutdown_pre_sync(void *arg, in continue; g_topology_unlock(); sx_xlock(&sc->sc_lock); + g_mirror_idle(sc, -1); g_cancel_event(sc); error = g_mirror_destroy(sc, G_MIRROR_DESTROY_DELAYED); if (error != 0) @@ -3263,9 +3266,9 @@ static void g_mirror_init(struct g_class *mp) { - g_mirror_pre_sync = EVENTHANDLER_REGISTER(shutdown_pre_sync, - g_mirror_shutdown_pre_sync, mp, SHUTDOWN_PRI_FIRST); - if (g_mirror_pre_sync == NULL) + g_mirror_post_sync = EVENTHANDLER_REGISTER(shutdown_post_sync, + g_mirror_shutdown_post_sync, mp, SHUTDOWN_PRI_FIRST); + if (g_mirror_post_sync == NULL) G_MIRROR_DEBUG(0, "Warning! Cannot register shutdown event."); } @@ -3273,8 +3276,8 @@ static void g_mirror_fini(struct g_class *mp) { - if (g_mirror_pre_sync != NULL) - EVENTHANDLER_DEREGISTER(shutdown_pre_sync, g_mirror_pre_sync); + if (g_mirror_post_sync != NULL) + EVENTHANDLER_DEREGISTER(shutdown_post_sync, g_mirror_post_sync); } DECLARE_GEOM_CLASS(g_mirror_class, g_mirror); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-geom@FreeBSD.ORG Tue Jan 29 17:30:03 2013 Return-Path: Delivered-To: freebsd-geom@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1B691B03 for ; Tue, 29 Jan 2013 17:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 0E809A9B for ; Tue, 29 Jan 2013 17:30:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0THU2qY077683 for ; Tue, 29 Jan 2013 17:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0THU2B8077682; Tue, 29 Jan 2013 17:30:02 GMT (envelope-from gnats) Date: Tue, 29 Jan 2013 17:30:02 GMT Message-Id: <201301291730.r0THU2B8077682@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: kern/113957: commit references a PR X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2013 17:30:03 -0000 The following reply was made to PR kern/113957; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/113957: commit references a PR Date: Tue, 29 Jan 2013 17:23:01 +0000 (UTC) Author: mav Date: Tue Jan 29 17:22:53 2013 New Revision: 246077 URL: http://svnweb.freebsd.org/changeset/base/246077 Log: MFC r245443: Alike to r242314 for GRAID make GMIRROR more aggressive in marking volumes as clean on shutdown and move that action from shutdown_pre_sync stage to shutdown_post_sync to avoid extra flapping. ZFS tends to not close devices on shutdown, that doesn't allow GEOM MIRROR to shutdown gracefully. To handle that, mark volume as clean just when shutdown time comes and there are no active writes. PR: kern/113957 Modified: stable/8/sys/geom/mirror/g_mirror.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/8/sys/geom/mirror/g_mirror.c Tue Jan 29 17:20:49 2013 (r246076) +++ stable/8/sys/geom/mirror/g_mirror.c Tue Jan 29 17:22:53 2013 (r246077) @@ -78,7 +78,8 @@ SYSCTL_UINT(_kern_geom_mirror, OID_AUTO, G_MIRROR_DEBUG(4, "%s: Woken up %p.", __func__, (ident)); \ } while (0) -static eventhandler_tag g_mirror_pre_sync = NULL; +static eventhandler_tag g_mirror_post_sync = NULL; +static int g_mirror_shutdown = 0; static int g_mirror_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp); @@ -807,7 +808,7 @@ g_mirror_idle(struct g_mirror_softc *sc, return (0); if (acw > 0 || (acw == -1 && sc->sc_provider->acw > 0)) { timeout = g_mirror_idletime - (time_uptime - sc->sc_last_write); - if (timeout > 0) + if (!g_mirror_shutdown && timeout > 0) return (timeout); } sc->sc_idle = 1; @@ -2807,7 +2808,7 @@ g_mirror_access(struct g_provider *pp, i error = ENXIO; goto end; } - if (dcw == 0 && !sc->sc_idle) + if (dcw == 0) g_mirror_idle(sc, dcw); if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROYING) != 0) { if (acr > 0 || acw > 0 || ace > 0) { @@ -3213,7 +3214,7 @@ g_mirror_dumpconf(struct sbuf *sb, const } static void -g_mirror_shutdown_pre_sync(void *arg, int howto) +g_mirror_shutdown_post_sync(void *arg, int howto) { struct g_class *mp; struct g_geom *gp, *gp2; @@ -3223,6 +3224,7 @@ g_mirror_shutdown_pre_sync(void *arg, in mp = arg; DROP_GIANT(); g_topology_lock(); + g_mirror_shutdown = 1; LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) { if ((sc = gp->softc) == NULL) continue; @@ -3231,6 +3233,7 @@ g_mirror_shutdown_pre_sync(void *arg, in continue; g_topology_unlock(); sx_xlock(&sc->sc_lock); + g_mirror_idle(sc, -1); g_cancel_event(sc); error = g_mirror_destroy(sc, G_MIRROR_DESTROY_DELAYED); if (error != 0) @@ -3245,9 +3248,9 @@ static void g_mirror_init(struct g_class *mp) { - g_mirror_pre_sync = EVENTHANDLER_REGISTER(shutdown_pre_sync, - g_mirror_shutdown_pre_sync, mp, SHUTDOWN_PRI_FIRST); - if (g_mirror_pre_sync == NULL) + g_mirror_post_sync = EVENTHANDLER_REGISTER(shutdown_post_sync, + g_mirror_shutdown_post_sync, mp, SHUTDOWN_PRI_FIRST); + if (g_mirror_post_sync == NULL) G_MIRROR_DEBUG(0, "Warning! Cannot register shutdown event."); } @@ -3255,8 +3258,8 @@ static void g_mirror_fini(struct g_class *mp) { - if (g_mirror_pre_sync != NULL) - EVENTHANDLER_DEREGISTER(shutdown_pre_sync, g_mirror_pre_sync); + if (g_mirror_post_sync != NULL) + EVENTHANDLER_DEREGISTER(shutdown_post_sync, g_mirror_post_sync); } DECLARE_GEOM_CLASS(g_mirror_class, g_mirror); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-geom@FreeBSD.ORG Tue Jan 29 17:55:12 2013 Return-Path: Delivered-To: freebsd-geom@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 09BE7A06; Tue, 29 Jan 2013 17:55:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id D7041CFA; Tue, 29 Jan 2013 17:55:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0THtBq7082303; Tue, 29 Jan 2013 17:55:11 GMT (envelope-from mav@freefall.freebsd.org) Received: (from mav@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0THtB1H082299; Tue, 29 Jan 2013 17:55:11 GMT (envelope-from mav) Date: Tue, 29 Jan 2013 17:55:11 GMT Message-Id: <201301291755.r0THtB1H082299@freefall.freebsd.org> To: lev@FreeBSD.org, mav@FreeBSD.org, freebsd-geom@FreeBSD.org From: mav@FreeBSD.org Subject: Re: kern/160562: [geom][patch] Allow to insert new component to geom_raid3 without specifying number. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2013 17:55:12 -0000 Synopsis: [geom][patch] Allow to insert new component to geom_raid3 without specifying number. State-Changed-From-To: open->closed State-Changed-By: mav State-Changed-When: Tue Jan 29 17:54:42 UTC 2013 State-Changed-Why: Patch committed and merged to 8/9-STABLE. http://www.freebsd.org/cgi/query-pr.cgi?pr=160562 From owner-freebsd-geom@FreeBSD.ORG Tue Jan 29 18:00:01 2013 Return-Path: Delivered-To: freebsd-geom@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2F63DC34 for ; Tue, 29 Jan 2013 18:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 21AC5D42 for ; Tue, 29 Jan 2013 18:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0TI01kP082448 for ; Tue, 29 Jan 2013 18:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0TI01Fx082443; Tue, 29 Jan 2013 18:00:01 GMT (envelope-from gnats) Date: Tue, 29 Jan 2013 18:00:01 GMT Message-Id: <201301291800.r0TI01Fx082443@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: kern/160562: commit references a PR X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2013 18:00:01 -0000 The following reply was made to PR kern/160562; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/160562: commit references a PR Date: Tue, 29 Jan 2013 17:51:30 +0000 (UTC) Author: mav Date: Tue Jan 29 17:51:12 2013 New Revision: 246081 URL: http://svnweb.freebsd.org/changeset/base/246081 Log: MFC r245456: Allow to insert new component to geom_raid3 without specifying number. PR: kern/160562 Modified: stable/9/sbin/geom/class/raid3/geom_raid3.c stable/9/sbin/geom/class/raid3/graid3.8 stable/9/sys/geom/raid3/g_raid3_ctl.c Directory Properties: stable/9/sbin/geom/class/raid3/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sbin/geom/class/raid3/geom_raid3.c ============================================================================== --- stable/9/sbin/geom/class/raid3/geom_raid3.c Tue Jan 29 17:47:07 2013 (r246080) +++ stable/9/sbin/geom/class/raid3/geom_raid3.c Tue Jan 29 17:51:12 2013 (r246081) @@ -76,7 +76,7 @@ struct g_command class_commands[] = { { "insert", G_FLAG_VERBOSE, NULL, { { 'h', "hardcode", NULL, G_TYPE_BOOL }, - { 'n', "number", NULL, G_TYPE_NUMBER }, + { 'n', "number", G_VAL_OPTIONAL, G_TYPE_NUMBER }, G_OPT_SENTINEL }, "[-hv] <-n number> name prov" Modified: stable/9/sbin/geom/class/raid3/graid3.8 ============================================================================== --- stable/9/sbin/geom/class/raid3/graid3.8 Tue Jan 29 17:47:07 2013 (r246080) +++ stable/9/sbin/geom/class/raid3/graid3.8 Tue Jan 29 17:51:12 2013 (r246081) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 5, 2010 +.Dd January 15, 2012 .Dt GRAID3 8 .Os .Sh NAME @@ -53,7 +53,7 @@ .Nm .Cm insert .Op Fl hv -.Fl n Ar number +.Op Fl n Ar number .Ar name .Ar prov .Nm @@ -171,6 +171,8 @@ Add the given component to the existing removed previously with the .Cm remove command or if one component is missing and will not be connected again. +If no number is given, new component will be added instead of first missed +component. .Pp Additional options include: .Bl -tag -width ".Fl h" Modified: stable/9/sys/geom/raid3/g_raid3_ctl.c ============================================================================== --- stable/9/sys/geom/raid3/g_raid3_ctl.c Tue Jan 29 17:47:07 2013 (r246080) +++ stable/9/sys/geom/raid3/g_raid3_ctl.c Tue Jan 29 17:51:12 2013 (r246081) @@ -404,7 +404,7 @@ g_raid3_ctl_insert(struct gctl_req *req, u_char *sector; off_t compsize; intmax_t *no; - int *hardcode, *nargs, error; + int *hardcode, *nargs, error, autono; nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); if (nargs == NULL) { @@ -425,11 +425,10 @@ g_raid3_ctl_insert(struct gctl_req *req, gctl_error(req, "No 'arg%u' argument.", 1); return; } - no = gctl_get_paraml(req, "number", sizeof(*no)); - if (no == NULL) { - gctl_error(req, "No '%s' argument.", "no"); - return; - } + if (gctl_get_param(req, "number", NULL) != NULL) + no = gctl_get_paraml(req, "number", sizeof(*no)); + else + no = NULL; if (strncmp(name, "/dev/", 5) == 0) name += 5; g_topology_lock(); @@ -465,16 +464,30 @@ g_raid3_ctl_insert(struct gctl_req *req, gctl_error(req, "No such device: %s.", name); goto end; } - if (*no >= sc->sc_ndisks) { - sx_xunlock(&sc->sc_lock); - gctl_error(req, "Invalid component number."); - goto end; - } - disk = &sc->sc_disks[*no]; - if (disk->d_state != G_RAID3_DISK_STATE_NODISK) { - sx_xunlock(&sc->sc_lock); - gctl_error(req, "Component %jd is already connected.", *no); - goto end; + if (no != NULL) { + if (*no < 0 || *no >= sc->sc_ndisks) { + sx_xunlock(&sc->sc_lock); + gctl_error(req, "Invalid component number."); + goto end; + } + disk = &sc->sc_disks[*no]; + if (disk->d_state != G_RAID3_DISK_STATE_NODISK) { + sx_xunlock(&sc->sc_lock); + gctl_error(req, "Component %jd is already connected.", + *no); + goto end; + } + } else { + disk = NULL; + for (autono = 0; autono < sc->sc_ndisks && disk == NULL; autono++) + if (sc->sc_disks[autono].d_state == + G_RAID3_DISK_STATE_NODISK) + disk = &sc->sc_disks[autono]; + if (disk == NULL) { + sx_xunlock(&sc->sc_lock); + gctl_error(req, "No disconnected components."); + goto end; + } } if (((sc->sc_sectorsize / (sc->sc_ndisks - 1)) % pp->sectorsize) != 0) { sx_xunlock(&sc->sc_lock); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-geom@FreeBSD.ORG Tue Jan 29 18:00:02 2013 Return-Path: Delivered-To: freebsd-geom@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 22912C35 for ; Tue, 29 Jan 2013 18:00:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 15B37D44 for ; Tue, 29 Jan 2013 18:00:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r0TI01GE082454 for ; Tue, 29 Jan 2013 18:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r0TI01Vm082453; Tue, 29 Jan 2013 18:00:01 GMT (envelope-from gnats) Date: Tue, 29 Jan 2013 18:00:01 GMT Message-Id: <201301291800.r0TI01Vm082453@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: kern/160562: commit references a PR X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2013 18:00:02 -0000 The following reply was made to PR kern/160562; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/160562: commit references a PR Date: Tue, 29 Jan 2013 17:54:39 +0000 (UTC) Author: mav Date: Tue Jan 29 17:54:26 2013 New Revision: 246082 URL: http://svnweb.freebsd.org/changeset/base/246082 Log: MFC r245456: Allow to insert new component to geom_raid3 without specifying number. PR: kern/160562 Modified: stable/8/sbin/geom/class/raid3/geom_raid3.c stable/8/sbin/geom/class/raid3/graid3.8 stable/8/sys/geom/raid3/g_raid3_ctl.c Directory Properties: stable/8/sbin/geom/class/raid3/ (props changed) stable/8/sys/ (props changed) stable/8/sys/geom/ (props changed) Modified: stable/8/sbin/geom/class/raid3/geom_raid3.c ============================================================================== --- stable/8/sbin/geom/class/raid3/geom_raid3.c Tue Jan 29 17:51:12 2013 (r246081) +++ stable/8/sbin/geom/class/raid3/geom_raid3.c Tue Jan 29 17:54:26 2013 (r246082) @@ -76,7 +76,7 @@ struct g_command class_commands[] = { { "insert", G_FLAG_VERBOSE, NULL, { { 'h', "hardcode", NULL, G_TYPE_BOOL }, - { 'n', "number", NULL, G_TYPE_NUMBER }, + { 'n', "number", G_VAL_OPTIONAL, G_TYPE_NUMBER }, G_OPT_SENTINEL }, NULL, "[-hv] <-n number> name prov" Modified: stable/8/sbin/geom/class/raid3/graid3.8 ============================================================================== --- stable/8/sbin/geom/class/raid3/graid3.8 Tue Jan 29 17:51:12 2013 (r246081) +++ stable/8/sbin/geom/class/raid3/graid3.8 Tue Jan 29 17:54:26 2013 (r246082) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 1, 2006 +.Dd January 15, 2012 .Dt GRAID3 8 .Os .Sh NAME @@ -52,7 +52,7 @@ .Nm .Cm insert .Op Fl hv -.Fl n Ar number +.Op Fl n Ar number .Ar name .Ar prov .Nm @@ -164,6 +164,8 @@ Add the given component to the existing removed previously with the .Cm remove command or if one component is missing and will not be connected again. +If no number is given, new component will be added instead of first missed +component. .Pp Additional options include: .Bl -tag -width ".Fl h" Modified: stable/8/sys/geom/raid3/g_raid3_ctl.c ============================================================================== --- stable/8/sys/geom/raid3/g_raid3_ctl.c Tue Jan 29 17:51:12 2013 (r246081) +++ stable/8/sys/geom/raid3/g_raid3_ctl.c Tue Jan 29 17:54:26 2013 (r246082) @@ -404,7 +404,7 @@ g_raid3_ctl_insert(struct gctl_req *req, u_char *sector; off_t compsize; intmax_t *no; - int *hardcode, *nargs, error; + int *hardcode, *nargs, error, autono; nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); if (nargs == NULL) { @@ -425,11 +425,10 @@ g_raid3_ctl_insert(struct gctl_req *req, gctl_error(req, "No 'arg%u' argument.", 1); return; } - no = gctl_get_paraml(req, "number", sizeof(*no)); - if (no == NULL) { - gctl_error(req, "No '%s' argument.", "no"); - return; - } + if (gctl_get_param(req, "number", NULL) != NULL) + no = gctl_get_paraml(req, "number", sizeof(*no)); + else + no = NULL; if (strncmp(name, "/dev/", 5) == 0) name += 5; g_topology_lock(); @@ -465,16 +464,30 @@ g_raid3_ctl_insert(struct gctl_req *req, gctl_error(req, "No such device: %s.", name); goto end; } - if (*no >= sc->sc_ndisks) { - sx_xunlock(&sc->sc_lock); - gctl_error(req, "Invalid component number."); - goto end; - } - disk = &sc->sc_disks[*no]; - if (disk->d_state != G_RAID3_DISK_STATE_NODISK) { - sx_xunlock(&sc->sc_lock); - gctl_error(req, "Component %jd is already connected.", *no); - goto end; + if (no != NULL) { + if (*no < 0 || *no >= sc->sc_ndisks) { + sx_xunlock(&sc->sc_lock); + gctl_error(req, "Invalid component number."); + goto end; + } + disk = &sc->sc_disks[*no]; + if (disk->d_state != G_RAID3_DISK_STATE_NODISK) { + sx_xunlock(&sc->sc_lock); + gctl_error(req, "Component %jd is already connected.", + *no); + goto end; + } + } else { + disk = NULL; + for (autono = 0; autono < sc->sc_ndisks && disk == NULL; autono++) + if (sc->sc_disks[autono].d_state == + G_RAID3_DISK_STATE_NODISK) + disk = &sc->sc_disks[autono]; + if (disk == NULL) { + sx_xunlock(&sc->sc_lock); + gctl_error(req, "No disconnected components."); + goto end; + } } if (((sc->sc_sectorsize / (sc->sc_ndisks - 1)) % pp->sectorsize) != 0) { sx_xunlock(&sc->sc_lock); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"