HAMMER and file alternation problem

YONETANI Tomokazu qhwt+dfly at les.ath.cx
Fri Oct 17 07:31:25 PDT 2008


On Fri, Oct 17, 2008 at 10:49:23PM +1100, Petr Janda wrote:
> > No, that patch was meant to examine what was not working, and it's not
> > supposed to work "together" with kqueue support that Matt just committed.
> > See quoted part in his message.
> 
> Sorry, you're going too technical on me. Was the problem the fact that HAMMER 
> didnt have kqueue support or because KDE was checking ctime instead of mtime?

"The problems" are kdelibs' own polling code somehow looks only at ctime,
which won't be changed on HAMMER, *and* FAM is not somehow detected during
configure stage of kdelibs3.  At least not for me.
  $ cd /usr/pkgsrc/sysutils/fam
  $ bmake PKG_OPTIONS.fam=kqueue install
  $ cd ../../x11/kdelibs3
  $ bmake configure
  $ grep HAVE_FAM `bmake -V '${WRKSRC}'`
  /* #undef HAVE_FAM */

kqueue is an efficient way to be notified of files/directories or some
other things but is not mandatory to kdelibs or FAM.  FAM's polling code
looks at both ctime and mtime, so if FAM method is avaiable to kdelibs3,
your problem would be solved.

I think changing kdelibs' polling code to look at mtime should also work,
but I'm not very certain why they choose to only look at ctime.  But if
kdelibs is moving towards relying on FAM (as mentioned in Emil Mikulic's
message quoted in Matt's), I won't try to talk upstream for a change.

Cheers.





More information about the Kernel mailing list