freesize calculation changed to b_avail*b_size