mirror of https://github.com/docker/docs.git
devmapper: udev sync in `docker info`
now: ``` [...] Storage Driver: devicemapper Pool Name: docker-253:2-5767172-pool [...] Udev Sync Supported: true [...] ``` Signed-off-by: Vincent Batts <vbatts@redhat.com>
This commit is contained in:
parent
022e1232f8
commit
d2593546f9
|
@ -105,14 +105,15 @@ type DiskUsage struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type Status struct {
|
type Status struct {
|
||||||
PoolName string
|
PoolName string
|
||||||
DataFile string // actual block device for data
|
DataFile string // actual block device for data
|
||||||
DataLoopback string // loopback file, if used
|
DataLoopback string // loopback file, if used
|
||||||
MetadataFile string // actual block device for metadata
|
MetadataFile string // actual block device for metadata
|
||||||
MetadataLoopback string // loopback file, if used
|
MetadataLoopback string // loopback file, if used
|
||||||
Data DiskUsage
|
Data DiskUsage
|
||||||
Metadata DiskUsage
|
Metadata DiskUsage
|
||||||
SectorSize uint64
|
SectorSize uint64
|
||||||
|
UdevSyncSupported bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type DevStatus struct {
|
type DevStatus struct {
|
||||||
|
@ -1578,6 +1579,7 @@ func (devices *DeviceSet) Status() *Status {
|
||||||
status.DataLoopback = devices.dataLoopFile
|
status.DataLoopback = devices.dataLoopFile
|
||||||
status.MetadataFile = devices.MetadataDevicePath()
|
status.MetadataFile = devices.MetadataDevicePath()
|
||||||
status.MetadataLoopback = devices.metadataLoopFile
|
status.MetadataLoopback = devices.metadataLoopFile
|
||||||
|
status.UdevSyncSupported = devicemapper.UdevSyncSupported()
|
||||||
|
|
||||||
totalSizeInSectors, _, dataUsed, dataTotal, metadataUsed, metadataTotal, err := devices.poolStatus()
|
totalSizeInSectors, _, dataUsed, dataTotal, metadataUsed, metadataTotal, err := devices.poolStatus()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|
|
@ -74,6 +74,7 @@ func (d *Driver) Status() [][2]string {
|
||||||
{"Data Space Total", fmt.Sprintf("%s", units.HumanSize(float64(s.Data.Total)))},
|
{"Data Space Total", fmt.Sprintf("%s", units.HumanSize(float64(s.Data.Total)))},
|
||||||
{"Metadata Space Used", fmt.Sprintf("%s", units.HumanSize(float64(s.Metadata.Used)))},
|
{"Metadata Space Used", fmt.Sprintf("%s", units.HumanSize(float64(s.Metadata.Used)))},
|
||||||
{"Metadata Space Total", fmt.Sprintf("%s", units.HumanSize(float64(s.Metadata.Total)))},
|
{"Metadata Space Total", fmt.Sprintf("%s", units.HumanSize(float64(s.Metadata.Total)))},
|
||||||
|
{"Udev Sync Supported", fmt.Sprintf("%v", s.UdevSyncSupported)},
|
||||||
}
|
}
|
||||||
if len(s.DataLoopback) > 0 {
|
if len(s.DataLoopback) > 0 {
|
||||||
status = append(status, [2]string{"Data loop file", s.DataLoopback})
|
status = append(status, [2]string{"Data loop file", s.DataLoopback})
|
||||||
|
|
Loading…
Reference in New Issue