  We provide a new obstruction for a rational homology 3-sphere to arise by
Dehn surgery on a given knot in the 3-sphere. The obstruction takes the form of
an inequality involving the genus of the knot, the surgery coefficient, and a
count of L-structures on the 3-manifold, that is spin-c structures with the
simplest possible associated Heegaard Floer group. Applications include an
obstruction for two framed knots to yield the same 3-manifold, an obstruction
that is particularly effective when working with families of framed knots. We
introduce the rational and integral Dehn surgery genera for a rational homology
3-sphere, and use our inequality to provide bounds, and in some cases exact
values, for these genera. We also demonstrate that the difference between the
integral and rational Dehn surgery genera can be arbitrarily large.
