  The stability of data bits in magnetic recording media at ultrahigh densities
is compromised by thermal `flips' -- magnetic spin reversals -- of nano-sized
spin domains, which erase the stored information. Media that are magnetized
perpendicular to the plane of the film, such as ultrathin cobalt films or
multilayered structures, are more stable against thermal self-erasure than
conventional memory devices. In this context, magneto-optical memories seem
particularly promising for ultrahigh-density recording on portable disks, and
bit densities of $\sim$100 Gbit inch$^{-2}$ have been demonstrated using recent
advances in the bit writing and reading techniques. But the roughness and
mobility of the magnetic domain walls prevents closer packing of the magnetic
bits, and therefore presents a challenge to reaching even higher bit densities.
Here we report that the strain imposed by a linear defect in a magnetic thin
film can smooth rough domain walls over regions hundreds of micrometers in
size, and halt their motion. A scaling analysis of this process, based on the
generic physics of disorder-controlled elastic lines, points to a simple way by
which magnetic media might be prepared that can store data at densities in
excess of 1 Tbit inch$^{-2}$.
