From owner-freebsd-current@FreeBSD.ORG Fri Aug 23 20:06:54 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6FA38BB3; Fri, 23 Aug 2013 20:06:54 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id 572A320E5; Fri, 23 Aug 2013 20:06:54 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id r7NK6ru6028843; Fri, 23 Aug 2013 13:06:53 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <5217C0DC.8050107@rawbw.com> Date: Fri, 23 Aug 2013 13:06:52 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130822 Thunderbird/17.0.8 MIME-Version: 1.0 To: John Baldwin Subject: Re: How to best overload the fileops ? References: <521508F4.6030502@rawbw.com> <20130822001022.GA18115@dft-labs.eu> <52155B8D.1020807@rawbw.com> <201308231302.32800.jhb@freebsd.org> In-Reply-To: <201308231302.32800.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Mateusz Guzik , John-Mark Gurney , freebsd-current@freebsd.org, Roman Divacky , current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 20:06:54 -0000 On 08/23/2013 10:02, John Baldwin wrote: > There is something similar: see devfs_ops_f in sys/fs/devfs/devfs_vnops.c. devfs_ops_f is a local static fileops object for devfs. I don't see how is this similar to our situation. devfs doesn't overload any other file system, they are a file system on their own. > > 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. In epoll case, fileops object as a whole should be exposed and used for fp->f_ops, except fo_close which is overloaded. So would you think struct fileops* kqueue_fileops(); be ok then? Yuri