All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: Benny Halevy <bhalevy@tonian.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
	Benny Halevy <benny@tonian.com>, <linux-nfs@vger.kernel.org>
Subject: Re: [RFC] nfsd4: DEBUG: XDR_ERROR()
Date: Fri, 28 Oct 2011 22:25:33 -0700	[thread overview]
Message-ID: <4EAB8E4D.5050001@panasas.com> (raw)
In-Reply-To: <4EAA9B73.2030306@tonian.com>

On 10/28/2011 05:09 AM, Benny Halevy wrote:
> 
> I agree with all of the above but its a project larger than I can
> chew right now.  This patch just improves the existing mechanism, for
> development use, to help catch parser bugs rather than actual xdr errors.
> 
<>

>>>  
>>> +#define XDR_ERROR()	do {			\
>>> +	dprintk("NFSD: xdr error (%s:%d)\n",	\
>>> +			__FILE__, __LINE__);	\
>>> +	goto xdr_error;				\
>>> +} while (0)
>>> +

What about a compromise:

+#define GOTO_XDR_ERROR()	do {			\
+	dprintk("NFSD: xdr error (%s:%d)\n",	\
+			__FILE__, __LINE__);	\
+	goto xdr_error;				\
+} while (0)

or even:

+#define XDR_ERROR_GOTO(xdr_error)	do {	\
+	dprintk("NFSD: xdr error (%s:%d)\n",	\
+			__FILE__, __LINE__);	\
+	goto xdr_error;				\
+} while (0)

and XDR_ERROR_GOTO(xdr_error) every where.

So the patch below stays exactly the same size
but the goto is not masked out, and no one can
complain about things happening hidden underground.

Just My $0.017
Boaz

      reply	other threads:[~2011-10-29  5:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-27 18:49 [RFC] nfsd4: DEBUG: XDR_ERROR() Benny Halevy
2011-10-28 11:34 ` J. Bruce Fields
2011-10-28 12:09   ` Benny Halevy
2011-10-29  5:25     ` Boaz Harrosh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EAB8E4D.5050001@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=benny@tonian.com \
    --cc=bfields@fieldses.org \
    --cc=bhalevy@tonian.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.