mirror of
https://github.com/opencontainers/runc.git
synced 2025-10-13 03:03:56 +08:00
libct/rootfs: introduce and use mountEntry
Adding fd field to mountConfig was not a good thing since mountConfig contains data that is not specific to a particular mount, while fd is a mount entry attribute. Introduce mountEntry structure, which embeds configs.Mount and adds srcFd to replace the removed mountConfig.fd. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -1277,9 +1277,8 @@ func (c *Container) makeCriuRestoreMountpoints(m *configs.Mount) error {
|
||||
case "bind":
|
||||
// The prepareBindMount() function checks if source
|
||||
// exists. So it cannot be used for other filesystem types.
|
||||
// TODO: pass something else than nil? Not sure if criu is
|
||||
// impacted by issue #2484
|
||||
if err := prepareBindMount(m, c.config.Rootfs, nil); err != nil {
|
||||
// TODO: pass srcFD? Not sure if criu is impacted by issue #2484.
|
||||
if err := prepareBindMount(mountEntry{Mount: m}, c.config.Rootfs); err != nil {
|
||||
return err
|
||||
}
|
||||
default:
|
||||
|
Reference in New Issue
Block a user