From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Becker Subject: Re: [patch] Fix: 'return -ENOMEM' instead of 'return ENOMEM' Date: Fri, 13 Nov 2009 03:56:10 -0800 Message-ID: <20091113115610.GB28530@mail.oracle.com> References: <4AFB2C0B.50605@gmail.com> <20091111134730.a0da9e38.akpm@linux-foundation.org> <20091112081043.GA25345@elte.hu> <20091112191758.GA22985@mail.oracle.com> <20091112202728.GC22985@mail.oracle.com> <20091113075306.GB2775@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20091113075306.GB2775@elte.hu> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com To: Ingo Molnar Cc: Randy Dunlap , "Stephen M. Cameron" , Mike Christie , David Airlie , James Bottomley , Jens Axboe , Evgeniy Polyakov , iss_storagedev@hp.com, Eric Dumazet , Andy Whitcroft , Dave Airlie , Hannes Eder , dri-devel@lists.sourceforge.net, Alexey Dobriyan , Mike Miller , Mark Fasheh , Karsten Keil , rostedt@goodmis.org, Karen Xie , "James E.J. Bottomley" , Hannes Reinecke , Andreas List-Id: linux-scsi@vger.kernel.org On Fri, Nov 13, 2009 at 08:53:06AM +0100, Ingo Molnar wrote: > > Sorry, I read the code wrong. This function is just a handler. The > > caller, dlm_send_begin_reco_message(), expects the positive EAGAIN as > > a non-error case. > > Well, at minimum the error code usage is very confused. The > dlm_begin_reco_handler gets registered via o2net_register_handler(). > Here's where dlm_begin_reco_handler gets registered, followed by > dlm_finalize_reco_handler right afterwards: > A negative error code right there. The other event handlers are seem to > be similar - dlm_begin_reco_handler() is the odd one out. The usage of the handlers - 'status' is the return code of the handler - is pretty straightforward. Once you're in the mindset of the o2net code, of course. This is old stuff, from the earliest days of ocfs2 development, so we haven't had to spelunk in here for a while ;-) Sunil and I both thought while looking at this code that we could probably return -EAGAIN just as easily, though. We'll probably clean it that way at some point. Joel -- There are morethings in heaven and earth, Horatio, Than are dreamt of in your philosophy. Joel Becker Principal Software Developer Oracle E-mail: joel.becker@oracle.com Phone: (650) 506-8127