public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Brian Foster <bfoster@redhat.com>, xfs@oss.sgi.com
Subject: Re: [PATCH 2/3] xfs: better xfs_trans_alloc interface
Date: Tue, 23 Feb 2016 08:14:10 +1100	[thread overview]
Message-ID: <20160222211410.GH25832@dastard> (raw)
In-Reply-To: <20160222133943.GA26966@lst.de>

On Mon, Feb 22, 2016 at 02:39:43PM +0100, Christoph Hellwig wrote:
> On Thu, Feb 18, 2016 at 09:04:36AM +1100, Dave Chinner wrote:
> > I've considered doing this removal myself in the past - doing
> > somethign like embedding the return address of the
> > xfs-trans_reserve() call in the ticket that is allocated tells us
> > exactly where the call was made. This can be printed with %pS, and
> > that gives us the function (and location in the function) the
> > reservation was made. Hence we solve the problem of not
> > knowing which call path triggered the problem.
> > 
> > Hence I don't think we actually need to the type in every function
> > call.
> 
> This brings up a question:  do we care about the type of the transaction,
> or the caller?  The existing types were rather confused about that.
> If it's the transaction type we could simply add a name field to
> struct xfs_trans_res, if we care about caller the trick from Dave
> should do the job.

I think the caller is more important, because that gives us the
entire context of the transaction. We reuse the same transaction
type in several different places, so it can be ambiguous if we only
have a transaction type in an error message at commit and nothing
else...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

  reply	other threads:[~2016-02-22 21:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-17  8:52 [PATCH 1/3] xfs: remove xfs_trans_get_block_res Christoph Hellwig
2016-02-17  8:52 ` [PATCH 2/3] xfs: better xfs_trans_alloc interface Christoph Hellwig
2016-02-17 13:40   ` Brian Foster
2016-02-17 22:04     ` Dave Chinner
2016-02-18 12:10       ` Brian Foster
2016-02-22 13:39       ` Christoph Hellwig
2016-02-22 21:14         ` Dave Chinner [this message]
2016-02-17  8:52 ` [PATCH 3/3] xfs: remove transaction types Christoph Hellwig
2016-02-17  8:57 ` [PATCH 1/3] xfs: remove xfs_trans_get_block_res Christoph Hellwig

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=20160222211410.GH25832@dastard \
    --to=david@fromorbit.com \
    --cc=bfoster@redhat.com \
    --cc=hch@lst.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox