I feel like this is should be well-known, but I cannot seem to find a straight answer anywhere. Under what conditions can a (closed) manifold be obtained by identifying points on the boundary of the unit disc? Said another way, for which M is is the case that $M$ is diffeomorphic (NOT just homotopy equivalent) to $D^n/x\sim f(x)~$ for some $f: S^{n-1}\to S^{n-1}$? (I don't require f to be smooth, but it shouldn't be too pathological either. Let's say it should be piecewise smooth).
Is there a smooth or topological invariant that would obstruct this?
Any references would also be appreciated.