[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

one question



Hi Stephen,

I'm one of developers of SnapFS, which based on Ext3. I got Assertion failure
from SnapFS, at ext3_new_block() in fs/ext3/balloc.c:

J_ASSERT (!test_and_set_bit(BH_Alloced, &bh->b_state))

If J_ASSERT is only use as debug, why it will modify data?

I found the 'BH_Alloced' flag only occures at two place: one is balloc.c as
above, the other is at journal_forget() in fs/jfs/transaction.c:

J_ASSERT (!test_and_set_bit(BH_Freed, &bh->b_state));
clear_bit(BH_Alloced, &bh->b_state);

here after assert, we clear the bit right away. So the other question is: If one
block was new alloced, BH_Alloced was set in it's buffer_header and there is no
way to clear it until the buffer was destroyed. Is that right? In my case,
dese it means that Ext3 allocate a block which is already allocated?


Thanks a lot.

-- 
Eric






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]