Date: Fri, 23 Aug 2013 13:02:32 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-current@freebsd.org Cc: Yuri <yuri@rawbw.com>, John-Mark Gurney <jmg@funkthat.com>, Mateusz Guzik <mjguzik@gmail.com>, Roman Divacky <rdivacky@freebsd.org>, current@freebsd.org Subject: Re: How to best overload the fileops ? Message-ID: <201308231302.32800.jhb@freebsd.org> In-Reply-To: <52155B8D.1020807@rawbw.com> References: <521508F4.6030502@rawbw.com> <20130822001022.GA18115@dft-labs.eu> <52155B8D.1020807@rawbw.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, August 21, 2013 8:30:05 pm Yuri wrote: > On 08/21/2013 17:10, Mateusz Guzik wrote: > > Short answer is provide epollops with your own fo_close and the rest as > > it is currently in kqueueops. All function are static, but this is not a > > real problem since you have to modify kern_event.c anyway. > > This is exactly what this code I am asking about is doing. > kqueueops functions are all static. This modification allows to export > fileops to child modules. > Since there is nothing similar in the kernel code, I am asking does this > way look ugly or not. There is something similar: see devfs_ops_f in sys/fs/devfs/devfs_vnops.c. I don't think we need a generic framework for this, just expose the relevant fo_ methods for kqueue ops and use them in your epoll_ops. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308231302.32800.jhb>