From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: [PATCH 4/5] [PATCH] xfs: simplify buffer to transaction matching
Date: Sat, 1 May 2010 08:58:39 -0400 [thread overview]
Message-ID: <20100501125839.GA26342@infradead.org> (raw)
In-Reply-To: <20100420064155.GH15130@dastard>
On Tue, Apr 20, 2010 at 04:41:55PM +1000, Dave Chinner wrote:
> Good start, but I think that it should use xfs_trans_first_item()
> and xfs_trans_next_item() rather than walking the descriptor
> table directly.
I tried implementing it, but it doesn't work. We can call the buffer
matching routines on transactions that don't have any item linked to
it, which will cause xfs_trans_first_item to panic. Compare this code
in xfs_trans_buf_item_match:
for (licp = &tp->t_items; licp != NULL; licp = licp->lic_next) {
if (xfs_lic_are_all_free(licp)) {
ASSERT(licp == &tp->t_items);
ASSERT(licp->lic_next == NULL);
return NULL;
}
...
}
to this in xfs_trans_first_item:
licp = &tp->t_items;
/*
* If it's not in the first chunk, skip to the second.
*/
if (xfs_lic_are_all_free(licp)) {
licp = licp->lic_next;
}
/*
* Return the first non-free descriptor in the chunk.
*/
ASSERT(!xfs_lic_are_all_free(licp));
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-05-01 12:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-18 0:10 [PATCH 0/5] various cleanups for 2.6.35 Christoph Hellwig
2010-04-18 0:10 ` [PATCH 1/5] xfs: access quotainfo structure directly Christoph Hellwig
2010-04-20 6:28 ` Dave Chinner
2010-04-18 0:10 ` [PATCH 2/5] xfs: remove a few macro indirections in the quota code Christoph Hellwig
2010-04-20 6:31 ` Dave Chinner
2010-04-18 0:10 ` [PATCH 3/5] xfs: removed unused XFS_QMOPT_ flags Christoph Hellwig
2010-04-20 6:33 ` Dave Chinner
2010-04-22 11:49 ` Christoph Hellwig
2010-04-18 0:10 ` [PATCH 4/5] [PATCH] xfs: simplify buffer to transaction matching Christoph Hellwig
2010-04-20 6:41 ` Dave Chinner
2010-05-01 12:58 ` Christoph Hellwig [this message]
2010-05-03 4:23 ` Dave Chinner
2010-04-27 14:16 ` Christoph Hellwig
2010-04-29 13:35 ` Alex Elder
2010-04-29 13:38 ` Christoph Hellwig
2010-04-18 0:10 ` [PATCH 5/5] xfs: remove dead XFS_LOUD_RECOVERY code Christoph Hellwig
2010-04-20 6:44 ` 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=20100501125839.GA26342@infradead.org \
--to=hch@infradead.org \
--cc=david@fromorbit.com \
--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