Add metadata function to layer store Upstream-commit: bb2c92355cb6f4e6935a945c22989fd3afe8e3cb Component: engine