Correlation between irreversibility magnetic fields and the longest CuO layer spacing in high-Tc superconductors