Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jun 2006 15:55:08 -0400
From:      Mikhail Teterin <mi+mx@aldan.algebra.com>
To:        current@freebsd.org
Cc:        jmg@freebsd.org
Subject:   EVFILT_VNODE vs. fstat()
Message-ID:  <200606131555.09143.mi%2Bmx@aldan.algebra.com>

next in thread | raw e-mail | index | archive | help
Hello!

I have a program, that waits for the input file to be written to (using 
EVFILT_VNODE, fflags = NOTE_EXTEND) to process it.

When kevent() returns upon the file's extension, the program calls fstat() to 
learn the new size of the file.

Every once in a while, the fstat still reports the old size and my program 
goes into kevent() once again.

Is this discrepancy "normal"? Thanks!

	-mi

P.S. I would love to avoid having to call fstat() at all, but -- unlike 
EVFILT_READ -- the EVFILT_VNODE/NOTE_EXTEND does not place any additional 
results into the event's data :-( Using EVFILT_READ is not straigtforward 
either, because I mmap input, instead of read-ing it...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606131555.09143.mi%2Bmx>