lkml.org 
[lkml]   [2004]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [2.4] page->buffers vanished in journal_try_to_free_buffers()
Marcelo Tosatti <marcelo.tosatti@cyclades.com> wrote:
>
> Maybe adding this (untested) to v2.4 mainline helps? Comments?

It would be helpful.

> --- transaction.c.orig 2004-06-19 15:21:32.861148560 -0300
> +++ transaction.c 2004-06-19 15:23:18.214132472 -0300
> @@ -1694,6 +1694,24 @@
> return 0;
> }
>
> +void debug_page(struct page *p)
> +{
> + struct buffer_head *bh;
> +
> + bh = p->buffers;
> +
> + printk(KERN_ERR "%s: page index:%u count:%d flags:%x\n", __FUNCTION__,
> + ,p->index , atomic_read(&p->count), p->flags);

^

> +
> + do {
> + printk(KERN_ERR "%s: bh b_next:%p blocknr:%u b_list:%u state:%x\n",
> + __FUNCTION__, bh->b_next, bh->b_blocknr, bh->b_list,
> + bh->b_state);
> + bh = bh->b_this_page;
> + } while (bh);
> +}
> +

you'll want to make this a while (!bh) {} loop, to handle the
page->buffers==NULL case.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.091 / U:1.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site