From 1597c0a6a252dec9d7de8ea9d5c6bfb76d2b5175 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Sat, 3 Jul 2010 09:41:08 +1000 Subject: [PATCH] Allow index block to be Realloc during truncate. And data blocks in realloc will have been destroyed in erase_dblock, but there could legitimately be Realloc index blocks still, so allow them to be handled. Signed-off-by: NeilBrown --- inode.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inode.c b/inode.c index 6a491c1..17acaf7 100644 --- a/inode.c +++ b/inode.c @@ -832,7 +832,11 @@ restart: LAFSI(ino)->trunc_next = next_trunc; while (ib->uninc_table.pending_cnt || ib->uninc) { - LAFS_BUG(!test_bit(B_Dirty, &ib->b.flags), &ib->b); + /* There should be no Realloc data blocks here + * but index blocks might be realloc still. + */ + LAFS_BUG(!test_bit(B_Dirty, &ib->b.flags) && + !test_bit(B_Realloc, &ib->b.flags), &ib->b); lafs_incorporate(fs, ib); } if (test_bit(B_InoIdx, &ib->b.flags) || -- 2.39.5