I'll explain "quasi static" = "reversible" if we push the meaning of "quasi static" far enough. I think it is what physicists meant when they first invented the word "quasi static". I believe that the original definition of quasi static (slow enough) being extremely informal and since all the cases (like friction, viscosity...) were not fully accounted for, the word "quasi static" has fallen out of flavor as being fundamentally useful to thermodynamics. Hence the confusion in most text books: it is not very usefull to give a precise definition for "quasi static" that would not be in fact the same as "reversible".
In modern statistical mechanics (based on classical mechanics), a quasi static process can be defined as:
" The process can be modeled by a progressive change in the system's Hamiltonian that is:
- perfectly known and controlled
- slow and smooth enough for the effect being the same as if the system had enough time to go through its entire orbit (in the phase space) of its energy level during each infinitesimal change in the Hamiltonian. In other words the system can be considered at equilibrium at each infinitesimal step."
This process is the one being considered when you write $dU = -PdV$ where $V$ is any variable the Hamiltonian depends on and $P$ is the generalized force.
Usual examples : moving the piston of an insulated gas (much slower than the speed of sound), or moving a piston of a gas in thermal contact with another gas (quite slowly so that thermal equilibrium can happen at each step). In the later example, the system under consideration is the union of the two gases. Usual counter-example : the famous irreversible Joule (free) expansion
This definition excludes heat, since in the case of heat, the Hamiltonian varies randomly and abruptly during each molecular collision. It excludes friction just the same. If the motion happens to be very slow but the pores are very small, then the Hamiltonian varies abruptly just the same. It is similar to heat. It also excludes this interesting case mentioned by Huang : “a gas that freely expands into successive infinitesimal volume elements”. Indeed, if the potential wall is smooth, this is not a free expansion but a usual isentropic expansion.