Ehrenfest scheme for P-V criticality in the extended phase space of black holes