From owner-freebsd-fs@FreeBSD.ORG Tue Dec 29 23:55:42 2009 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 E020C106566C for ; Tue, 29 Dec 2009 23:55:41 +0000 (UTC) (envelope-from mickael.maillot@gmail.com) Received: from mail-ew0-f226.google.com (mail-ew0-f226.google.com [209.85.219.226]) by mx1.freebsd.org (Postfix) with ESMTP id 74E008FC0C for ; Tue, 29 Dec 2009 23:55:40 +0000 (UTC) Received: by ewy26 with SMTP id 26so8877142ewy.3 for ; Tue, 29 Dec 2009 15:55:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=hJ8bkPvd438d9qM5LfexGZY2xgk2xZIZcXM2YgwL4ts=; b=vHNAojcGGjVJw34XNLWbbWgnmomvIk5IVjVEBaH5gznlC7vB2zq9Jm0NaqeyDXbZHN kO3V6z7A6TKBFELRBF4vaD7yuaP/rh910H89dKdD4I8Zcv+VP1Pa5yZrSQC9Ms/CpxCe P1SBVIqjcXMpubfNvg35GeaypEoVgvUUEGTZw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Pz+zBH2tnqzFCWMtTJD1Ir09f4wDimqmE/pAItmmRhqxythtSjQFis4eNNGyXBkokB V8W6JSoEBThUou7O9mu2hsCSROeial7/KzzOH89JM51uP65zy376RE/wG8yZrUfTRVje Y8vHd2yHBV0861E1tYCg54TdB26lWDWbb2F+Y= MIME-Version: 1.0 Received: by 10.216.93.74 with SMTP id k52mr660856wef.144.1262130933043; Tue, 29 Dec 2009 15:55:33 -0800 (PST) In-Reply-To: References: Date: Wed, 30 Dec 2009 00:55:33 +0100 Message-ID: From: =?ISO-8859-1?Q?Micka=EBl_Maillot?= To: Xin LI Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@freebsd.org Subject: Re: ZFS small fix in arc.c and zvol.c 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: Tue, 29 Dec 2009 23:55:42 -0000 2009/12/29 Xin LI : > Hi, > > I think we'd better to bring our base code to be more current rather > than picking up individual revisions, diverging further is probably > not a good idea if we see long term cooperation with OpenSolaris as a > goal... > > On Tue, Dec 29, 2009 at 12:46 PM, Micka=EBl Maillot > wrote: >> Hi, >> >> /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs >> in arc.c, a mutex is not properly detroyed: >> >> --- arc.c.orig =A02009-12-29 21:15:31.192819155 +0100 >> +++ arc.c =A0 =A0 =A0 2009-12-29 21:16:58.034271766 +0100 >> @@ -3626,6 +3626,7 @@ >> =A0 =A0 =A0 =A0mutex_destroy(&arc_mru_ghost->arcs_mtx); >> =A0 =A0 =A0 =A0mutex_destroy(&arc_mfu->arcs_mtx); >> =A0 =A0 =A0 =A0mutex_destroy(&arc_mfu_ghost->arcs_mtx); >> + =A0 =A0 =A0 mutex_destroy(&arc_l2c_only->arcs_mtx); >> >> =A0 =A0 =A0 =A0mutex_destroy(&zfs_write_limit_lock); > > Looks like a part of OpenSolaris onnv revision 8214? =A0Are you having > some specific issue without this patch? > i don't have any problem, it's just look like a miss. only this line is missing. http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=3D6747934 http://hg.intevation.org/mirrors/opensolaris.org/onnv-gate/rev/d7abf7c1f1c1 >> i dont know if it's ok but in zvol.c >> opensolaris call zvol_size_changed >> just after zil_replay in zvol_create_minor function >> >> --- zvol.c.orig 2009-12-29 21:31:42.111529028 +0100 >> +++ zvol.c =A0 =A0 =A02009-12-29 21:32:32.347413297 +0100 >> @@ -837,6 +837,7 @@ >> =A0 =A0 =A0 =A0zv->zv_volblocksize =3D doi.doi_data_block_size; >> >> =A0 =A0 =A0 =A0zil_replay(os, zv, &zv->zv_txg_assign, zvol_replay_vector= , NULL); >> + =A0 =A0 =A0 zvol_size_changed(zv, maj); >> >> =A0 =A0 =A0 =A0/* XXX this should handle the possible i/o error */ >> =A0 =A0 =A0 =A0VERIFY(dsl_prop_register(dmu_objset_ds(zv->zv_objset), > > It seems that the OpenSolaris code has changed a lot and I didn't find > similar change in OpenSolaris (yet). =A0Do you have a specific revision > number or a tag? > > Cheers, > -- > Xin LI http://www.delphij.net > i just compare with zvol.c at nov 2008, this line was recently removed with: http://cvs.opensolaris.org/source/diff/onnv/onnv-gate/usr/src/uts/common/fs= /zfs/zvol.c?r2=3D%252Fonnv%252Fonnv-gate%252Fusr%252Fsrc%252Futs%252Fcommon= %252Ffs%252Fzfs%252Fzvol.c%4010588%3Adc03f981ea18&r1=3D%252Fonnv%252Fonnv-g= ate%252Fusr%252Fsrc%252Futs%252Fcommon%252Ffs%252Fzfs%252Fzvol.c%4010310%3A= ba87b3315737 but with comment on r196927 from pjd, may be it's ok to add zvol_size_changed or totally useless.