From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: fcntl method for file_operations Date: Thu, 25 Mar 2004 19:35:45 +0000 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040325193545.GC25059@parcelfarce.linux.theplanet.co.uk> References: <1080237894.2380.5.camel@stevef95.austin.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-cifs-client@cifs.bkbits.net, linux-fsdevel@vger.kernel.org Return-path: Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:21701 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S263557AbUCYTfr (ORCPT ); Thu, 25 Mar 2004 14:35:47 -0500 To: Steve French Content-Disposition: inline In-Reply-To: <1080237894.2380.5.camel@stevef95.austin.ibm.com> List-Id: linux-fsdevel.vger.kernel.org On Thu, Mar 25, 2004 at 12:04:54PM -0600, Steve French wrote: > > the NFS developers have submitted a patch which adds an fcntl() method > > to the file_operations structure. > > This patch should be helpful to the cifs vfs for a different reason > (than the original NFS conflict between O_DIRECT/O_APPEND) , it will > allow a way to get directory change notification F_NOTIFY (and file open > notification, F_SETLEASE, perhaps) sent across the network (currenty > many fcntl calls are meaningful for local filesystems only). I don't think we should have an fcntl() method. I'd rather see a typed set of method calls for whatever set of routines are actually useful. Something along the lines of ethtool_ops, say ;-) perhaps the right thing to do is just to add the following ops to file_operations: int (*fcntl_setfl)(int fd, struct file *filp, unsigned long arg); int (*fcntl_getlease)(struct file *filp); int (*fcntl_setlease)(int fd, struct file *filp, unsigned long arg); int (*fcntl_dirnotify(int fd, struct file *filp, unsigned long arg); comments? -- "Next the statesmen will invent cheap lies, putting the blame upon the nation that is attacked, and every man will be glad of those conscience-soothing falsities, and will diligently study them, and refuse to examine any refutations of them; and thus he will by and by convince himself that the war is just, and will thank God for the better sleep he enjoys after this process of grotesque self-deception." -- Mark Twain