Kqueue write event position?

Vlad Galu dudu at dudu.ro
Wed Nov 22 21:32:18 UTC 2006


On 11/22/06, Ivan Voras <ivoras at fer.hr> wrote:
> >From the kqueue(2) manual:
>
> """
>      EVFILT_VNODE   Takes a file descriptor as the identifier and the events
>                     to watch for in fflags, and returns when one or more of
>                     the requested events occurs on the descriptor.  The
> events
>                     to monitor are:...
> """
>
> I'm interested in NOTE_WRITE, but is there a way to find out where has
> the write been performed (position and length)? If not, how difficult
> would it be to expand the API so this information is included?
>

   It seems to me you would have to propagate that info along the
VOP_WRITE_POST->VFS_KNOTE_LOCKED->VN_KNOTE->knote() chain. Since
knote() is generic and is used for all types of notifications, you can
probably roll down your own replacement and call it from VN_KNOTE. Of
course, there probably is a better way :)


> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>


-- 
If it's there, and you can see it, it's real.
If it's not there, and you can see it, it's virtual.
If it's there, and you can't see it, it's transparent.
If it's not there, and you can't see it, you erased it.


More information about the freebsd-hackers mailing list