code: func (m *meta) write(p *page) {
  	if m.root.root >= m.pgid {
  		panic(fmt.Sprintf("root bucket pgid (%d) above high water mark (%d)", m.root.root, m.pgid))
  	} else if m.freelist >= m.pgid {
  		panic(fmt.Sprintf("freelist pgid (%d) above high water mark (%d)", m.freelist, m.pgid))
  	}
  
  	// Page id is either going to be 0 or 1 which we can determine by the transaction ID.
  	p.id = pgid(m.txid % 2)
  	p.flags |= metaPageFlag
  
  	// Calculate the checksum.
  	m.checksum = m.sum64()
  
  	m.copy(p.meta())
  }
docs: // write writes the meta onto a page.