xen-org/xen-api — pull request #647 by johnelse (2012-05-25 13:28:47+00:00)
Title: CA-80758: On SR.destroy, destroy PBD and VDI records before destroying the SR record.

Otherwise the SR.destroy task will be racing with the GC, which may
sneak in and destroy the PBDs and VDIs itself.