struct fs *fs = data;
int oldphase = !fs->phase; /*FIXME could there be a race getting this?*/
struct block *b;
+ int loops = 0;
#ifdef DUMP
dfs = fs;
#endif
if (test_bit(B_Pinned, &LAFSI(fs->ss[0].root)->iblock->b.flags) &&
!!test_bit(B_Phase1, &LAFSI(fs->ss[0].root)->iblock->b.flags)
!= fs->phase) {
+
+ if (loops == 20) {
+ printk("Cannot escape PHASE=%d\n", oldphase);
+ lafs_print_tree(&LAFSI(fs->ss[0].root)->dblock->b, 0);
+ lafs_print_tree(&LAFSI(fs->ss[0].root)->iblock->b, 0);
+ lafs_trace = 1;
+ }
+
lafs_cluster_flush(fs, 0);
lafs_cluster_wait_all(fs);
lafs_clusters_done(fs);
+ if (loops == 20) {
+ printk("After cluster_flush...\n");
+ lafs_print_tree(&LAFSI(fs->ss[0].root)->dblock->b, 0);
+ lafs_print_tree(&LAFSI(fs->ss[0].root)->iblock->b, 0);
+ BUG();
+ }
+ loops++;
goto again;
}
lafs_clusters_done(fs);