1 May 2010 14:58
Re: [PATCH 4/5] [PATCH] xfs: simplify buffer to transaction matching
Christoph Hellwig <hch <at> infradead.org>
2010-05-01 12:58:39 GMT
2010-05-01 12:58:39 GMT
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;
}
(Continue reading)
RSS Feed