Refactor attach loop device in pure Go Upstream-commit: f94ea7769fd3e47c5914eb2fdad62c9d2162c339 Component: engine