QoS-aware Content Management in P2P Networks