This paper studies partial differential equation (PDE) models for the dynamics of peer-to-peer (P2P) file-sharing networks. Using as independent variables time and a fluid measure of residual work, our PDE model tracks the population profile of the P2P swarm, allowing for general file-size distributions. Focusing on the processor-sharing discipline, which we validate as an accurate model of homogeneous P2P networks, we provide a series of analytical results invoking tools of feedback control theory. We establish local stability of the equilibrium, analyze variability around this equilibrium, and compute transient response times, all of which are shown to match tightly with simulation results for a full packet-level implementation of the BitTorrent protocol. We also extend our model to heterogeneous bandwidth scenarios, and to the case of peers contributing to the system after they finish download.