code: func (s *storage) Close() error {
  	s.mu.Lock()
  	defer s.mu.Unlock()
  	if s.closed {
  		return nil
  	}
  	var closeErr error
  	s.closed = true
  	if err := s.index.Close(); err != nil {
  		log.Println("diskpacked: closing index:", err)
  	}
  	for _, f := range s.fds {
  		err := f.Close()
  		openFdsVar.Add(s.root, -1)
  		if err != nil {
  			closeErr = err
  		}
  	}
  	if err := s.closePack(); err != nil && closeErr == nil {
  		closeErr = err
  	}
  	return closeErr
  }
docs: // Close index and all opened fds, with locking.