From owner-freebsd-hackers@FreeBSD.ORG Thu May 29 16:48:34 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8F94106566C for ; Thu, 29 May 2008 16:48:34 +0000 (UTC) (envelope-from ssouhlal@FreeBSD.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id BA94E8FC14 for ; Thu, 29 May 2008 16:48:34 +0000 (UTC) (envelope-from ssouhlal@FreeBSD.org) Received: from [192.168.0.100] (c-76-21-32-5.hsd1.ca.comcast.net [76.21.32.5]) by elvis.mu.org (Postfix) with ESMTP id AF5331A4D7E; Thu, 29 May 2008 09:48:34 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v753) In-Reply-To: <200805281446.m4SEkojn099133@lurza.secnetix.de> References: <200805281446.m4SEkojn099133@lurza.secnetix.de> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <64200F15-4444-44FE-B904-673543441F35@FreeBSD.org> Content-Transfer-Encoding: 7bit From: Suleiman Souhlal Date: Thu, 29 May 2008 09:48:26 -0700 To: freebsd-hackers@FreeBSD.ORG, ivoras@FreeBSD.ORG X-Mailer: Apple Mail (2.753) Cc: Subject: Re: Impact of having a large number of open file descriptors X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2008 16:48:35 -0000 On May 28, 2008, at 7:46 AM, Oliver Fromme wrote: > Ivan Voras wrote: >> Im thinking again of the old idea of implementing poor man's file >> replication system using kqueue to monitor changes on files. > > It would be cool to have a kernel interface so you could > attach to a mountpoint and receive a log of all activity > on that file system. That's similar to what DragonFly's > journaling feature does. > > Unfortunately the kqueue interface isn't capable of doing > something like that ... So this is not an answer to your > question, I'm afraid. I have an old patch that makes kqueue monitor every file write on the system and return the inode number in the knote's data field: http:// people.freebsd.org/~ssouhlal/testing/kqueue-anyvnode-20050503.diff . I'd think it shouldn't be too hard to make it per-mountpoint.. >> While at it, will EVFILT_VNODE and NOTE_WRITE catch "additional" ways >> the file can be modified, meaning mmap()? I think it does, although it will get delayed until the mmapped pages get flushed to disk. -- Suleiman