mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #26483 from miaoyq/optimized-debug-print-in-devicemapper
Optimized debug print in the 'deviceset.go'
This commit is contained in:
commit
ab2c9b373d
1 changed files with 11 additions and 11 deletions
|
@ -1894,8 +1894,8 @@ func (devices *DeviceSet) initDevmapper(doInit bool) error {
|
||||||
|
|
||||||
// AddDevice adds a device and registers in the hash.
|
// AddDevice adds a device and registers in the hash.
|
||||||
func (devices *DeviceSet) AddDevice(hash, baseHash string, storageOpt map[string]string) error {
|
func (devices *DeviceSet) AddDevice(hash, baseHash string, storageOpt map[string]string) error {
|
||||||
logrus.Debugf("devmapper: AddDevice(hash=%s basehash=%s)", hash, baseHash)
|
logrus.Debugf("devmapper: AddDevice START(hash=%s basehash=%s)", hash, baseHash)
|
||||||
defer logrus.Debugf("devmapper: AddDevice(hash=%s basehash=%s) END", hash, baseHash)
|
defer logrus.Debugf("devmapper: AddDevice END(hash=%s basehash=%s)", hash, baseHash)
|
||||||
|
|
||||||
// If a deleted device exists, return error.
|
// If a deleted device exists, return error.
|
||||||
baseInfo, err := devices.lookupDeviceWithLock(baseHash)
|
baseInfo, err := devices.lookupDeviceWithLock(baseHash)
|
||||||
|
@ -2033,8 +2033,8 @@ func (devices *DeviceSet) deleteTransaction(info *devInfo, syncDelete bool) erro
|
||||||
|
|
||||||
// Issue discard only if device open count is zero.
|
// Issue discard only if device open count is zero.
|
||||||
func (devices *DeviceSet) issueDiscard(info *devInfo) error {
|
func (devices *DeviceSet) issueDiscard(info *devInfo) error {
|
||||||
logrus.Debugf("devmapper: issueDiscard(device: %s). START", info.Hash)
|
logrus.Debugf("devmapper: issueDiscard START(device: %s).", info.Hash)
|
||||||
defer logrus.Debugf("devmapper: issueDiscard(device: %s). END", info.Hash)
|
defer logrus.Debugf("devmapper: issueDiscard END(device: %s).", info.Hash)
|
||||||
// This is a workaround for the kernel not discarding block so
|
// This is a workaround for the kernel not discarding block so
|
||||||
// on the thin pool when we remove a thinp device, so we do it
|
// on the thin pool when we remove a thinp device, so we do it
|
||||||
// manually.
|
// manually.
|
||||||
|
@ -2083,8 +2083,8 @@ func (devices *DeviceSet) deleteDevice(info *devInfo, syncDelete bool) error {
|
||||||
// removal. If one wants to override that and want DeleteDevice() to fail if
|
// removal. If one wants to override that and want DeleteDevice() to fail if
|
||||||
// device was busy and could not be deleted, set syncDelete=true.
|
// device was busy and could not be deleted, set syncDelete=true.
|
||||||
func (devices *DeviceSet) DeleteDevice(hash string, syncDelete bool) error {
|
func (devices *DeviceSet) DeleteDevice(hash string, syncDelete bool) error {
|
||||||
logrus.Debugf("devmapper: DeleteDevice(hash=%v syncDelete=%v) START", hash, syncDelete)
|
logrus.Debugf("devmapper: DeleteDevice START(hash=%v syncDelete=%v)", hash, syncDelete)
|
||||||
defer logrus.Debugf("devmapper: DeleteDevice(hash=%v syncDelete=%v) END", hash, syncDelete)
|
defer logrus.Debugf("devmapper: DeleteDevice END(hash=%v syncDelete=%v)", hash, syncDelete)
|
||||||
info, err := devices.lookupDeviceWithLock(hash)
|
info, err := devices.lookupDeviceWithLock(hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -2100,8 +2100,8 @@ func (devices *DeviceSet) DeleteDevice(hash string, syncDelete bool) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (devices *DeviceSet) deactivatePool() error {
|
func (devices *DeviceSet) deactivatePool() error {
|
||||||
logrus.Debug("devmapper: deactivatePool()")
|
logrus.Debug("devmapper: deactivatePool() START")
|
||||||
defer logrus.Debug("devmapper: deactivatePool END")
|
defer logrus.Debug("devmapper: deactivatePool() END")
|
||||||
devname := devices.getPoolDevName()
|
devname := devices.getPoolDevName()
|
||||||
|
|
||||||
devinfo, err := devicemapper.GetInfo(devname)
|
devinfo, err := devicemapper.GetInfo(devname)
|
||||||
|
@ -2124,7 +2124,7 @@ func (devices *DeviceSet) deactivatePool() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (devices *DeviceSet) deactivateDevice(info *devInfo) error {
|
func (devices *DeviceSet) deactivateDevice(info *devInfo) error {
|
||||||
logrus.Debugf("devmapper: deactivateDevice(%s)", info.Hash)
|
logrus.Debugf("devmapper: deactivateDevice START(%s)", info.Hash)
|
||||||
defer logrus.Debugf("devmapper: deactivateDevice END(%s)", info.Hash)
|
defer logrus.Debugf("devmapper: deactivateDevice END(%s)", info.Hash)
|
||||||
|
|
||||||
devinfo, err := devicemapper.GetInfo(info.Name())
|
devinfo, err := devicemapper.GetInfo(info.Name())
|
||||||
|
@ -2390,8 +2390,8 @@ func (devices *DeviceSet) MountDevice(hash, path, mountLabel string) error {
|
||||||
|
|
||||||
// UnmountDevice unmounts the device and removes it from hash.
|
// UnmountDevice unmounts the device and removes it from hash.
|
||||||
func (devices *DeviceSet) UnmountDevice(hash, mountPath string) error {
|
func (devices *DeviceSet) UnmountDevice(hash, mountPath string) error {
|
||||||
logrus.Debugf("devmapper: UnmountDevice(hash=%s)", hash)
|
logrus.Debugf("devmapper: UnmountDevice START(hash=%s)", hash)
|
||||||
defer logrus.Debugf("devmapper: UnmountDevice(hash=%s) END", hash)
|
defer logrus.Debugf("devmapper: UnmountDevice END(hash=%s)", hash)
|
||||||
|
|
||||||
info, err := devices.lookupDeviceWithLock(hash)
|
info, err := devices.lookupDeviceWithLock(hash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue