HAMMER and file alternation problem

Matthew Dillon dillon at apollo.backplane.com
Thu Oct 16 09:00:01 PDT 2008


: (Emil Mikulic <emil at dmr.ath.cx>)
:
:pkgsrc.se web interface suggests that kdelibs4 depends on sysutils/fam
:(File Alteration Monitor)
:
:taken from http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/pkgsrc/sysutils/fam/Makefile?rev=1.36
:
:# ---
:.if !empty(PKG_OPTIONS:Mkqueue) && \
:    (${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD")
:CPPFLAGS+=              -DHAVE_KQUEUE
:# ---

				---

: (YONETANI Tomokazu <qhwt+dfly at les.ath.cx>)
:Apparently it's in kdelibs (untested yet, but...)
:...
:On HAMMER, neither st_ctime nor st_nlink change when a new object
:is created in a directory:

				---

    On Emil's mention of KQUEUE... HAMMER does not currently support it
    but it looks like it would be very easy to add.  I am going to add
    kqfilter support to HAMMER today.  I think this may be our best bet.

    I can't change HAMMER to adjust st_ctime because rolling a new ctime
    requires rolling a new B-Tree record, and doing so would really screw
    up directory performance.  I'm a bit at a loss as to why KDE checks
    ctime at all when it should be checking mtime.

    Joerg also brought up the st_nlink issue.  UFS increments/decrements
    a directory's st_nlink count on the creation and deletion of 
    subdirectories.  It does not bump the count in the directory for the
    creation and deletion of files.  I do intend to change HAMMER to
    work the same as UFS in this regard, because 'find' and other programs
    seem to depend on it.  It isn't quite so easy to do this as it is to
    add kqueue support so it may be a while before I get it in, but it 
    will be in for 2.2.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Kernel mailing list