From owner-freebsd-geom@FreeBSD.ORG Sun Sep 12 00:11:25 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D59A16A4CE; Sun, 12 Sep 2004 00:11:25 +0000 (GMT) Received: from kestrel.alerce.com (kestrel.alerce.com [209.182.219.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB18343D2D; Sun, 12 Sep 2004 00:11:24 +0000 (GMT) (envelope-from hartzell@kestrel.alerce.com) Received: from rosebud.alerce.com (w092.z064001164.sjc-ca.dsl.cnc.net [64.1.164.92]) (authenticated bits=128) by kestrel.alerce.com (8.12.10/8.12.10) with ESMTP id i8C0BNkk055034 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 11 Sep 2004 17:11:24 -0700 (PDT) (envelope-from hartzell@kestrel.alerce.com) Received: from rosebud.alerce.com (localhost [127.0.0.1]) by rosebud.alerce.com (8.12.9p2/8.12.9) with ESMTP id i8C2C3pj000354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Sep 2004 19:12:03 -0700 (PDT) (envelope-from hartzell@rosebud.alerce.com) Received: (from hartzell@localhost) by rosebud.alerce.com (8.12.9p2/8.12.9/Submit) id i8C2C2Vs000350; Sat, 11 Sep 2004 19:12:02 -0700 (PDT) (envelope-from hartzell) From: George Hartzell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16707.45170.383349.686634@rosebud.alerce.com> Date: Sat, 11 Sep 2004 19:12:02 -0700 To: Paul Mather In-Reply-To: <1094946816.59283.75.camel@zappa.Chelsea-Ct.Org> References: <16706.33472.228042.851882@rosebud.alerce.com> <20040911074556.GI30151@darkness.comp.waw.pl> <16707.25008.865268.555842@rosebud.alerce.com> <16707.28763.7201.383177@rosebud.alerce.com> <1094946816.59283.75.camel@zappa.Chelsea-Ct.Org> X-Mailer: VM 7.14 under 21.4 (patch 14) "Reasonable Discussion" XEmacs Lucid X-Virus-Scanned: ClamAV version 'clamd / ClamAV version 0.65', clamav-milter version '0.60p' cc: Pawel Jakub Dawidek cc: freebsd-geom@freebsd.org Subject: Re: Mounting root... X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: hartzell@kestrel.alerce.com List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2004 00:11:25 -0000 Paul Mather writes: > [...] > This leaves the start_cmd the same, rather than using the swap1_start > function, because swap1_start checks a "no_swap" setting that doesn't > seem to be present on FreeBSD but is on NetBSD. (I don't know if a > missing setting defaults to "NO," making this moot.) Changing stop_cmd > to use the swap1_stop function makes turning off swap conditional on the > "swapoff" setting, instead of unconditional, in the case of setting > "stop_cmd='swapoff -a'". So, I think the above patch preserves the > current behaviour, unless you set 'swapoff="YES"' in /etc/rc.conf, in > which case all swap partitions will be unmounted during shutdown. I'm currently doing a buildworld w/ Pawel's patch, which unconditionally unmounts swap on shutdown and also adds some functionality to /etc/rc.d/addswap so that it also unmounts swap on shutdown. I am not in the flow of things enough to voice an opinion about whether it's "better" to preserve the existing behaviour or be straightforward. I suppose it might depend on whether this change is going to try to get into 5.3 or not.... With Paul's patch, you should also add a default value for swapoff in /etc/defaults/rc.conf, or one of the functions in /etc/rc.subr will whine about improper usage of the variable for all of the folks that aren't using it. g. From owner-freebsd-geom@FreeBSD.ORG Mon Sep 13 11:02:13 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F35E16A4CE for ; Mon, 13 Sep 2004 11:02:13 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0C8D743D31 for ; Mon, 13 Sep 2004 11:02:13 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8DB2Cvg048753 for ; Mon, 13 Sep 2004 11:02:12 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8DB2CZL048746 for freebsd-geom@freebsd.org; Mon, 13 Sep 2004 11:02:12 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 13 Sep 2004 11:02:12 GMT Message-Id: <200409131102.i8DB2CZL048746@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-geom@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2004 11:02:13 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- f [2004/09/06] kern/71431 geom [panic fix] [patch] geom_uzip.ko caused p 1 problem total. Non-critical problems From owner-freebsd-geom@FreeBSD.ORG Tue Sep 14 07:02:49 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BACFD16A4CF for ; Tue, 14 Sep 2004 07:02:49 +0000 (GMT) Received: from ongs.co.jp (ns.ongs.co.jp [202.216.232.58]) by mx1.FreeBSD.org (Postfix) with SMTP id E093E43D41 for ; Tue, 14 Sep 2004 07:02:48 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: (qmail 6382 invoked from network); 14 Sep 2004 06:56:48 -0000 Received: from unknown (HELO parancell.ongs.co.jp) (202.216.232.62) by ns.ongs.co.jp with SMTP; 14 Sep 2004 06:56:48 -0000 Date: Tue, 14 Sep 2004 16:02:45 +0900 From: daichi To: Max Khon Message-Id: <20040914160245.7db7d1e0.daichi@freebsd.org> In-Reply-To: <200409090607.i89674F3039635@freefall.freebsd.org> References: <200409090607.i89674F3039635@freefall.freebsd.org> Organization: FreeBSD Project X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: fjoe@FreeBSD.org cc: freebsd-geom@FreeBSD.org Subject: Re: kern/71431: [panic fix] [patch] geom_uzip.ko caused panic X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2004 07:02:49 -0000 > I can't reproduce this. > geom uzip load does not work. > kldload geom_uzip works perfectly. > > Can you provide stack trace? > Can you reproduce the problem on recent -CURRENT? > You can try this patch instead (but I doubt that it will change anything > for you): I tried 5.3-BETA 9/9 and that did not get panic. And I tried 6-current 9/9 and that did get panic. The stack trace is follow: --------------------- panic: malloc(9)/free(9) confusion. Probably freeing with wrong type, but maybe not here. cpuid = 0 KDB: enter: panic [thread 100026] Stopped at kdb_enter+0x2b: nop db> trace kdb_enter(c07f0204) at kdb_enter+0x2b panic(c07ee89b,c07ee865,c1f180c0,c1efcc80,c1d4dd40) at panic+0x127 free(c1e55000,c1f18040,d4225c8c,c05f7a0c,c0847004) at free+0x29 g_uzip_taste(c1f180c0,c1b42680,0,c0846ea0,c1efca80) at g_uzip_taste+0x5cf g_load_class(c1ad6830,0,66666667,d4225d04,c05d0139) at g_load_class+0x127 one_event(d4225d1c,c05d1605,3c,28,c19c68c0) at one_event+0x14f g_run_events(3c,28,c19c68c0,c05d15c8,d4225d34) at g_run_events+0x9 g_event_procbody(0,d4225d48,0,c05d15c8,0) at g_event_procbody+0x3d fork_exit(c05d15c8,0,d4225d48) at fork_exit+0xa4 fork_trampoline() at fork_trampoline+0x8 --- trap 0x1, eip=0, esp = 0xd4225d7c, ebp = 0 --- db> --------------------- I think this problem depends on malloc/free confusion. In shortly, next code is bad I think. void * buf = malloc(size, M_GEOM, M_WAITOK); free(buf, M_GEOM_UZIP); In for_loop of g_uzip_taste, malloced area gets free with M_GEOM_UZIP flag. But the area is malloced with M_GEOM flag. I think this causes problem. -- Daichi GOTO, http://people.freebsd.org/~daichi From owner-freebsd-geom@FreeBSD.ORG Tue Sep 14 18:40:07 2004 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B219B16A4D0; Tue, 14 Sep 2004 18:40:07 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E5A643D54; Tue, 14 Sep 2004 18:40:07 +0000 (GMT) (envelope-from fjoe@FreeBSD.org) Received: from freefall.freebsd.org (fjoe@localhost [127.0.0.1]) i8EIe7nF087020; Tue, 14 Sep 2004 18:40:07 GMT (envelope-from fjoe@freefall.freebsd.org) Received: (from fjoe@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8EIe70o087016; Tue, 14 Sep 2004 18:40:07 GMT (envelope-from fjoe) Date: Tue, 14 Sep 2004 18:40:07 GMT From: Max Khon Message-Id: <200409141840.i8EIe70o087016@freefall.freebsd.org> To: fjoe@FreeBSD.org, freebsd-geom@FreeBSD.org, fjoe-geom@FreeBSD.org Subject: Re: kern/71431: [panic fix] [patch] geom_uzip.ko caused panic X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2004 18:40:07 -0000 Synopsis: [panic fix] [patch] geom_uzip.ko caused panic Responsible-Changed-From-To: freebsd-geom->fjoe-geom Responsible-Changed-By: fjoe Responsible-Changed-When: Tue Sep 14 18:39:52 GMT 2004 Responsible-Changed-Why: http://www.freebsd.org/cgi/query-pr.cgi?pr=71431 From owner-freebsd-geom@FreeBSD.ORG Tue Sep 14 18:42:22 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40DDE16A4CE; Tue, 14 Sep 2004 18:42:22 +0000 (GMT) Received: from neo.samodelkin.net (samodelkin.net [81.176.202.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 777A343D48; Tue, 14 Sep 2004 18:42:21 +0000 (GMT) (envelope-from fjoe@neo.samodelkin.net) Received: by neo.samodelkin.net (Postfix, from userid 1000) id 338881707A; Wed, 15 Sep 2004 01:42:20 +0700 (NOVST) Date: Wed, 15 Sep 2004 01:42:20 +0700 From: Max Khon To: daichi Message-ID: <20040914184220.GB1075@samodelkin.net> References: <200409090607.i89674F3039635@freefall.freebsd.org> <20040914160245.7db7d1e0.daichi@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040914160245.7db7d1e0.daichi@freebsd.org> User-Agent: Mutt/1.4.2i cc: Max Khon cc: freebsd-geom@FreeBSD.org Subject: Re: kern/71431: [panic fix] [patch] geom_uzip.ko caused panic X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2004 18:42:22 -0000 Hi! On Tue, Sep 14, 2004 at 04:02:45PM +0900, daichi wrote: > I think this problem depends on malloc/free confusion. > In shortly, next code is bad I think. > > void * buf = malloc(size, M_GEOM, M_WAITOK); > free(buf, M_GEOM_UZIP); > > In for_loop of g_uzip_taste, malloced area gets free > with M_GEOM_UZIP flag. But the area is malloced with > M_GEOM flag. I think this causes problem. Now I see the problem! Does this patch fix the problem for you? Index: g_uzip.c =================================================================== RCS file: /home/ncvs/src/sys/geom/uzip/g_uzip.c,v retrieving revision 1.1.2.1 diff -u -p -r1.1.2.1 g_uzip.c --- g_uzip.c 10 Sep 2004 07:00:38 -0000 1.1.2.1 +++ g_uzip.c 14 Sep 2004 18:19:36 -0000 @@ -424,7 +424,7 @@ g_uzip_taste(struct g_class *mp, struct for (blk = 1; offsets_read < total_offsets; blk++) { uint32_t nread; - free(buf, M_GEOM_UZIP); + free(buf, M_GEOM); buf = g_read_data( cp, blk * pp->sectorsize, pp->sectorsize, &error); if (buf == NULL || error != 0) @@ -470,7 +470,7 @@ err: g_topology_lock(); g_access(cp, -1, 0, 0); if (buf != NULL) - free(buf, M_GEOM_UZIP); + free(buf, M_GEOM); if (gp->softc != NULL) { g_uzip_softc_free(gp->softc, NULL); gp->softc = NULL; /fjoe From owner-freebsd-geom@FreeBSD.ORG Wed Sep 15 03:17:36 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 115CA16A4CF for ; Wed, 15 Sep 2004 03:17:36 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id D13C543D53 for ; Wed, 15 Sep 2004 03:17:35 +0000 (GMT) (envelope-from afields@afields.ca) Received: from afields.ca (localhost.afields.ca [127.0.0.1]) by afields.ca (8.12.11/8.12.11) with ESMTP id i8F3HXOI041459; Tue, 14 Sep 2004 23:17:33 -0400 (EDT) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id i8F3HXRC041458; Tue, 14 Sep 2004 23:17:33 -0400 (EDT) (envelope-from afields) Date: Tue, 14 Sep 2004 23:17:33 -0400 From: Allan Fields To: Poul-Henning Kamp Message-ID: <20040915031733.GA17432@afields.ca> References: <20040910163707.GL34157@afields.ca> <27671.1094925547@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27671.1094925547@critter.freebsd.dk> User-Agent: Mutt/1.4i cc: DOT cc: freebsd-geom@freebsd.org Subject: Re: Can't reattach gbde slice [testing] X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2004 03:17:36 -0000 On Sat, Sep 11, 2004 at 07:59:07PM +0200, Poul-Henning Kamp wrote: > can you try the two fixes I just committed to -current ? Yes, seems to solve problems attaching in this test case. I've tried to break things again: so far seems fine, but haven't done anything exhaustive. Is it necessary after patching to rebuild number_of_keys=1 volumes that haven't had key sector problems yet? Will patches be included in upcoming 5.3-release? Otherwise notification in errata would help, just in case people setup such a device. Those with existing such volumes should now dump the filesystem and apply patches since they might otherwise loose data w/ existing gbde device and an unpatched kernel. Thanks, -- Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541 From owner-freebsd-geom@FreeBSD.ORG Wed Sep 15 05:29:48 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9753116A4CE for ; Wed, 15 Sep 2004 05:29:48 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id F2E1043D2F for ; Wed, 15 Sep 2004 05:29:47 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id i8F5Tagr008860; Wed, 15 Sep 2004 07:29:41 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Allan Fields From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 14 Sep 2004 23:17:33 EDT." <20040915031733.GA17432@afields.ca> Date: Wed, 15 Sep 2004 07:29:36 +0200 Message-ID: <8859.1095226176@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: DOT cc: freebsd-geom@freebsd.org Subject: Re: Can't reattach gbde slice [testing] X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2004 05:29:48 -0000 In message <20040915031733.GA17432@afields.ca>, Allan Fields writes: >On Sat, Sep 11, 2004 at 07:59:07PM +0200, Poul-Henning Kamp wrote: >> can you try the two fixes I just committed to -current ? > >Yes, seems to solve problems attaching in this test case. >I've tried to break things again: so far seems fine, but >haven't done anything exhaustive. > >Is it necessary after patching to rebuild number_of_keys=1 volumes >that haven't had key sector problems yet? I would do it to be on the safe side if I were you. If it is very cumbersome, it would be possible to tell from the four keysector locations and the disk-size if there is any danger: basically if any of the "unused" locations address modulus 2^32 are inside the size of the disk, then the volume is at risk. >Will patches be included in upcoming 5.3-release? Otherwise >notification in errata would help, just in case people setup such >a device. yes. >Those with existing such volumes should now dump the filesystem >and apply patches since they might otherwise loose data w/ existing >gbde device and an unpatched kernel. yes. -- 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 Thu Sep 16 15:17:15 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F348C16A4CE for ; Thu, 16 Sep 2004 15:17:14 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B7D043D5E for ; Thu, 16 Sep 2004 15:17:14 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 31BD7AEA55; Sun, 12 Sep 2004 00:08:39 +0200 (CEST) Date: Sun, 12 Sep 2004 00:08:39 +0200 From: Pawel Jakub Dawidek To: George Hartzell Message-ID: <20040911220839.GK30151@darkness.comp.waw.pl> References: <16706.33472.228042.851882@rosebud.alerce.com> <20040911074556.GI30151@darkness.comp.waw.pl> <16707.25008.865268.555842@rosebud.alerce.com> <16707.28763.7201.383177@rosebud.alerce.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="B4AXAQCuM90RQzKo" Content-Disposition: inline In-Reply-To: <16707.28763.7201.383177@rosebud.alerce.com> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-geom@FreeBSD.org Subject: Re: Mounting root... X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2004 15:17:15 -0000 --B4AXAQCuM90RQzKo Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 11, 2004 at 02:38:35PM -0700, George Hartzell wrote: +> George Hartzell writes: +> > [...] +> > Suggestions? +>=20 +> Sorry to follow up my own posting, but I have something that works. +>=20 +> Two changes to /etc/rc.d/swap1 +>=20 +> change stop_cmd from ':' to 'swap1_stop' +>=20 +> and change the line in swap1_stop from +>=20 +> swapctl -U -t blk +>=20 +> to +>=20 +> swapoff -a +>=20 +> And 1 behavioural change. I reflexively use reboot to reboot the +> machine, and hadn't ever made the connection that it doesn't run any +> shutdown scripts. W/ the changes above, and using 'shutdown -r now' +> to reboot the machine, it comes up w/out synching the mirror. +>=20 +> COOL! +>=20 +> To be consistent, one should probably also change the start_cmd to +> swap1_start, and fix that function to use swapon -a since its usage of +> swapctl is also broken. Then, no_swap and swapoff need to be +> defaulted in /etc/defaults/rc.conf. +>=20 +> Or, one could delete the swap1_{start,stop} functions, and just make +> start_cmd be 'swapon -a' and stop_cmd be 'swapoff -a'. +>=20 +> I don't know which is more better, clearly there's some history here +> that's unfinished, or a cross-BSD compatibility thing, or??? +>=20 +> Pawel, should I file some kind of bug here, or should you do +> something, or??? I already changed rc.d/swap1 locally, but before commiting it I want to fix rc.d/addswap as well. Speaking of rc.d/swap1. There is unused code from NetBSD and we don't care about compatibility with their rcNG anymore, so it could be just removed. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --B4AXAQCuM90RQzKo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBQ3dnForvXbEpPzQRAt3cAKDAuIUnZsHEqVNVE2GHDO9U7GeItQCgqRUG DKoCTWf9mI8ECWdrrrz6Q4c= =t0zU -----END PGP SIGNATURE----- --B4AXAQCuM90RQzKo-- From owner-freebsd-geom@FreeBSD.ORG Thu Sep 16 15:50:34 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0B5516A4CE for ; Thu, 16 Sep 2004 15:50:34 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AB7F43D46 for ; Thu, 16 Sep 2004 15:50:34 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 11E80ACAF1; Sun, 12 Sep 2004 00:33:38 +0200 (CEST) Date: Sun, 12 Sep 2004 00:33:38 +0200 From: Pawel Jakub Dawidek To: George Hartzell Message-ID: <20040911223338.GL30151@darkness.comp.waw.pl> References: <16706.33472.228042.851882@rosebud.alerce.com> <20040911074556.GI30151@darkness.comp.waw.pl> <16707.25008.865268.555842@rosebud.alerce.com> <16707.28763.7201.383177@rosebud.alerce.com> <20040911220839.GK30151@darkness.comp.waw.pl> <16707.30892.683099.462355@rosebud.alerce.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XjnXdB8RzgFEJ5cy" Content-Disposition: inline In-Reply-To: <16707.30892.683099.462355@rosebud.alerce.com> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-geom@FreeBSD.org Subject: Re: Mounting root... X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2004 15:50:34 -0000 --XjnXdB8RzgFEJ5cy Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 11, 2004 at 03:14:04PM -0700, George Hartzell wrote: +> Pawel Jakub Dawidek writes: +> > [...] +> > Speaking of rc.d/swap1. There is unused code from NetBSD and we don't +> > care about compatibility with their rcNG anymore, so it could be just +> > removed. +>=20 +> Since you're already juggling this set of balls, may I leave it to you +> to make the right set of changes and submit/pr them? Could you try this patch: http://people.freebsd.org/~pjd/patches/shutdown_swap.patch --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --XjnXdB8RzgFEJ5cy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBQ31CForvXbEpPzQRAuEwAKD4tMMRb2TMXstax51Xl0iskbp+kwCfXk+J BjqmYPu4s27oapXYo3A8qho= =cBZi -----END PGP SIGNATURE----- --XjnXdB8RzgFEJ5cy-- From owner-freebsd-geom@FreeBSD.ORG Fri Sep 17 08:57:46 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 32D3116A4CF for ; Fri, 17 Sep 2004 08:57:46 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id C452A43D49 for ; Fri, 17 Sep 2004 08:57:45 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 38F5AACC5F; Fri, 17 Sep 2004 10:57:44 +0200 (CEST) Date: Fri, 17 Sep 2004 10:57:44 +0200 From: Pawel Jakub Dawidek To: freebsd-geom@FreeBSD.org Message-ID: <20040917085744.GN30151@darkness.comp.waw.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nTlbyE9hfvXv7wAq" Content-Disposition: inline User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 Subject: Access counts. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2004 08:57:46 -0000 --nTlbyE9hfvXv7wAq Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. George Hartzell reported strange behaviour of gmirror class. On boot one componet suddenly disconnects. After he sent me a full dmesg with debugflags=3D5, I tracked it down, but I'm not sure how to fix it. Gmirror doesn't hold any access count on component providers if device is not open, so everyclass still can open those providers. Ok, we have a good habit to not to open providers when tasting to write, but exclusive bit is used often, but not directly, ie. even if I open da0s1a for reading, da0s1 will be opened r1w0e1. Now, let's go back to George's problem. Gmirror detects da0s1 as a part of the mirror, it creates consumer, etc. Geom gives da0s1a for tasting. Gmirror opens it for reading, but da0s1 is opened r1w0e1. In the same time, gmirror's working thread wants to update metadata, but it cannot do this, because it cannot open da0s1 for writing, because it has exclusive bit already. In such situation gmirror disconnects this component. I'm not really sure how to fix it. Old gmirror was keeping consumer open all the time, even if mirror wasn't open. Poul-Henning convince me to drop this behaviour and don't keep consumer open if mirror isn't open and I strognly agree with this, but I'm not sure how to handle George's problem with our current behaviour. Any ideas? --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --nTlbyE9hfvXv7wAq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBSqcIForvXbEpPzQRAm2KAKCsA9xv6i3ZjcFXkbSjc1ltnoaxPQCg+E0Q MMCqixfwdpfDj7l4lsOIyHQ= =V0Ce -----END PGP SIGNATURE----- --nTlbyE9hfvXv7wAq-- From owner-freebsd-geom@FreeBSD.ORG Fri Sep 17 09:01:52 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58C6516A4CE; Fri, 17 Sep 2004 09:01:52 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF73343D31; Fri, 17 Sep 2004 09:01:51 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id i8H91n6H090880; Fri, 17 Sep 2004 11:01:49 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Pawel Jakub Dawidek From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 17 Sep 2004 10:57:44 +0200." <20040917085744.GN30151@darkness.comp.waw.pl> Date: Fri, 17 Sep 2004 11:01:49 +0200 Message-ID: <90879.1095411709@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: freebsd-geom@freebsd.org Subject: Re: Access counts. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2004 09:01:52 -0000 In message <20040917085744.GN30151@darkness.comp.waw.pl>, Pawel Jakub Dawidek w rites: >Now, let's go back to George's problem. Gmirror detects da0s1 as a part >of the mirror, it creates consumer, etc. Geom gives da0s1a for tasting. >Gmirror opens it for reading, but da0s1 is opened r1w0e1. >In the same time, gmirror's working thread wants to update metadata, >but it cannot do this, because it cannot open da0s1 for writing, >because it has exclusive bit already. In such situation gmirror >disconnects this component. Gmirror does something wrong. You can upgrade your open from r1w0e1 to r1w1e1 if you want to. -- 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 Sep 17 09:29:25 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C05A016A4CE for ; Fri, 17 Sep 2004 09:29:25 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 107B343D54 for ; Fri, 17 Sep 2004 09:29:25 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 93F2FACAFE; Fri, 17 Sep 2004 11:29:22 +0200 (CEST) Date: Fri, 17 Sep 2004 11:29:22 +0200 From: Pawel Jakub Dawidek To: Poul-Henning Kamp Message-ID: <20040917092922.GO30151@darkness.comp.waw.pl> References: <20040917085744.GN30151@darkness.comp.waw.pl> <90879.1095411709@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nOmnfE42odZVW4AG" Content-Disposition: inline In-Reply-To: <90879.1095411709@critter.freebsd.dk> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-geom@freebsd.org Subject: Re: Access counts. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2004 09:29:25 -0000 --nOmnfE42odZVW4AG Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 17, 2004 at 11:01:49AM +0200, Poul-Henning Kamp wrote: +> >Now, let's go back to George's problem. Gmirror detects da0s1 as a part +> >of the mirror, it creates consumer, etc. Geom gives da0s1a for tasting. +> >Gmirror opens it for reading, but da0s1 is opened r1w0e1. +> >In the same time, gmirror's working thread wants to update metadata, +> >but it cannot do this, because it cannot open da0s1 for writing, +> >because it has exclusive bit already. In such situation gmirror +> >disconnects this component. +>=20 +> Gmirror does something wrong. +>=20 +> You can upgrade your open from r1w0e1 to r1w1e1 if you want to. You misunderstud me. We have something like this here: taste thread gmirror thread ------------ -------------- g_access(da0s1a, 1, 0, 0) GEOM:g_access(da0s1, 1, 0, 1) g_access(da0s1, 0, 1, 1) -> EPERM This is not the same consumer in taste thread and gmirror thread. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --nOmnfE42odZVW4AG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBSq5yForvXbEpPzQRAgOVAJ9Feu8YukQrzJRzZPcqCIHQB4zqJQCg2ucI X6YUQ6S/MnwYFVAPFV1/FuU= =QwYl -----END PGP SIGNATURE----- --nOmnfE42odZVW4AG-- From owner-freebsd-geom@FreeBSD.ORG Fri Sep 17 09:41:57 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F093516A4CE; Fri, 17 Sep 2004 09:41:57 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 419A943D3F; Fri, 17 Sep 2004 09:41:57 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id i8H9fuV1091697; Fri, 17 Sep 2004 11:41:56 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Pawel Jakub Dawidek From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 17 Sep 2004 11:29:22 +0200." <20040917092922.GO30151@darkness.comp.waw.pl> Date: Fri, 17 Sep 2004 11:41:56 +0200 Message-ID: <91696.1095414116@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: freebsd-geom@FreeBSD.org Subject: Re: Access counts. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2004 09:41:58 -0000 In message <20040917092922.GO30151@darkness.comp.waw.pl>, Pawel Jakub Dawidek w rites: >You misunderstud me. We have something like this here: > > taste thread gmirror thread > ------------ -------------- > g_access(da0s1a, 1, 0, 0) > GEOM:g_access(da0s1, 1, 0, 1) > g_access(da0s1, 0, 1, 1) -> EPERM > >This is not the same consumer in taste thread and gmirror thread. Why would you want to open with exclusive in taste ? If you find that you need that once you've looked for metadata you can upgrade at that point. -- 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 Sep 17 09:49:54 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65DA516A4CE for ; Fri, 17 Sep 2004 09:49:54 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5140B43D48 for ; Fri, 17 Sep 2004 09:49:51 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 5D0B3ACAFE; Fri, 17 Sep 2004 11:49:48 +0200 (CEST) Date: Fri, 17 Sep 2004 11:49:48 +0200 From: Pawel Jakub Dawidek To: Poul-Henning Kamp Message-ID: <20040917094948.GP30151@darkness.comp.waw.pl> References: <20040917092922.GO30151@darkness.comp.waw.pl> <91696.1095414116@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3sv7gENtRriLHjvQ" Content-Disposition: inline In-Reply-To: <91696.1095414116@critter.freebsd.dk> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-geom@FreeBSD.org Subject: Re: Access counts. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2004 09:49:54 -0000 --3sv7gENtRriLHjvQ Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 17, 2004 at 11:41:56AM +0200, Poul-Henning Kamp wrote: +> >You misunderstud me. We have something like this here: +> > +> > taste thread gmirror thread +> > ------------ -------------- +> > g_access(da0s1a, 1, 0, 0) +> > GEOM:g_access(da0s1, 1, 0, 1) +> > g_access(da0s1, 0, 1, 1) -> EPERM +> > +> >This is not the same consumer in taste thread and gmirror thread. +>=20 +> Why would you want to open with exclusive in taste ? If you find that +> you need that once you've looked for metadata you can upgrade at that +> point. I don't want to! Look a bit closer. I'm opening da0s1a with r1w0e0, but da0s1a opens da0s1 with r1w0e1. I don't touch da0s1 in taste anymore, I'm only opening da0s1a there. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --3sv7gENtRriLHjvQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBSrM8ForvXbEpPzQRAtv3AJ9bL/rYixcQEGiWxjpX2WZxTxGXhACfXxsg pPBvLumsJRHINeVMwWqLqLg= =s1Ox -----END PGP SIGNATURE----- --3sv7gENtRriLHjvQ-- From owner-freebsd-geom@FreeBSD.ORG Fri Sep 17 09:58:28 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5EA6316A4CF; Fri, 17 Sep 2004 09:58:28 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5EA843D5A; Fri, 17 Sep 2004 09:58:27 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id i8H9wQGR091996; Fri, 17 Sep 2004 11:58:26 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Pawel Jakub Dawidek From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 17 Sep 2004 11:49:48 +0200." <20040917094948.GP30151@darkness.comp.waw.pl> Date: Fri, 17 Sep 2004 11:58:26 +0200 Message-ID: <91995.1095415106@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: freebsd-geom@FreeBSD.org Subject: Re: Access counts. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2004 09:58:28 -0000 In message <20040917094948.GP30151@darkness.comp.waw.pl>, Pawel Jakub Dawidek w rites: >+> > taste thread gmirror thread >+> > ------------ -------------- >+> > g_access(da0s1a, 1, 0, 0) >+> > GEOM:g_access(da0s1, 1, 0, 1) >+> > g_access(da0s1, 0, 1, 1) -> EPERM >+> > >+> >This is not the same consumer in taste thread and gmirror thread. >+>=20 >+> Why would you want to open with exclusive in taste ? If you find that >+> you need that once you've looked for metadata you can upgrade at that >+> point. > >I don't want to! Look a bit closer. I'm opening da0s1a with r1w0e0, but >da0s1a opens da0s1 with r1w0e1. I don't touch da0s1 in taste anymore, >I'm only opening da0s1a there. So what you're saying that you are using two different consumers for da0s1 inside the same instance of g_mirror ? One for trafic (the one you open in your access) and one for metadata (in gmirror thread) ? If so Why ? If they're not different I don't see the problem... -- 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 Sep 17 10:03:21 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFDCC16A4DC for ; Fri, 17 Sep 2004 10:03:21 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FDD743D58 for ; Fri, 17 Sep 2004 10:03:21 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id C91F8ACAFE; Fri, 17 Sep 2004 12:03:17 +0200 (CEST) Date: Fri, 17 Sep 2004 12:03:17 +0200 From: Pawel Jakub Dawidek To: Poul-Henning Kamp Message-ID: <20040917100317.GQ30151@darkness.comp.waw.pl> References: <20040917094948.GP30151@darkness.comp.waw.pl> <91995.1095415106@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fvotiRPmxuu5ONx4" Content-Disposition: inline In-Reply-To: <91995.1095415106@critter.freebsd.dk> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-geom@FreeBSD.org Subject: Re: Access counts. X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Sep 2004 10:03:22 -0000 --fvotiRPmxuu5ONx4 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 17, 2004 at 11:58:26AM +0200, Poul-Henning Kamp wrote: +> >I don't want to! Look a bit closer. I'm opening da0s1a with r1w0e0, but +> >da0s1a opens da0s1 with r1w0e1. I don't touch da0s1 in taste anymore, +> >I'm only opening da0s1a there. +>=20 +> So what you're saying that you are using two different consumers +> for da0s1 inside the same instance of g_mirror ? One for trafic +> (the one you open in your access) and one for metadata (in gmirror +> thread) ? No... I'm tasing da0s1a, right? And what is happening when I open da0s1a r1w0e0? The class, which is owner of da0s1a opens da0s1 r1w0e1, then the class which is owner of da0s1 opens da0 r1w0e2 (probably) and then I can send my READ. What I'm trying to say is that I open da0s1a and it triggers opening da0s1 with r1w0e1 and at the same time I'm trying to open da0s1 for writing and it fails. --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --fvotiRPmxuu5ONx4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBSrZlForvXbEpPzQRAtvhAKDRkiYEKo6jLA8mLJQ6iDmOTCY8QgCcCLjh rR0RtuyMJIQJOM4yRJtcWAs= =f8qI -----END PGP SIGNATURE----- --fvotiRPmxuu5ONx4-- From owner-freebsd-geom@FreeBSD.ORG Sat Sep 18 08:23:00 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E7B516A4CE for ; Sat, 18 Sep 2004 08:23:00 +0000 (GMT) Received: from ongs.co.jp (ns.ongs.co.jp [202.216.232.58]) by mx1.FreeBSD.org (Postfix) with SMTP id C14F643D58 for ; Sat, 18 Sep 2004 08:22:55 +0000 (GMT) (envelope-from daichi@freebsd.org) Received: (qmail 35076 invoked from network); 18 Sep 2004 08:16:12 -0000 Received: from unknown (HELO parancell.ongs.co.jp) (202.216.232.62) by ns.ongs.co.jp with SMTP; 18 Sep 2004 08:16:12 -0000 Date: Sat, 18 Sep 2004 17:22:59 +0900 From: daichi To: Max Khon Message-Id: <20040918172259.62d9ae40.daichi@freebsd.org> In-Reply-To: <20040914184220.GB1075@samodelkin.net> References: <200409090607.i89674F3039635@freefall.freebsd.org> <20040914160245.7db7d1e0.daichi@freebsd.org> <20040914184220.GB1075@samodelkin.net> Organization: FreeBSD Project X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: fjoe@FreeBSD.org cc: freebsd-geom@FreeBSD.org Subject: Re: kern/71431: [panic fix] [patch] geom_uzip.ko caused panic X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2004 08:23:00 -0000 > Now I see the problem! Does this patch fix the problem for you? Yes. Your patch got fix this problem. I tried 5.3-BETA4 09/18 and got success. # kldload geom_uzip # mdconfig -a -f image.cloop ... # mount_cd9660 /dev/md0.uzip /mnt # ls /mnt ... # umount /mnt # mdconfig -d -u md0 # kldunload geom_uzip I think this patch is simple and very good. Please merge it :) > Index: g_uzip.c > =================================================================== > RCS file: /home/ncvs/src/sys/geom/uzip/g_uzip.c,v > retrieving revision 1.1.2.1 > diff -u -p -r1.1.2.1 g_uzip.c > --- g_uzip.c 10 Sep 2004 07:00:38 -0000 1.1.2.1 > +++ g_uzip.c 14 Sep 2004 18:19:36 -0000 > @@ -424,7 +424,7 @@ g_uzip_taste(struct g_class *mp, struct > for (blk = 1; offsets_read < total_offsets; blk++) { > uint32_t nread; > > - free(buf, M_GEOM_UZIP); > + free(buf, M_GEOM); > buf = g_read_data( > cp, blk * pp->sectorsize, pp->sectorsize, &error); > if (buf == NULL || error != 0) > @@ -470,7 +470,7 @@ err: > g_topology_lock(); > g_access(cp, -1, 0, 0); > if (buf != NULL) > - free(buf, M_GEOM_UZIP); > + free(buf, M_GEOM); > if (gp->softc != NULL) { > g_uzip_softc_free(gp->softc, NULL); > gp->softc = NULL; > > /fjoe -- Daichi GOTO, http://people.freebsd.org/~daichi