code: func (devices *DeviceSet) xfsSetNospaceRetries(info *devInfo) error {
  	dmDevicePath, err := os.Readlink(info.DevName())
  	if err != nil {
  		return fmt.Errorf("devmapper: readlink failed for device %v:%v", info.DevName(), err)
  	}
  
  	dmDeviceName := path.Base(dmDevicePath)
  	filePath := "/sys/fs/xfs/" + dmDeviceName + "/error/metadata/ENOSPC/max_retries"
  	maxRetriesFile, err := os.OpenFile(filePath, os.O_WRONLY, 0)
  	if err != nil {
  		return fmt.Errorf("devmapper: user specified daemon option dm.xfs_nospace_max_retries but it does not seem to be supported on this system :%v", err)
  	}
  	defer maxRetriesFile.Close()
  
  	// Set max retries to 0
  	_, err = maxRetriesFile.WriteString(devices.xfsNospaceRetries)
  	if err != nil {
  		return fmt.Errorf("devmapper: Failed to write string %v to file %v:%v", devices.xfsNospaceRetries, filePath, err)
  	}
  	return nil
  }
docs: // Recent XFS changes allow changing behavior of filesystem in case of errors.
  // When thin pool gets full and XFS gets ENOSPC error, currently it tries
  // IO infinitely and sometimes it can block the container process
  // and process can't be killWith 0 value, XFS will not retry upon error
  // and instead will shutdown filesystem.