code: func (m *metadataTracker) toDB(db *instance, folder []byte) error {
  	key := db.keyer.GenerateFolderMetaKey(nil, folder)
  
  	m.mut.RLock()
  	defer m.mut.RUnlock()
  
  	if !m.dirty {
  		return nil
  	}
  
  	bs, err := m.Marshal()
  	if err != nil {
  		return err
  	}
  	err = db.Put(key, bs, nil)
  	if err == nil {
  		m.dirty = false
  	}
  
  	return err
  }
docs: // toDB saves the marshalled metadataTracker to the given db, under the key
  // corresponding to the given folder