From owner-freebsd-fs@FreeBSD.ORG Wed Dec 30 14:59:26 2009 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 651A4106566C; Wed, 30 Dec 2009 14:59:26 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id D31F28FC0C; Wed, 30 Dec 2009 14:59:25 +0000 (UTC) Received: from outgoing.leidinger.net (pD954FE07.dip.t-dialin.net [217.84.254.7]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 0DB6DA18E; Wed, 30 Dec 2009 15:59:16 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 96AD72C4E93; Wed, 30 Dec 2009 15:59:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1262185152; bh=xUv1vS+L4TsyNfGx8JPbtqG4dVM9MOQQSwln9pe+7hI=; h=Message-ID:Date:From:To:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding; b=oCTN9nai+8N1ToN1dYq6zKlJnnmEkI+KrcmPPWjIgwkLWFyAxXXLhCojLyFdfZMrX S7vzNnCpOIw89fqJAQyAKHHY2Yf1jzy2jzzQqqWGuQkWc+7yGJnxqeSSE5k/oKohtF VEbgNOYRAIdqBM1gEUiu8z+1WRWSEXxQDWJDN0myIG1cBasRFC+4Ajnxs/mA7zX1/Z xG7dDvFSdzV183a2kj6PUOIBgz3zREtFLLLmmLBRlcQPFaPg1CroWaZQwhlP+lzDLA oHOG6p7GqLgMjt4Ed8f8KmvP89TSbmZzlWPMu9McSvE1W/Bt8IY9Rp4+zGcrbr4DHx nCLjQ1LrG/2ZA== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id nBUExBvf088610; Wed, 30 Dec 2009 15:59:11 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from 192.168.2.46 ([192.168.2.46]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 30 Dec 2009 15:59:10 +0100 Message-ID: <20091230155910.21474ubpm9u244qo@webmail.leidinger.net> Date: Wed, 30 Dec 2009 15:59:10 +0100 From: Alexander Leidinger To: fs@freebsd.org, stable@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.3) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 0DB6DA18E.2848C X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.686, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, J_CHICKENPOX_32 0.60, TW_SK 0.08, TW_ZF 0.08) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1262789960.52093@dA14L+B3GA+hEqYdWDK4zw X-EBL-Spam-Status: No Cc: Subject: Some fixes for ZFS on 7-stable (more testers wanted) 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, 30 Dec 2009 14:59:26 -0000 Hi, I backported some changes from 8-stable to 7-stable, I have this running on one 7-stable machine. I would like to get some more feedback for it (even an "it works for me" would be great). The main part of this change is that the FreeBSD taskqueue is used now instead of the opensolaris one (a more detailed list is below). It would also be nice if someone could have a look at the FIRST_THREAD_IN_PROC part. Can there be more than one thread at this place (I do not think so) and I should use FOREACH_THREAD_IN_PROC_instead? How to apply: - cd /usr/src/ - fetch http://www.Leidinger.net/FreeBSD/test/releng7_zfs_merge3.diff - fetch http://www.Leidinger.net/FreeBSD/test/opensolaris_taskq.c - fetch http://www.Leidinger.net/FreeBSD/test/taskq.h - mv taskq.h sys/cddl/contrib/opensolaris/uts/common/sys/taskq.h - mv opensolaris_taskq.c sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c - patch -p0 --quiet nvl_priv' and given the type of the 'packed' pointer the compiler could assume proper alignment for the replacement of bzero() with an 8-byte wide store to be valid. The problem is with the programmer. The programmer knew that the address did not have the alignment guarantees needed for a regular assignment, but failed to inform the compiler of that fact. In fact, the programmer told the compiler the opposite: alignment is guaranteed. The fix is to avoid using a pointer of type "nvlist_t *" and instead use a "char *" pointer as the basis for calculating the address. This tells the compiler that only 1-byte alignment can be assumed and the compiler will either keep the bzero() call or instead replace it with a sequence of byte-wise stores. Both are valid. ---snip--- MERGE http://svn.freebsd.org/viewvc/base?view=revision&revision=195822 trasz - easy merge ---snip--- Fix extattr_list_file(2) on ZFS in case the attribute directory doesn't exist and user doesn't have write access to the file. Without this fix, it returns bogus value instead of 0. For some reason this didn't manifest on my kernel compiled with -O0. ---snip--- MERGE http://svn.freebsd.org/viewvc/base?view=revision&revision=195909 pjd - very easy merge ---snip--- We don't support ephemeral IDs in FreeBSD and without this fix ZFS can panic when in zfs_fuid_create_cred() when userid is negative. It is converted to unsigned value which makes IS_EPHEMERAL() macro to incorrectly report that this is ephemeral ID. The most reasonable solution for now is to always report that the given ID is not ephemeral. ---snip--- MERGE http://svn.freebsd.org/viewvc/base?view=revision&revision=196291 pjd - probably easy merge ---snip--- - Fix a race where /dev/zfs control device is created before ZFS is fully initialized. Also destroy /dev/zfs before doing other deinitializations. - Initialization through taskq is no longer needed and there is a race where one of the zpool/zfs command loads zfs.ko and tries to do some work immediately, but /dev/zfs is not there yet. ---snip--- MERGE http://svn.freebsd.org/viewvc/base?view=revision&revision=196269 marcel - easy merge ---snip--- Fix misalignment in nvpair_native_embedded() caused by the compiler replacing the bzero(). See also revision 195627, which fixed the misalignment in nvpair_native_embedded_array(). ---snip--- MERGE (this also affects dtrace) http://svn.freebsd.org/viewvc/base?view=revision&revision=196295 pjd - added stuff to be reviewed, taskqueue available & same syntax? ---snip--- Remove OpenSolaris taskq port (it performs very poorly in our kernel) and replace it with wrappers around our taskqueue(9). To make it possible implement taskqueue_member() function which returns 1 if the given thread was created by the given taskqueue. ---snip--- MERGE http://svn.freebsd.org/viewvc/base?view=revision&revision=196297 pjd - easy merge ---snip--- Fix panic in zfs recv code. The last vnode (mountpoint's vnode) can have 0 usecount. ---snip--- MERGE http://svn.freebsd.org/viewvc/base?view=revision&revision=196299 pjd - VI_UNLOCK same syntax in RELENG_7? ---snip--- - We need to recycle vnode instead of freeing znode. Submitted by: avg - Add missing vnode interlock unlock. - Remove redundant znode locking. ---snip--- MERGE http://svn.freebsd.org/viewvc/base?view=revision&revision=196301 pjd - probably easy merge ---snip--- If z_buf is NULL, we should free znode immediately. ---snip--- MERGE http://svn.freebsd.org/viewvc/base?view=revision&revision=196307 pjd - to be reviewed ---snip--- Manage asynchronous vnode release just like Solaris. ---snip--- Bye, Alexander. -- Zeus gave Leda the bird. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137