Date: Tue, 13 Nov 2007 10:23:57 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: d@delphij.net Cc: Kostik Belousov <kostikbel@gmail.com>, freebsd-current@freebsd.org, delphij@freebsd.org, Dmitry Morozovsky <marck@rinet.ru> Subject: Re: tmpfs on contemporary -current: panic: locked against myself Message-ID: <86bq9yijma.fsf@ds4.des.no> In-Reply-To: <4738A35D.3080408@delphij.net> (Xin LI's message of "Mon\, 12 Nov 2007 11\:02\:53 -0800") 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>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Xin LI <delphij@delphij.net> writes:
> Dag-Erling Smørgrav 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
--
Dag-Erling Smørgrav - des@des.no
[-- Attachment #2 --]
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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86bq9yijma.fsf>
