From: Matthew Wilcox Subject: Re: [PATCH] Remove fcntl f_op Date: Sun, 15 Aug 2004 13:52:40 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20040815125240.GF12936@parcelfarce.linux.theplanet.co.uk> References: <20040812221229.GH12936@parcelfarce.linux.theplanet.co.uk> <20040814233906.0df76f12.akpm@osdl.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Matthew Wilcox , torvalds@osdl.org, linux-fsdevel@vger.kernel.org, smfrench@austin.rr.com, trond.myklebust@fys.uio.no Return-path: Received: from parcelfarce.linux.theplanet.co.uk ([195.92.249.252]:24810 "EHLO www.linux.org.uk") by vger.kernel.org with ESMTP id S266669AbUHOMwn (ORCPT ); Sun, 15 Aug 2004 08:52:43 -0400 To: Andrew Morton Content-Disposition: inline In-Reply-To: <20040814233906.0df76f12.akpm@osdl.org> List-Id: linux-fsdevel.vger.kernel.org On Sat, Aug 14, 2004 at 11:39:06PM -0700, Andrew Morton wrote: > Matthew Wilcox wrote: > > The newly introduced ->fcntl file_operation is badly thought out, > > Not really - it's very simple. Mmm. It's typeless, passes the fd number down to the filesystem, and pretty much requires a switch() in every filesystem that wants to implement it. It's also a bad API in that it allows filesystems to introduce private fcntls or do something completely different in response to a standard fcntl. > > This patch replaces it with two better > > defined operations -- check_flags and dir_notify. > > Except these _do_ need to be documented, and you didn't do that. > > Seems like a fairly pointless patch to me but whatever - it's a trivial > matter. Please send an updated patch which documents the new API. I documented them where the other file_operations are documented, in Documentation/filesystems/Locking. If you wanted Documentation/filesystems/vfs.txt to mention them, well, that needs to be updated to something from this decade first -- I can't believe anyone's actually reading that. Just from file_operations, it's missing aio_read, aio_write, aio_fsync, readv, writev, sendfile, sendpage and get_unmapped_area. It also claims check_media_change and revalidate are file_operations, when they aren't. If there's somewhere else to document them, I'd be only too happy to. -- "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