Since you're using -s for both calls to kpartx and calling sync after umount, I don't think sleep is required any more. I'm glad you've done empirical testing on this point.