code: func (bw *blobWriter) getStoredHashStates(ctx context.Context) ([]hashStateEntry, error) {
  	uploadHashStatePathPrefix, err := pathFor(uploadHashStatePathSpec{
  		name: bw.blobStore.repository.Named().String(),
  		id:   bw.id,
  		alg:  bw.digester.Digest().Algorithm(),
  		list: true,
  	})
  
  	if err != nil {
  		return nil, err
  	}
  
  	paths, err := bw.blobStore.driver.List(ctx, uploadHashStatePathPrefix)
  	if err != nil {
  		if _, ok := err.(storagedriver.PathNotFoundError); !ok {
  			return nil, err
  		}
  		// Treat PathNotFoundError as no entries.
  		paths = nil
  	}
  
  	hashStateEntries := make([]hashStateEntry, 0, len(paths))
  
  	for _, p := range paths {
  		pathSuffix := path.Base(p)
  		// The suffix should be the offset.
  		offset, err := strconv.ParseInt(pathSuffix, 0, 64)
  		if err != nil {
  			logrus.Errorf("unable to parse offset from upload state path %q: %s", p, err)
  		}
  
  		hashStateEntries = append(hashStateEntries, hashStateEntry{offset: offset, path: p})
  	}
  
  	return hashStateEntries, nil
  }
docs: // getStoredHashStates returns a slice of hashStateEntries for this upload.