From owner-freebsd-ports@FreeBSD.ORG Mon Jan 7 21:04:04 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A953D16A419; Mon, 7 Jan 2008 21:04:04 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 12D7013C457; Mon, 7 Jan 2008 21:04:03 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.1/8.14.1) with ESMTP id m07L41Cx015025; Tue, 8 Jan 2008 00:04:02 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Tue, 8 Jan 2008 00:04:01 +0300 (MSK) From: Dmitry Morozovsky To: Vic Abell In-Reply-To: <001401c85141$89218aa0$a4c30c48@radio> Message-ID: <20080108000007.V14207@woozle.rinet.ru> References: <001401c85141$89218aa0$a4c30c48@radio> X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (woozle.rinet.ru [0.0.0.0]); Tue, 08 Jan 2008 00:04:02 +0300 (MSK) Cc: 'Wesley Shields' , freebsd-ports@freebsd.org Subject: RE: lsof and ZFS X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2008 21:04:04 -0000 On Mon, 7 Jan 2008, Vic Abell wrote: VA> Larry, VA> VA> You write: VA> > VA> > On Sat, 5 Jan 2008, Dmitry Morozovsky wrote: VA> > > VA> > > The only additional thing I would like to bring attention VA> > > at is the fact that VA> > > ZFS can be used as root, requiring to additionally patch VA> > > lsof like FreeSBIE people did for cd9660 root. VA> VA> I'm not sure about that. The patch in the cd9660 PR was needed VA> because lsof couldn't stat(2) the root file system. I'm not VA> sure I understand why that is. VA> VA> What's more, the patch may have unwanted side effects which I VA> can't determine myself -- e.g., lsof may not be able to convert VA> kernel device numbers to the user space device numbers returned VA> by stat(2) and displayed by ls(1). I've e-mailed the PR author, VA> asking him to do some testing. VA> VA> > I believe Vic Abell (the author) is aware of this, although VA> > my machines (that he is using for the dev, on RELENG_7), are VA> > NOT rooted on ZFS, although everything else, except swap, is VA> > on ZFS. VA> VA> Yes, Larry, I see that now. / is UFS. Some time someone will VA> have to test the lsof update for ZFS on a system that does have VA> / on ZFS. I won't be able to do that. VA> VA> I need to warn everyone that the ZFS update for FreeBSD lsof is VA> going to take a lot of work and time. Lsof needs the znode VA> structure definition (and other ZFS structure definitions) that VA> are defined in the OpenSolaris sources and its header files won't VA> compile in combination with any FreeBSD header files. I found VA> the module compatibility stuff, so I know how to make the VA> OpenSolaris headers compile, but it will require major VA> modifications to lsof to be able to do it. I'll more than happy to test on my machines with ZFS root - my home FreeBSD workstation has been configured with ZFS-on-root, and so my notebook FreeBSD boot (it's triple-booted). Which info should I provide? Quick reference: root@revamp:/usr/src# mount | grep '/ ' revamp on / (zfs, local) root@revamp:/usr/src# uname -a FreeBSD revamp.wpub.woozle.net 7.0-BETA4 FreeBSD 7.0-BETA4 #17: Sun Dec 16 16:24:37 MSK 2007 marck@revamp.wpub.woozle.net:/usr/obj/usr/src/sys/MINI i386 root@revamp:/usr/src# lsof -n -c init COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME init 1 root cwd unknown file system type: zfs init 1 root rtd unknown file system type: zfs init 1 root txt unknown file system type: zfs root@revamp:/usr/src# pkg_info | grep lsof lsof-4.79E Lists information about open files (similar to fstat(1)) Thanks you in advance! Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------