code: func (devices *DeviceSet) Shutdown(home string) error {
  	logger := logrus.WithField("storage-driver", "devicemapper")
  
  	logger.Debugf("[deviceset %s] Shutdown()", devices.devicePrefix)
  	logger.Debugf("Shutting down DeviceSet: %s", devices.root)
  	defer logger.Debugf("[deviceset %s] Shutdown() END", devices.devicePrefix)
  
  	// Stop deletion worker. This should start delivering new events to
  	// ticker channel. That means no new instance of cleanupDeletedDevice()
  	// will run after this call. If one instance is already running at
  	// the time of the call, it must be holding devices.Lock() and
  	// we will block on this lock till cleanup function exits.
  	devices.deletionWorkerTicker.Stop()
  
  	devices.Lock()
  	// Save DeviceSet Metadata first. Docker kills all threads if they
  	// don't finish in certain time. It is possible that Shutdown()
  	// routine does not finish in time as we loop trying to deactivate
  	// some devices while these are busy. In that case shutdown() routine
  	// will be killed and we will not get a chance to save deviceset
  	// metadata. Hence save this early before trying to deactivate devices.
  	devices.saveDeviceSetMetaData()
  	devices.unmountAndDeactivateAll(path.Join(home, "mnt"))
  	devices.Unlock()
  
  	info, _ := devices.lookupDeviceWithLock("")
  	if info != nil {
  		info.lock.Lock()
  		devices.Lock()
  		if err := devices.deactivateDevice(info); err != nil {
  			logger.Debugf("Shutdown deactivate base , error: %s", err)
  		}
  		devices.Unlock()
  		info.lock.Unlock()
  	}
  
  	devices.Lock()
  	if devices.thinPoolDevice == "" {
  		if err := devices.deactivatePool(); err != nil {
  			logger.Debugf("Shutdown deactivate pool , error: %s", err)
  		}
  	}
  	devices.Unlock()
  
  	return nil
  }
docs: // Shutdown shuts down the device by unmounting the root.