/* Work out how many blocks we need to proceed with the next chunk of a truncate transaction.  */
static unsigned long blocks_for_truncate(struct inode *inode)
/* Work out how many blocks we need to proceed with the next chunk of a truncate transaction.  */
static unsigned long blocks_for_truncate(struct inode *inode)
{
	unsigned long needed;
	needed = inode->i_blocks >> (inode->i_sb->s_blocksize_bits - 9);
	if (needed < 2)
		needed = 2;
	if (needed > EXT3_MAX_TRANS_DATA)
		needed = EXT3_MAX_TRANS_DATA;
	return EXT3_DATA_TRANS_BLOCKS(inode->i_sb) + needed;
}