This is a common sight, particularly in older buildings. Paint almost always peels because there is moisture coming from the opposite side of the paint surface which causes it to lose its adhesion and then blister and peel. Before drywall patching and repainting can be done, the moisture issue will need to be addressed. In the instance pictured, there was a small roof leak that, over time, was causing this paint to peel. After the roof was repaired, this ceiling was enclosed with plastic to keep the paint chips and dust in a contained area. It was then cleaned up and 2 coats of 20 minute easy sand joint compound was applied. That was left to dry and a final coat of USG Dust Control Joint Compound was applied as a finish coat. It was then sanded and primed with Benjamin Moore Ultra Spec Primer. The final paint coats were Benjamin Moore Ultra Spec Flat White.