If we hit a condition where we have allocated metadata blocks thatwere not appropriately reserved, we risk underflow ofei->i_reserved_meta_blocks. In turn, this can throwsbi->s_dirtyclusters_counter significantly out of whack and underminethe nondelalloc fallback logic in ext4_nonda_switch(). Warn if thisoccurs and set i_allocated_meta_blocks to avoid this problem.

This condition is reproduced by xfstests 270 against ext2 withdelalloc enabled: