code: func (c *ContainerServer) GetContainerRootFsSize(containerID string) (int64, error) {
  	container, err := c.store.Container(containerID)
  	if err != nil {
  		return 0, err
  	}
  
  	// Ignore the size of the top layer.   The top layer is a mutable RW layer
  	// and is not considered a part of the rootfs
  	rwLayer, err := c.store.Layer(container.LayerID)
  	if err != nil {
  		return 0, err
  	}
  	layer, err := c.store.Layer(rwLayer.Parent)
  	if err != nil {
  		return 0, err
  	}
  
  	size := int64(0)
  	for layer.Parent != "" {
  		layerSize, err := c.store.DiffSize(layer.Parent, layer.ID)
  		if err != nil {
  			return 0, errors.Wrapf(err, "getting diffsize of layer %q and its parent %q", layer.ID, layer.Parent)
  		}
  		size += layerSize
  		layer, err = c.store.Layer(layer.Parent)
  		if err != nil {
  			return 0, err
  		}
  	}
  	// Get the size of the last layer.  Has to be outside of the loop
  	// because the parent of the last layer is "", andlstore.Get("")
  	// will return an error
  	layerSize, err := c.store.DiffSize(layer.Parent, layer.ID)
  	return size + layerSize, err
  }
docs: // GetContainerRootFsSize gets the size of the container's root filesystem
  // A container FS is split into two parts.  The first is the top layer, a
  // mutable layer, and the rest is the RootFS: the set of immutable layers
  // that make up the image on which the container is based