add diff_flush_patch_id() to calculate the patch id