Fixes for 5.1:
- Fix an accounting mistake where we included the log space when
  calculating the reserve space for metadata expansion.