code: func (m *Manager) LockDB() error {
  	m.dbMtx.RLock()
  	if m.db == nil {
  		m.dbMtx.RUnlock()
  		return ErrDBClosed
  	}
  	return nil
  }
docs: // LockDB acquires a read lock on the DB mutex so that it cannot be closed
  // until the caller has finished performing actions which will lead to changes
  // being persisted to the DB.
  //
  // For example, creating a volume first delegates to the provider to create the
  // volume and then persists to the DB, but if the DB is closed in that time
  // then the volume state will be lost.
  //
  // ErrDBClosed is returned if the DB is already closed so API requests will
  // fail before any actions are performed.