code: func (tx *Tx) writeMeta() error {
  	// Create a temporary buffer for the meta page.
  	buf := make([]byte, tx.db.pageSize)
  	p := tx.db.pageInBuffer(buf, 0)
  	tx.meta.write(p)
  
  	// Write the meta page to file.
  	if _, err := tx.db.ops.writeAt(buf, int64(p.id)*int64(tx.db.pageSize)); err != nil {
  		return err
  	}
  	if !tx.db.NoSync || IgnoreNoSync {
  		if err := fdatasync(tx.db); err != nil {
  			return err
  		}
  	}
  
  	// Update statistics.
  	tx.stats.Write++
  
  	return nil
  }
docs: // writeMeta writes the meta to the disk.