code: func (s *storage) nextPack() error {
  	debug.Println("diskpacked: nextPack")
  	s.size = 0
  	if err := s.closePack(); err != nil {
  		return err
  	}
  	n := len(s.fds)
  	if err := s.openForWrite(n); err != nil {
  		return err
  	}
  	return s.openForRead(n)
  }
docs: // nextPack will close the current writer and release its lock if open,
  // open the next pack file in sequence for writing, grab its lock, set it
  // to the currently active writer, and open another copy for read-only use.
  // This function is not thread safe, s.mu should be locked by the caller.