This will help with debugging as one could just do "docker info" and figure
out of deferred removal is enabled or not.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
| ... | ... |
@@ -115,15 +115,16 @@ type DiskUsage struct {
|
| 115 | 115 |
} |
| 116 | 116 |
|
| 117 | 117 |
type Status struct {
|
| 118 |
- PoolName string |
|
| 119 |
- DataFile string // actual block device for data |
|
| 120 |
- DataLoopback string // loopback file, if used |
|
| 121 |
- MetadataFile string // actual block device for metadata |
|
| 122 |
- MetadataLoopback string // loopback file, if used |
|
| 123 |
- Data DiskUsage |
|
| 124 |
- Metadata DiskUsage |
|
| 125 |
- SectorSize uint64 |
|
| 126 |
- UdevSyncSupported bool |
|
| 118 |
+ PoolName string |
|
| 119 |
+ DataFile string // actual block device for data |
|
| 120 |
+ DataLoopback string // loopback file, if used |
|
| 121 |
+ MetadataFile string // actual block device for metadata |
|
| 122 |
+ MetadataLoopback string // loopback file, if used |
|
| 123 |
+ Data DiskUsage |
|
| 124 |
+ Metadata DiskUsage |
|
| 125 |
+ SectorSize uint64 |
|
| 126 |
+ UdevSyncSupported bool |
|
| 127 |
+ DeferredRemoveEnabled bool |
|
| 127 | 128 |
} |
| 128 | 129 |
|
| 129 | 130 |
type DevStatus struct {
|
| ... | ... |
@@ -1623,6 +1624,7 @@ func (devices *DeviceSet) Status() *Status {
|
| 1623 | 1623 |
status.MetadataFile = devices.MetadataDevicePath() |
| 1624 | 1624 |
status.MetadataLoopback = devices.metadataLoopFile |
| 1625 | 1625 |
status.UdevSyncSupported = devicemapper.UdevSyncSupported() |
| 1626 |
+ status.DeferredRemoveEnabled = devices.deferredRemove |
|
| 1626 | 1627 |
|
| 1627 | 1628 |
totalSizeInSectors, _, dataUsed, dataTotal, metadataUsed, metadataTotal, err := devices.poolStatus() |
| 1628 | 1629 |
if err == nil {
|
| ... | ... |
@@ -77,6 +77,7 @@ func (d *Driver) Status() [][2]string {
|
| 77 | 77 |
{"Metadata Space Total", fmt.Sprintf("%s", units.HumanSize(float64(s.Metadata.Total)))},
|
| 78 | 78 |
{"Metadata Space Available", fmt.Sprintf("%s", units.HumanSize(float64(s.Metadata.Available)))},
|
| 79 | 79 |
{"Udev Sync Supported", fmt.Sprintf("%v", s.UdevSyncSupported)},
|
| 80 |
+ {"Deferred Removal Enabled", fmt.Sprintf("%v", s.DeferredRemoveEnabled)},
|
|
| 80 | 81 |
} |
| 81 | 82 |
if len(s.DataLoopback) > 0 {
|
| 82 | 83 |
status = append(status, [2]string{"Data loop file", s.DataLoopback})
|