From owner-freebsd-fs@FreeBSD.ORG Wed Jan 25 16:10:23 2012 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC8FD106566B; Wed, 25 Jan 2012 16:10:23 +0000 (UTC) (envelope-from martin.ranne@kockumsonics.com) Received: from webmail.kockumsonics.com (mail.kockumsonics.com [194.103.55.3]) by mx1.freebsd.org (Postfix) with ESMTP id EE4FF8FC08; Wed, 25 Jan 2012 16:10:22 +0000 (UTC) Received: from MAILGATE.sonet.local ([192.168.12.8]) by mailgate ([192.168.12.8]) with mapi id 14.01.0355.002; Wed, 25 Jan 2012 17:10:20 +0100 From: Martin Ranne To: 'Andriy Gapon' Thread-Topic: zpool import reboots computer Thread-Index: AczWvHf/qf1tgj/cQ3aTdT164KORYwAAxbSAAARQzcD///SRAP//zVoQgABYagD//xWRYIADrTyA//zFgGAAzUT8gP//s7ww//9W/wD/+8I8EA== Date: Wed, 25 Jan 2012 16:10:19 +0000 Message-ID: <39C592E81AEC0B418EAD826FC1BBB09B25CF08@mailgate> References: <39C592E81AEC0B418EAD826FC1BBB09B25031D@mailgate> <4F18459F.7040309@FreeBSD.org> <39C592E81AEC0B418EAD826FC1BBB09B252444@mailgate> <4F1858FE.7020509@FreeBSD.org> <39C592E81AEC0B418EAD826FC1BBB09B25253F@mailgate> <4F1878AC.6060704@FreeBSD.org> <39C592E81AEC0B418EAD826FC1BBB09B25284B@mailgate> <4F1AC995.7050506@FreeBSD.org> <39C592E81AEC0B418EAD826FC1BBB09B255E15@mailgate> <4F1D75CD.6050000@FreeBSD.org> <39C592E81AEC0B418EAD826FC1BBB09B25607F@mailgate> <4F1DC398.3050502@FreeBSD.org> In-Reply-To: <4F1DC398.3050502@FreeBSD.org> Accept-Language: sv-SE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.15.6] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "'freebsd-fs@freebsd.org'" Subject: RE: zpool import reboots computer X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2012 16:10:23 -0000 Thank you everyone who have helped me with hacking zfs. We have now been ab= le to do an import of the pool and transfered all the data to another compu= ter. Next step is to see if we can quickly repair the pool or just delete i= t and make it new again. We hacked the functions vdev_mirror_child_select() and vdev_mirror_io_start= (). In vdev_mirror_io_start() we added the code below just after the mc poi= nter was set in both loops. if (mc->mc_vd =3D=3D NULL) { (void) printf("mc->mc_vd is NULL. Child %i\n", c); continue; } In vdev_mirror_child_select(), we added the code below just after the mc po= inter was set. if (mc->mc_vd =3D=3D NULL) { (void) printf("mc->mc_vd is NULL. Child %i\n", c); mc->mc_tried =3D 1; mc->mc_skipped =3D 1; continue; } Best regards, Martin Ranne >On 2012-01-23 21:31, Andriy Gapon wrote:=20 >>on 23/01/2012 20:33 Martin Ranne said the following: >>Have done some checking and found mc->mc_vd =3D=3D NULL in the function v= dev_mirror_io_start() where the while-loop is.=20 >> >>while (children--) {=20 >> mc =3D &mm->mm_child[c]; >> zio_nowait(zio_vdev_child_io(zio, zio->io_bp, >> mc->mc_vd, mc->mc_offset, zio->io_data, zio->io_size, >> zio->io_type, zio->io_priority, 0, >> vdev_mirror_child_done, mc)); >> c++; >>} >> >>if i set a break before it runs zio_nowait() it will still crash the kern= el.=20 >>What can i check next for it to be able to continue? Is it possible to ha= ve it ignore the child where mc_vd is NULL? I am also looking into what mor= e I can do to debug it (adding code to print to console as i can not use ke= rnel dumps). >> >Not sure. If by "set a break" you mean inserting a break statement, try >continue instead. >