From owner-freebsd-current@FreeBSD.ORG Tue Nov 20 16:00:33 2012 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E33DA5F; Tue, 20 Nov 2012 16:00:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1166A8FC15; Tue, 20 Nov 2012 16:00:31 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA29224; Tue, 20 Nov 2012 18:00:29 +0200 (EET) (envelope-from avg@FreeBSD.org) Message-ID: <50ABA91D.9090905@FreeBSD.org> Date: Tue, 20 Nov 2012 18:00:29 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2 MIME-Version: 1.0 To: Andrei Lavreniyuk Subject: Re: problem booting to multi-vdev root pool References: <50AB5202.4070906@FreeBSD.org> <50AB71A7.7050101@FreeBSD.org> <50AB80C6.1090507@FreeBSD.org> <50AB8C1F.2040108@FreeBSD.org> <50AB90E9.5070102@FreeBSD.org> <50AB9C5B.6030006@FreeBSD.org> In-Reply-To: <50AB9C5B.6030006@FreeBSD.org> X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org, freebsd-current@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Nov 2012 16:00:33 -0000 on 20/11/2012 17:06 Andriy Gapon said the following: > on 20/11/2012 16:59 Andrei Lavreniyuk said the following: >>>> Sorry to make you jump through so many hoops. >>>> Now that I see that the probed config is entirely correct, the problem appears to >>>> be quite obvious: vdev_alloc is not able to properly use spa_version in this >>>> context because spa_ubsync is not initialized yet. >>>> >>>> Let me think about how to fix this. >>> >>> I hope that the following simple patch should fix the problem: >>> http://people.freebsd.org/~avg/spa_import_rootpool.version.diff >> >> >> At mount system trap and reboot. >> > > Unexpected. Can you catch the backtrace of the panic? > If you have it on the screen. > > Ah, found another bogosity in the code: --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c @@ -3925,8 +4117,6 @@ spa_import_rootpool(const char *name) return (error); } - spa_history_log_version(spa, LOG_POOL_IMPORT); - spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); vdev_free(rvd); spa_config_exit(spa, SCL_ALL, FTAG); This previously "worked" only because the pool version was zero and thus the action was a NOP anyway. -- Andriy Gapon