/* RETURN VALUES: 0 - success -ENOSPC - insufficient disk resources -EIO - i/o error  */
int dbReAlloc(struct inode *ip, s64 blkno, s64 nblocks, s64 addnblocks, s64 *results)
/* RETURN VALUES: 0 - success -ENOSPC - insufficient disk resources -EIO - i/o error  */
int dbReAlloc(struct inode *ip, s64 blkno, s64 nblocks, s64 addnblocks, s64 *results)
{
	int rc;
	if ((rc = dbExtend(ip, blkno, nblocks, addnblocks)) == 0) {
		*results = blkno;
		return (0);
	} else {
		if (rc != -ENOSPC)
			return (rc);
	}
	return (dbAlloc
		(ip, blkno + nblocks - 1, addnblocks + nblocks, results));
}