From owner-freebsd-geom@FreeBSD.ORG Sun Mar 16 09:06:05 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE710106564A for ; Sun, 16 Mar 2008 09:06:05 +0000 (UTC) (envelope-from lulf@stud.ntnu.no) Received: from bene1.itea.ntnu.no (bene1.itea.ntnu.no [IPv6:2001:700:300:3::56]) by mx1.freebsd.org (Postfix) with ESMTP id 531588FC17 for ; Sun, 16 Mar 2008 09:06:05 +0000 (UTC) (envelope-from lulf@stud.ntnu.no) Received: from localhost (localhost [127.0.0.1]) by bene1.itea.ntnu.no (Postfix) with ESMTP id 0F3CC16C764; Sun, 16 Mar 2008 10:06:03 +0100 (CET) Received: from carrot.studby.ntnu.no (unknown [IPv6:2001:700:300:3::185]) by bene1.itea.ntnu.no (Postfix) with ESMTP id B6EBA16C57C; Sun, 16 Mar 2008 10:06:01 +0100 (CET) Date: Sun, 16 Mar 2008 10:05:55 +0100 From: Ulf Lilleengen To: "Rick C. Petty" Message-ID: <20080316090554.GA1230@carrot.studby.ntnu.no> Mail-Followup-To: "Rick C. Petty" , freebsd-geom@freebsd.org References: <20080310052711.GA49676@keira.kiwi-computer.com> <20080313153551.82wlu8iio4088c44@webmail.ntnu.no> <20080313182257.GB14969@keira.kiwi-computer.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080313182257.GB14969@keira.kiwi-computer.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Virus-Scanned: Debian amavisd-new at bene1.itea.ntnu.no Cc: freebsd-geom@freebsd.org Subject: Re: [patch] geom_vinum platform fixes X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 09:06:06 -0000 On tor, mar 13, 2008 at 12:22:57pm -0600, Rick C. Petty wrote: > On Thu, Mar 13, 2008 at 03:35:51PM +0100, lulf@stud.ntnu.no wrote: *SNIP* > > That being said and since there have been no objections to my suggestions > (and Ulf agrees with my changes), is a committer willing to review my > patch? le@ ? Mr. Lehey? Hello, I've reviewed the patch and done some modifications to it. I'll need some testing first though (I don't have a testbed right now since I'm travelling). Here are some notes: - Removed GV_VERSION. It is not used anywhere. - Avoid moving header includes around. - Declare functions static when used inside one file. - Style fixes. - In gv_legacy_header_type, you can't be guaranteed that the hdr fields is not always null (although I agree in practise its highly unlikely), but it's hard to check this any other way, so I think it's alright :) - Use macro values instead of hard-coded values when testing legacy type. - Pass data variable as argument rather than returning a header. - Avoid memory allocation where possible. All this have been "fixed" in the new patch. Please test if it still works as specified. In addition, I noticed a memory leak in gvinum when rediscovering a drive too, but I'll commit this separately, and the fix is included in this patch for testing. It should work, but I've not tested it yet, but I might be able to during the day. The revised patch can be found here: http://people.freebsd.org/~lulf/patches/gvinum/gvinum_platformfix.diff Please let me know how it fares, and thanks for your help btw :) -- Ulf Lilleengen From owner-freebsd-geom@FreeBSD.ORG Sun Mar 16 13:11:43 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 501E71065671 for ; Sun, 16 Mar 2008 13:11:43 +0000 (UTC) (envelope-from arnaud.houdelette@tzim.net) Received: from alaranth.tzim.net (unknown [IPv6:2001:41d0:1:968f:219:d1ff:fedf:4f29]) by mx1.freebsd.org (Postfix) with ESMTP id 0303A8FC44 for ; Sun, 16 Mar 2008 13:11:43 +0000 (UTC) (envelope-from arnaud.houdelette@tzim.net) Received: from carenath.tzim.net ([82.233.229.224] helo=[172.16.0.254]) by alaranth.tzim.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Jase8-0003C1-7e for freebsd-geom@freebsd.org; Sun, 16 Mar 2008 14:11:28 +0100 Message-ID: <47DD1C9A.1020208@tzim.net> Date: Sun, 16 Mar 2008 14:11:54 +0100 From: Arnaud Houdelette User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated-User: tzim@tzim.net X-Authenticator: plain Subject: Geom_Raid5 best practices ? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 13:11:43 -0000 I use geom_raid5 for my home NAS for nearly 1 year. No problems so far (but just the fact I had to patch ata-disk.c to modify the IO timeout in order to be able to use ataidle). Since I updated to 7.0-RELEASE, I was wondering if I should use gjournal on the raid5 array. The array's purpose is to store music (2-10 MB) and video (300MB to 8GB) files. My system is as it follow : - USB key for base system (power/sound efficient) - 120 GB Pata disk for temporary downloads, /usr/src, ports and obj - 4x250 GB sata disks for mass storage (so 750GB usable space). I currently use plain UFS+SU on every FS, and daily snapshots on the raid5 one. GJournal should protect the raid5 UFS from destruction by bad power failures/kernel crashes, but with what performance impact ? Is the risk of complete FS crash really important with only SU ? (loss of data written at the time of the crash is no big deal, nor waiting for a fsck to complete, as long as I can recover most of the data previously stored) But as the gjournal first introduction showed a big performance drop on big files (they apparently have to be written twice), I was really wondering if I should use a journal on the file system ? If so, where should I put the journal on, and wich journal size should I use ? Any advice ? From owner-freebsd-geom@FreeBSD.ORG Sun Mar 16 18:50:57 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B8D61065676 for ; Sun, 16 Mar 2008 18:50:57 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 0CFDB8FC26 for ; Sun, 16 Mar 2008 18:50:56 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 65298 invoked by uid 2001); 16 Mar 2008 18:50:55 -0000 Date: Sun, 16 Mar 2008 12:50:55 -0600 From: "Rick C. Petty" To: freebsd-geom@freebsd.org Message-ID: <20080316185055.GA64920@keira.kiwi-computer.com> References: <20080310052711.GA49676@keira.kiwi-computer.com> <20080313153551.82wlu8iio4088c44@webmail.ntnu.no> <20080313182257.GB14969@keira.kiwi-computer.com> <20080316090554.GA1230@carrot.studby.ntnu.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080316090554.GA1230@carrot.studby.ntnu.no> User-Agent: Mutt/1.4.2.3i Subject: Re: [patch] geom_vinum platform fixes X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd@kiwi-computer.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 18:50:57 -0000 On Sun, Mar 16, 2008 at 10:05:55AM +0100, Ulf Lilleengen wrote: > > I've reviewed the patch and done some modifications to it. I'll need some > testing first though (I don't have a testbed right now since I'm travelling). I've reviewed your patch but haven't had time to test it yet (hopefully this week..) > Here are some notes: > - Removed GV_VERSION. It is not used anywhere. Well, the point of this macro is for future changes to vinum on-disk structure, since I added version as part of the new magic. Strictly speaking, the macro isn't necessary (yet) and perhaps no future changes will happen to the structures. > - Avoid moving header includes around. Not sure I agree. Although style(9) doesn't specify that the sys/* headers should be alphabetized, many other places in kernel code have them sorted as such (with certain exceptions like sys/param). It was a trivial "fix" I had hoped to sneak in since that file was being modified anyway. > - Declare functions static when used inside one file. > - Style fixes. *nod* > - In gv_legacy_header_type, you can't be guaranteed that the hdr fields is > not always null (although I agree in practise its highly unlikely), but > it's hard to check this any other way, so I think it's alright :) I can't think of any _better_ way to check. In the struct timeval fields on amd64, I can't think of how these "zeros" would not appear. The bytes past the end of the i386 header will always be zero because of the malloc with M_ZERO. > - Use macro values instead of hard-coded values when testing legacy type. > - Pass data variable as argument rather than returning a header. > - Avoid memory allocation where possible. All good! > Please let me know how it fares, and thanks for your help btw :) I will do some testing using your patch. And thank _you_ for reviewing this. I really look forward to your upcoming merge from p4! -- Rick C. Petty From owner-freebsd-geom@FreeBSD.ORG Mon Mar 17 11:07:03 2008 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D884C106567F for ; Mon, 17 Mar 2008 11:07:03 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CF2BC8FC4A for ; Mon, 17 Mar 2008 11:07:03 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m2HB73n4055094 for ; Mon, 17 Mar 2008 11:07:03 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m2HB73fA055090 for freebsd-geom@FreeBSD.org; Mon, 17 Mar 2008 11:07:03 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 17 Mar 2008 11:07:03 GMT Message-Id: <200803171107.m2HB73fA055090@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 Cc: Subject: Current problem reports assigned to freebsd-geom@FreeBSD.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Mar 2008 11:07:04 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/73177 geom kldload geom_* causes panic due to memory exhaustion o kern/76538 geom [gbde] nfs-write on gbde partition stalls and continue o kern/83464 geom [geom] [patch] Unhandled malloc failures within libgeo o kern/84556 geom [geom] GBDE-encrypted swap causes panic at shutdown o kern/87544 geom [gbde] mmaping large files on a gbde filesystem deadlo s kern/89102 geom [geom_vfs] [panic] panic when forced unmount FS from u o bin/90093 geom fdisk(8) incapable of altering in-core geometry o kern/90582 geom [geom_mirror] [panic] Restore cause panic string (ffs_ o kern/98034 geom [geom] dereference of NULL pointer in acd_geom_detach o kern/104389 geom [geom] [patch] sys/geom/geom_dump.c doesn't encode XML o kern/113419 geom [geom] geom fox multipathing not failing back o kern/113957 geom [gmirror] gmirror is intermittently reporting a degrad o kern/115572 geom [gbde] [patch] gbde partitions fail at 28bit/48bit LBA o kern/120021 geom net-p2p/qbittorrent crashes system when it works thoug o kern/120231 geom [geom] GEOM_CONCAT error adding second drive f kern/121364 geom [gmirror] Removing all providers create a "zombie" mir 16 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o bin/78131 geom gbde "destroy" not working. o kern/79251 geom [2TB] newfs fails on 2.6TB gbde device o kern/94632 geom [geom] Kernel output resets input while GELI asks for o kern/107707 geom [geom] [patch] [request] add new class geom_xbox360 to p bin/110705 geom gmirror control utility does not exit with correct exi o kern/113837 geom [geom] unable to access 1024 sector size storage o kern/113885 geom [gmirror] [patch] improved gmirror balance algorithm o kern/114532 geom [geom] GEOM_MIRROR shows up in kldstat even if compile o kern/115547 geom [geom] [patch] [request] let GEOM Eli get password fro o kern/119743 geom [geom] geom label for cds is keeped after dismount and o kern/120044 geom [msdosfs] [geom] incorrect MSDOSFS label fries adminis f kern/120091 geom [geom] [geli] [gjournal] geli does not prompt for pass o kern/121559 geom [patch] [geom] geom label class allows to create inacc 13 problems total. From owner-freebsd-geom@FreeBSD.ORG Thu Mar 20 01:15:53 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A3401065672 for ; Thu, 20 Mar 2008 01:15:53 +0000 (UTC) (envelope-from ap@d-dt.de) Received: from dedihh.fuckner.net (dedihh.fuckner.net [81.209.183.161]) by mx1.freebsd.org (Postfix) with ESMTP id F289B8FC20 for ; Thu, 20 Mar 2008 01:15:52 +0000 (UTC) (envelope-from ap@d-dt.de) Received: from localhost (localhost [127.0.0.1]) by dedihh.fuckner.net (Postfix) with ESMTP id 51F9261F47 for ; Thu, 20 Mar 2008 01:58:40 +0100 (CET) X-Virus-Scanned: amavisd-new at fuckner.net Received: from dedihh.fuckner.net ([127.0.0.1]) by localhost (dedihh.fuckner.net [127.0.0.1]) (amavisd-new, port 10024) with SMTP id FlHD4MIdl7GR for ; Thu, 20 Mar 2008 01:58:36 +0100 (CET) Received: from [10.12.3.67] (e176188113.adsl.alicedsl.de [85.176.188.113]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by dedihh.fuckner.net (Postfix) with ESMTPSA id 2D2A661CDF for ; Thu, 20 Mar 2008 01:58:36 +0100 (CET) Message-ID: <47E1B6BD.3080002@d-dt.de> Date: Thu, 20 Mar 2008 01:58:37 +0100 From: Adam Pordzik User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: geom mirror in error-prone situations X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2008 01:15:53 -0000 Hello, recentlty, I was faced a strange situation, where ata(4) reports irregularly interrupt storms followed by DMA_WRITE timeouts. Mar 20 01:00:30 brain kernel: interrupt storm detected on "irq14:"; throttling interrupt source Mar 20 01:00:30 brain last message repeated 4 times Mar 20 01:00:30 brain kernel: ata5: reiniting channel .. Mar 20 01:00:30 brain kernel: ata5: SATA connect time=0ms Mar 20 01:00:30 brain kernel: ata5: reset tp1 mask=01 ostat0=51 ostat1=00 Mar 20 01:00:30 brain kernel: ata5: stat0=0x50 err=0x01 lsb=0x00 msb=0x00 Mar 20 01:00:30 brain kernel: ata5: reset tp2 stat0=50 stat1=00 devices=0x1 Mar 20 01:00:30 brain kernel: ata5: reinit done .. Mar 20 01:00:30 brain kernel: ad10: TIMEOUT - WRITE_DMA48 retrying (0 retries left) LBA=871709696 The disk was (and still is) pysically faultless. How would gmirror handle such a disk? Would that disc be removed at the first error? And would it be inserted the next boot? If so, does it first have to be rebuild? A -- From owner-freebsd-geom@FreeBSD.ORG Thu Mar 20 17:20:07 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E7AA106564A for ; Thu, 20 Mar 2008 17:20:07 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 326E28FC2C for ; Thu, 20 Mar 2008 17:20:07 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1JcOQs-0000ju-Dg for freebsd-geom@freebsd.org; Thu, 20 Mar 2008 17:20:02 +0000 Received: from 85.114.53.250 ([85.114.53.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 20 Mar 2008 17:20:02 +0000 Received: from ivoras by 85.114.53.250 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 20 Mar 2008 17:20:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-geom@freebsd.org From: Ivan Voras Date: Thu, 20 Mar 2008 18:16:00 +0100 Lines: 27 Message-ID: References: <47E1B6BD.3080002@d-dt.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 85.114.53.250 User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) In-Reply-To: <47E1B6BD.3080002@d-dt.de> X-Enigmail-Version: 0.94.1.0 Sender: news Subject: Re: geom mirror in error-prone situations X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2008 17:20:07 -0000 Adam Pordzik wrote: > Hello, > > recentlty, I was faced a strange situation, where ata(4) reports > irregularly interrupt storms followed by DMA_WRITE timeouts. > > Mar 20 01:00:30 brain kernel: interrupt storm detected on "irq14:"; > throttling interrupt source > Mar 20 01:00:30 brain last message repeated 4 times > Mar 20 01:00:30 brain kernel: ata5: reiniting channel .. > Mar 20 01:00:30 brain kernel: ata5: SATA connect time=0ms > Mar 20 01:00:30 brain kernel: ata5: reset tp1 mask=01 ostat0=51 ostat1=00 > Mar 20 01:00:30 brain kernel: ata5: stat0=0x50 err=0x01 lsb=0x00 msb=0x00 > Mar 20 01:00:30 brain kernel: ata5: reset tp2 stat0=50 stat1=00 > devices=0x1 > Mar 20 01:00:30 brain kernel: ata5: reinit done .. > Mar 20 01:00:30 brain kernel: ad10: TIMEOUT - WRITE_DMA48 retrying (0 > retries left) LBA=871709696 > > The disk was (and still is) pysically faultless. > > How would gmirror handle such a disk? Would that disc be removed > at the first error? And would it be inserted the next boot? If so, > does it first have to be rebuild? If the GEOM system (actually the driver) itself doesn't disconnect the drive (i.e. "/dev/adX" entry disappears), geom_mirror will still use it. From owner-freebsd-geom@FreeBSD.ORG Fri Mar 21 17:16:15 2008 Return-Path: Delivered-To: geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC650106564A for ; Fri, 21 Mar 2008 17:16:15 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.78]) by mx1.freebsd.org (Postfix) with ESMTP id A6A928FC1C for ; Fri, 21 Mar 2008 17:16:15 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp005-s [10.150.69.68]) by smtpoutm.mac.com (Xserve/smtpout015/MantshX 4.0) with ESMTP id m2LHGFJa025931 for ; Fri, 21 Mar 2008 10:16:15 -0700 (PDT) Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/asmtp005/MantshX 4.0) with ESMTP id m2LHGD3t000976 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 21 Mar 2008 10:16:13 -0700 (PDT) Message-Id: <500B8D5E-A46F-48AF-A835-97C46ED36F91@mac.com> From: Marcel Moolenaar To: geom@FreeBSD.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Fri, 21 Mar 2008 10:16:12 -0700 X-Mailer: Apple Mail (2.919.2) Cc: Subject: Q: force/trigger a retaste X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2008 17:16:15 -0000 All, I'm working on module support for GPART and I have a need trigger a retaste. When we load a GEOM module (read: load a class), the GEOM infrastructure will present all existing providers to the new class's taste buds. This will do the right thing out of the box. With GPART, we can dynamically load and unload partitioning schemes. A partitioning scheme is not a GEOM class, so the loading of a new scheme does not cause a new class to be loaded and as such will not cause any re-tasting. As such, when I have a disk with, say, a GPT but don't yet have support for the GPT scheme, then loading the GPT scheme will not automatically result in the creation of new providers. What needs to happen is that an existing class (i.e. the GPART class) gets to taste all existing providers again, so that it can attach to providers it previously did not attach to (due to a change in the supported schemes). I can definitely put the necessary code in GPART itself, but that may lead to duplication. But maybe it's more beneficial to make it generic. I'm thinking about something like: void geom_retaste(struct g_class *mp) { struct g_class *clp; struct g_geom *gp; struct g_provider *pp; g_topology_assert(); LIST_FOREACH(clp, &g_classes, class) { LIST_FOREACH(gp, &clp->geom, geom) { LIST_FOREACH(pp, &gp->provider, provider) { if (pp->acr + pp->acw + pp->ace == 0) { mp->taste(mp, pp, 0); g_topology_assert(); } } } } } Is this correct? Shall I make this a generic GEOM function or keep it private to GPART? Thanks, -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-geom@FreeBSD.ORG Fri Mar 21 18:41:03 2008 Return-Path: Delivered-To: geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3767B106566B for ; Fri, 21 Mar 2008 18:41:03 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id E9F5F8FC1E for ; Fri, 21 Mar 2008 18:41:02 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.64.3]) by phk.freebsd.dk (Postfix) with ESMTP id 4606417105; Fri, 21 Mar 2008 18:41:01 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.2/8.14.2) with ESMTP id m2LIf0Ig006383; Fri, 21 Mar 2008 18:41:00 GMT (envelope-from phk@critter.freebsd.dk) To: Marcel Moolenaar From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 21 Mar 2008 10:16:12 MST." <500B8D5E-A46F-48AF-A835-97C46ED36F91@mac.com> Date: Fri, 21 Mar 2008 18:41:00 +0000 Message-ID: <6382.1206124860@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: geom@FreeBSD.org Subject: Re: Q: force/trigger a retaste X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2008 18:41:03 -0000 In message <500B8D5E-A46F-48AF-A835-97C46ED36F91@mac.com>, Marcel Moolenaar wri tes: >What needs to >happen is that an existing class (i.e. the GPART class) gets to taste >all existing providers again, so that it can attach to providers it >previously did not attach to (due to a change in the supported schemes). >Is this correct? Broadly speaking yes, but you must fire it off as an event so it gets run in the event thread, otherwise the locking falls apart. >Shall I make this a generic GEOM function or keep it private to >GPART? Make it generic, I can imagine other uses. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-geom@FreeBSD.ORG Fri Mar 21 18:51:36 2008 Return-Path: Delivered-To: geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 007F41065672 for ; Fri, 21 Mar 2008 18:51:36 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.77]) by mx1.freebsd.org (Postfix) with ESMTP id BD7CC8FC24 for ; Fri, 21 Mar 2008 18:51:35 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp009-s [10.150.69.72]) by smtpoutm.mac.com (Xserve/smtpout014/MantshX 4.0) with ESMTP id m2LIpZI9029197; Fri, 21 Mar 2008 11:51:35 -0700 (PDT) Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/asmtp009/MantshX 4.0) with ESMTP id m2LIpNBU009145 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 21 Mar 2008 11:51:24 -0700 (PDT) Message-Id: From: Marcel Moolenaar To: Poul-Henning Kamp In-Reply-To: <6382.1206124860@critter.freebsd.dk> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Fri, 21 Mar 2008 11:51:22 -0700 References: <6382.1206124860@critter.freebsd.dk> X-Mailer: Apple Mail (2.919.2) Cc: geom@FreeBSD.org Subject: Re: Q: force/trigger a retaste X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2008 18:51:36 -0000 On Mar 21, 2008, at 11:41 AM, Poul-Henning Kamp wrote: > In message <500B8D5E-A46F-48AF-A835-97C46ED36F91@mac.com>, Marcel > Moolenaar wri > tes: > Broadly speaking yes, but you must fire it off as an event so it > gets run in the event thread, otherwise the locking falls apart. Ah, ok. > Make it generic, I can imagine other uses. Thanks, will do. -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-geom@FreeBSD.ORG Sat Mar 22 19:59:57 2008 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2785A1065672; Sat, 22 Mar 2008 19:59:57 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 064818FC1C; Sat, 22 Mar 2008 19:59:57 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m2MJxuok044777; Sat, 22 Mar 2008 19:59:56 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m2MJxt1T044773; Sat, 22 Mar 2008 19:59:55 GMT (envelope-from linimon) Date: Sat, 22 Mar 2008 19:59:55 GMT Message-Id: <200803221959.m2MJxt1T044773@freefall.freebsd.org> To: mdh@solitox.net, linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-geom@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/121907: [request] [geom] geom output to console obscures other messages X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2008 19:59:57 -0000 Old Synopsis: geom output to console obscures other messages New Synopsis: [request] [geom] geom output to console obscures other messages State-Changed-From-To: open->feedback State-Changed-By: linimon State-Changed-When: Sat Mar 22 19:58:57 UTC 2008 State-Changed-Why: Assign. Note that submitter has been asked for feedback. Responsible-Changed-From-To: freebsd-bugs->freebsd-geom Responsible-Changed-By: linimon Responsible-Changed-When: Sat Mar 22 19:58:57 UTC 2008 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=121907