code: func (i *ImageService) LayerDiskUsage(ctx context.Context) (int64, error) {
  	var allLayersSize int64
  	layerRefs := i.getLayerRefs()
  	for _, ls := range i.layerStores {
  		allLayers := ls.Map()
  		for _, l := range allLayers {
  			select {
  			case <-ctx.Done():
  				return allLayersSize, ctx.Err()
  			default:
  				size, err := l.DiffSize()
  				if err == nil {
  					if _, ok := layerRefs[l.ChainID()]; ok {
  						allLayersSize += size
  					}
  				} else {
  					logrus.Warnf("failed to get diff size for layer %v", l.ChainID())
  				}
  			}
  		}
  	}
  	return allLayersSize, nil
  }
docs: // LayerDiskUsage returns the number of bytes used by layer stores
  // called from disk_usage.go