From owner-freebsd-current@FreeBSD.ORG Tue Nov 13 09:24:27 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 526EC16A420; Tue, 13 Nov 2007 09:24:27 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id CC7ED13C48A; Tue, 13 Nov 2007 09:24:26 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 4C0E62092; Tue, 13 Nov 2007 10:23:58 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.1/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 34FBA208F; Tue, 13 Nov 2007 10:23:58 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 139408447C; Tue, 13 Nov 2007 10:23:58 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: d@delphij.net References: <20070917194009.W84177@woozle.rinet.ru> <200709241223.52140.qpadla@gmail.com> <472561A7.60108@delphij.net> <200711121433.26356.qpadla@gmail.com> <20071112141959.GP37471@deviant.kiev.zoral.com.ua> <86k5onwmij.fsf@ds4.des.no> <4738A35D.3080408@delphij.net> Date: Tue, 13 Nov 2007 10:23:57 +0100 In-Reply-To: <4738A35D.3080408@delphij.net> (Xin LI's message of "Mon\, 12 Nov 2007 11\:02\:53 -0800") Message-ID: <86bq9yijma.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: Kostik Belousov , freebsd-current@freebsd.org, delphij@freebsd.org, Dmitry Morozovsky Subject: Re: tmpfs on contemporary -current: panic: locked against myself X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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, 13 Nov 2007 09:24:27 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Xin LI writes: > Dag-Erling Sm=C3=B8rgrav wrote: > > Incidentally, later edits to the tmpfs code have introduced a number > > of style(9) violations, one of which is visible in my patch. > Could you please give me a copy of the patch? :) Here are some of them, at least. There are more (mostly incorrect indentation of continuation lines). DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=tmpfs.diff Index: tmpfs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/tmpfs/tmpfs_vfsops.c,v retrieving revision 1.11 diff -u -r1.11 tmpfs_vfsops.c --- tmpfs_vfsops.c 4 Oct 2007 17:11:48 -0000 1.11 +++ tmpfs_vfsops.c 13 Nov 2007 09:20:57 -0000 @@ -216,7 +216,7 @@ } printf("WARNING: TMPFS is considered to be a highly experimental " - "feature in FreeBSD.\n"); + "feature in FreeBSD.\n"); vn_lock(mp->mnt_vnodecovered, LK_SHARED | LK_RETRY, td); error = VOP_GETATTR(mp->mnt_vnodecovered, &va, mp->mnt_cred, td); @@ -231,14 +231,12 @@ vfs_scanopt(mp->mnt_optnew, "uid", "%d", &root_uid) != 1) root_uid = va.va_uid; if (mp->mnt_cred->cr_ruid != 0 || - vfs_scanopt(mp->mnt_optnew, "mode", "%o", &root_mode) != 1) + vfs_scanopt(mp->mnt_optnew, "mode", "%ho", &root_mode) != 1) root_mode = va.va_mode; - if(vfs_scanopt(mp->mnt_optnew, "inodes", "%d", &nodes_max) != 1) + if (vfs_scanopt(mp->mnt_optnew, "inodes", "%d", &nodes_max) != 1) nodes_max = 0; - if(vfs_scanopt(mp->mnt_optnew, - "size", - "%qu", &size_max) != 1) + if (vfs_scanopt(mp->mnt_optnew, "size", "%qu", &size_max) != 1) size_max = 0; /* Do not allow mounts if we do not have enough memory to preserve @@ -277,19 +275,15 @@ tmp->tm_pages_max = pages; tmp->tm_pages_used = 0; tmp->tm_ino_unr = new_unrhdr(2, INT_MAX, &tmp->allnode_lock); - tmp->tm_dirent_pool = uma_zcreate( - "TMPFS dirent", - sizeof(struct tmpfs_dirent), - NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, - 0); - tmp->tm_node_pool = uma_zcreate( - "TMPFS node", - sizeof(struct tmpfs_node), - tmpfs_node_ctor, tmpfs_node_dtor, - tmpfs_node_init, tmpfs_node_fini, - UMA_ALIGN_PTR, - 0); + tmp->tm_dirent_pool = uma_zcreate("TMPFS dirent", + sizeof(struct tmpfs_dirent), + NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, 0); + tmp->tm_node_pool = uma_zcreate("TMPFS node", + sizeof(struct tmpfs_node), + tmpfs_node_ctor, tmpfs_node_dtor, + tmpfs_node_init, tmpfs_node_fini, + UMA_ALIGN_PTR, 0); /* Allocate the root node. */ error = tmpfs_alloc_node(tmp, VDIR, root_uid, --=-=-=--