code: func (cs *cachedSource) getSize(ctx context.Context) (int64, error) {
  	if cs.sourceMeta.Size < 0 {
  		ss, err := directory.Size(ctx, cs.dir)
  		if err != nil {
  			return 0, err
  		}
  		if err := cs.resetSize(ss); err != nil {
  			return 0, err
  		}
  		return ss, nil
  	}
  	return cs.sourceMeta.Size, nil
  }
docs: // hold storage lock before calling