All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Eric Sandeen <sandeen@sandeen.net>, xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH 2/2] xfs: Nuke XFS_ERROR macro
Date: Thu, 17 Apr 2014 08:28:27 +1000	[thread overview]
Message-ID: <20140416222827.GP15995@dastard> (raw)
In-Reply-To: <20140416175117.GA23643@infradead.org>

On Wed, Apr 16, 2014 at 10:51:17AM -0700, Christoph Hellwig wrote:
> On Wed, Apr 16, 2014 at 12:48:50PM -0500, Eric Sandeen wrote:
> > XFS_ERROR was designed long ago to trap return values,
> > but it's not runtime configurable, it's not consistently used,
> > and we can do the same thing today with systemtap, using
> > something like:
> > 
> > probe module("xfs").function("xfs_*").return { if (@defined($return) && $return == VALUE) { ... } }
> 
> Gives me a version just using ftrace, or at least a kprobes based module
> that we can merged in the kernel tree and this would be fine for me.
> 
> Requiring a massive blob of questionable out of tree module code and a
> compiler is an absolute no-go.
> 
> NAK for now.

I think regardless of the systemtap/ftrace replacement, nobody uses
this at the moment, and it's not been used for a long time. It's a
compile time configurable, debug only error trap that is far
less useful than adding printk() or tracepoints at the appropriate
points.

If you've got to recompile the kernel to use it, then you may as
well add meaningful debug rather than hope an error trap that panics
the kernel tells you what you need.  i.e. the error trap code as it
stands is only useful for those running kernel debuggers, and very
few developers actually do that these days.

And, FWIW, it only allows detection of then initial error instance -
too bad if you want the second or third occurrence of the error.

IOWs, I can't see how this is at all useful anymore....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2014-04-16 22:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 17:40 [PATCH 0/2] xfs: clean up return handling Eric Sandeen
2014-04-16 17:44 ` [PATCH 1/2] xfs: return is not a function Eric Sandeen
2014-04-21  6:58   ` Christoph Hellwig
2014-04-16 17:48 ` [PATCH 2/2] xfs: Nuke XFS_ERROR macro Eric Sandeen
2014-04-16 17:51   ` Christoph Hellwig
2014-04-16 17:55     ` Eric Sandeen
2014-04-16 19:11       ` Eric Sandeen
2014-04-16 22:08         ` Dave Chinner
2014-04-16 23:44           ` Steven Rostedt
2014-04-17  0:39             ` Dave Chinner
2014-04-17  0:49               ` Dave Chinner
2014-04-21  6:57               ` Christoph Hellwig
2014-04-21 23:43                 ` Dave Chinner
2014-04-16 22:28     ` Dave Chinner [this message]
2014-04-22 21:38   ` Dave Chinner

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=20140416222827.GP15995@dastard \
    --to=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.com \
    /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.