mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-19 07:14:22 +01:00
blk-dev: hotplug readonly if applicable
If a block based volume is read only, let's make sure we add as a RO device Fixes: #1246 Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
This commit is contained in:
@@ -669,6 +669,7 @@ func (c *Container) createBlockDevices() error {
|
||||
DevType: "b",
|
||||
Major: int64(unix.Major(stat.Rdev)),
|
||||
Minor: int64(unix.Minor(stat.Rdev)),
|
||||
ReadOnly: m.ReadOnly,
|
||||
}
|
||||
// check whether source can be used as a pmem device
|
||||
} else if di, err = config.PmemDeviceInfo(m.Source, m.Destination); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user