Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 May 2008 09:48:26 -0700
From:      Suleiman Souhlal <ssouhlal@FreeBSD.org>
To:        freebsd-hackers@FreeBSD.ORG, ivoras@FreeBSD.ORG
Subject:   Re: Impact of having a large number of open file descriptors
Message-ID:  <64200F15-4444-44FE-B904-673543441F35@FreeBSD.org>
In-Reply-To: <200805281446.m4SEkojn099133@lurza.secnetix.de>
References:  <200805281446.m4SEkojn099133@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?64200F15-4444-44FE-B904-673543441F35>