Skip to content

Commit

Permalink
rename-azure-commom
Browse files Browse the repository at this point in the history
  • Loading branch information
linusshen2015 committed Nov 10, 2019
1 parent 0155d18 commit fecff7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/volume/azure_dd/azure_common_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ func getDiskLinkByDevName(io ioHandler, devLinkPath, devName string) (string, er
}

func scsiHostRescan(io ioHandler, exec mount.Exec) {
scsi_path := "/sys/class/scsi_host/"
if dirs, err := io.ReadDir(scsi_path); err == nil {
scsipath := "/sys/class/scsi_host/"
if dirs, err := io.ReadDir(scsipath); err == nil {
for _, f := range dirs {
name := scsi_path + f.Name() + "/scan"
name := scsipath + f.Name() + "/scan"
data := []byte("- - -")
if err = io.WriteFile(name, data, 0666); err != nil {
klog.Warningf("failed to rescan scsi host %s", name)
}
}
} else {
klog.Warningf("failed to read %s, err %v", scsi_path, err)
klog.Warningf("failed to read %s, err %v", scsipath, err)
}
}

Expand Down

0 comments on commit fecff7c

Please sign in to comment.