The other thing I would recommend is a tiling substrate over the subfloor (if you're installing tile vs. a wood/pergo). Potentially, this could even save you the need to replace all of the subfloor, since it's waterproof.
You can even lay it directly over the existing flooring, so you donít have to spend time ripping out old flooring before laying tile. And, itís super thin, so it wonít raise the profile of the floor. Also, I guess this goes without saying, but it's super light.
Thereís tons more information here:
US Gypsum Company - Waterproofing membrane for ceramic tile installation
Full disclosure: I work with USG, but this seems like a good contribution to the discussion of subfloor in general.