From owner-freebsd-geom@FreeBSD.ORG Tue Apr 21 10:27:57 2009 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 54DCB106566B; Tue, 21 Apr 2009 10:27:57 +0000 (UTC) (envelope-from p.dawidek@wheel.pl) Received: from mx3.wheel.pl (grom.wheel.pl [91.121.70.66]) by mx1.freebsd.org (Postfix) with ESMTP id 0A4DC8FC20; Tue, 21 Apr 2009 10:27:56 +0000 (UTC) (envelope-from p.dawidek@wheel.pl) Received: from localhost (unknown [10.10.2.1]) by mx3.wheel.pl (Postfix) with ESMTP id 3398715B70; Tue, 21 Apr 2009 12:27:56 +0200 (CEST) X-Virus-Scanned: amavisd-new at mx3.wheel.pl Received: from mx3.wheel.pl ([10.10.2.1]) by localhost (mx3.wheel.pl [10.10.2.1]) (amavisd-new, port 10024) with ESMTP id IuhiM7FLFWCf; Tue, 21 Apr 2009 12:27:55 +0200 (CEST) Received: from mail.wheel.pl (ghf58.internetdsl.tpnet.pl [83.12.187.58]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx3.wheel.pl (Postfix) with ESMTPS id 103B915B6C; Tue, 21 Apr 2009 12:27:55 +0200 (CEST) Received: from localhost (unknown [10.0.2.3]) by mail.wheel.pl (Postfix) with ESMTP id 1728523981; Tue, 21 Apr 2009 12:27:54 +0200 (CEST) Received: from mail.wheel.pl ([10.0.2.3]) by localhost (mail.wheel.pl [10.0.2.3]) (amavisd-new, port 10024) with ESMTP id ffhLo8WBSBin; Tue, 21 Apr 2009 12:27:53 +0200 (CEST) Received: from localhost (pjd.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wheel.pl (Postfix) with ESMTP id 427B72397E; Tue, 21 Apr 2009 12:27:53 +0200 (CEST) Date: Tue, 21 Apr 2009 12:28:02 +0200 From: Pawel Jakub Dawidek To: Ulf Lilleengen Message-ID: <20090421102802.GC7771@mail.wheel.pl> References: <200904191010.n3JAA6lk068313@freefall.freebsd.org> <20090421093011.GB7771@mail.wheel.pl> <20090421111559.GA21043@carrot> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090421111559.GA21043@carrot> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://www.wheel.pl/pgpkeys/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 Cc: freebsd-geom@FreeBSD.org Subject: Re: kern/133604: [gvinum] [panic] writing to gjournal on a gvinum volume 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: Tue, 21 Apr 2009 10:27:57 -0000 On Tue, Apr 21, 2009 at 01:16:00PM +0200, Ulf Lilleengen wrote: > On tir, apr 21, 2009 at 11:30:11am +0200, Pawel Jakub Dawidek wrote: > > The bio_cflags field is for consumer use only (in this case gjournal. As > > provide you should use bio_pflags. > > > Yes, but shouldn't cflags be used for the BIOs that gvinum issue downwards > when it is a consumer? Like this: > > gjournal (consumer) > | > gvinum (provider) > gvinum (consumer) > | > disk (provider) > > I think the problem is that it has to check where the BIO comes from when > picking a BIO from the input queue. In this case, it misinterpreted the > gjournal BIO as an internal DONE bio, so if the originator of the BIO is > known, it can determine if cflags is actually its own. Is this making sense? One never passes received bio down, but instead bio is cloned, modified and passed down, so in your case: gjournal (consumer) | bio1 | gvinum (provider) gvinum (consumer) | bio2 | disk (provider) You can use bio1->bio_pflags and bio2->bio_cflags. If you have the same queue for incoming and completed bios you might be able to find out which is which by checking bio_to/bio_from fields for example. -- Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am!