From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jamie Lokier Subject: Re: [PATCH] fs/locks.c Partially fixes leases issue Date: Thu, 4 Dec 2003 05:15:53 +0000 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20031204051553.GG1216@mail.shareable.org> References: <200312031748.37958.theman@josephdwagner.info> <20031204025516.GB1216@mail.shareable.org> <200312032149.21849.theman@josephdwagner.info> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: matthew@wil.cx, willy@debian.org, linux-fsdevel@vger.kernel.org Return-path: Received: from mail.jlokier.co.uk ([81.29.64.88]:27266 "EHLO mail.shareable.org") by vger.kernel.org with ESMTP id S263130AbTLDFP7 (ORCPT ); Thu, 4 Dec 2003 00:15:59 -0500 To: "Joseph D. Wagner" Content-Disposition: inline In-Reply-To: <200312032149.21849.theman@josephdwagner.info> List-Id: linux-fsdevel.vger.kernel.org Joseph D. Wagner wrote: > On Thursday, December 4, 2003 8:55 am, Jamie Lokier wrote: > > These two are so similar they can be merged; just don't test "arg". > > That's what I through at first, but since this is only a partial patch, and > a future patch would need to run additional checks independent of any write > leases, I figured that it would be easier for the next guy if it had its > own section so the next guy would know where the patch goes and have an > easier time figuring it out. That's what a comment saying "FIXME: R_RDLCK is not implemented properly; it's currently treated the same as F_WRLCK" prior to the merged test would be good for. Anyone able to implement F_RDLCK properly is not going to have a hard time knowing where to put the code :) Creating an empty place just in case someone may fill it in future is the same as "this page is under construction" on a web site :) :) > > I don't agree with this patch as it is because, as Sean Neakums > > pointed out, there is actually a field `inode->i_writecount' which is > > remarkeably appropriate. [...] > > As I said, it's just a partial fix until someone does all that stuff you > describe. I really don't know enough to do all that, at least not yet. If you have the time, try my suggestion. It is not complicated and will fix the feature properly - and you'll learn a lot! > Are you saying my patch won't get in? That's not my decision to make. It probably should go in (with the simpler test and comment), as it's a genuine bug fix. I'm saying that F_RDLCK is presently useless because it's broken, so no applications dare use it as intended, and your fix doesn't really change that - it still isn't useful. I'm egging you on to do it properly :) -- Jamie