Merge changes Ia9725aaf,I568a78af into main

* changes:
  checkpoint_gc: Exit gc if there is enough free segments
  checkpoint_gc: Abort gc if no progress detected