From owner-freebsd-fs@FreeBSD.ORG Tue Aug 12 18:50:16 2008 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 A12611065677 for ; Tue, 12 Aug 2008 18:50:16 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0C9778FC13 for ; Tue, 12 Aug 2008 18:50:14 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48A1DB63.3050804@FreeBSD.org> Date: Tue, 12 Aug 2008 20:50:11 +0200 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: freebsd-fs@freebsd.org References: <20080812182028.GA7047@dchagin.dialup.corbina.ru> In-Reply-To: <20080812182028.GA7047@dchagin.dialup.corbina.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: new file system (my experiments) 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, 12 Aug 2008 18:50:16 -0000 Chagin Dmitry wrote: > Hi > > I experiment resalization of new file system based on tmpfs - shmfs for > Linux emulation layer. for the beginning has simply copied current source > codes to compat/lintmps, has compiled a module and tried to mount: > > mount -t lintmpfs lintmpfs /compat/linux/dev/shm > and has received a panic: > > #11 0xffffffff803b6ade in calltrap () > at /usr/local/root/pub/linux_shmfs/sys/amd64/amd64/exception.S:217 > ---Type to continue, or q to quit--- > #12 0xffffffff802a794b in vfs_filteropt (opts=0x0, legal=0xffffffff808497e0) > at /usr/local/root/pub/linux_shmfs/sys/kern/vfs_mount.c:1812 > #13 0xffffffff80847015 in tmpfs_mount (mp=0xffffff0001a3a000, > td=0xffffff004dcb56c0) > at /usr/local/root/pub/linux_shmfs/sys/modules/lintmpfs/../../compat/lintmpf > s/lintmpfs_vfsops.c:206 > #14 0xffffffff802a947f in vfs_donmount (td=0xffffff004dcb56c0, fsflags=0, > fsoptions=0xffffff000190e800) > at /usr/local/root/pub/linux_shmfs/sys/kern/vfs_mount.c:1010 > #15 0xffffffff802aaa46 in nmount (td=0xffffff004dcb56c0, > uap=0xfffffffe7e7fcbf0) > at /usr/local/root/pub/linux_shmfs/sys/kern/vfs_mount.c:417 > #16 0xffffffff803d4e47 in syscall (frame=0xfffffffe7e7fcc80) > at /usr/local/root/pub/linux_shmfs/sys/amd64/amd64/trap.c:902 > #17 0xffffffff803b6ceb in Xfast_syscall () > > (kgdb) f 12 > #12 0xffffffff802a794b in vfs_filteropt (opts=0x0, legal=0xffffffff808497e0) > at /usr/local/root/pub/linux_shmfs/sys/kern/vfs_mount.c:1812 > 1812 { > (kgdb) list *0xffffffff802a794b > 0xffffffff802a794b is in vfs_filteropt (/usr/local/root/pub/linux_shmfs/sys/kern > /vfs_mount.c:1818). > 1813 struct vfsopt *opt; > 1814 char errmsg[255]; > 1815 const char **t, *p, *q; > 1816 int ret = 0; > 1817 > 1818 TAILQ_FOREACH(opt, opts, link) { > 1819 p = opt->name; > 1820 q = NULL; > 1821 if (p[0] == 'n' && p[1] == 'o') > 1822 q = p + 2; > (kgdb) > (kgdb) up > #13 0xffffffff80847015 in tmpfs_mount (mp=0xffffff0001a3a000, > td=0xffffff004dcb56c0) > at /usr/local/root/pub/linux_shmfs/sys/modules/lintmpfs/../../compat/lintmpf > s/lintmpfs_vfsops.c:206 > 206 if (vfs_filteropt(mp->mnt_optnew, lintmpfs_opts)) > (kgdb) > > Problem in that mp->mnt_optnew is 0, but tmpfs works correctly. > I shall not understand that I have missied... > If you have DEBUG_LOCKS and/or DEBUG_VFS_LOCKS then one of them changes the kernel ABI (adds entries to structs somewhere). You need to either add them to the module CFLAGS or use make buildkernel. Kris