Documentation ¶
Index ¶
- Constants
- Variables
- func MegaScan()
- func OpenMegasasIoctl(host uint16, diskNum uint8) error
- type Iovec
- type MegasasDevice
- type MegasasIoctl
- func (m *MegasasIoctl) Close()
- func (m *MegasasIoctl) GetPDList(host uint16) ([]MegasasPDAddress, error)
- func (m *MegasasIoctl) MFI(host uint16, opcode uint32, b []byte) error
- func (m *MegasasIoctl) PassThru(host uint16, diskNum uint8, cdb []byte, buf []byte, dxfer_dir int) error
- func (m *MegasasIoctl) ScanDevices() []MegasasDevice
- func (m *MegasasIoctl) ScanHosts() ([]uint16, error)
- type MegasasPDAddress
Constants ¶
View Source
const ( SYSFS_SCSI_HOST_DIR = "/sys/class/scsi_host" MAX_IOCTL_SGE = 16 MFI_CMD_PD_SCSI_IO = 0x04 MFI_CMD_DCMD = 0x05 MR_DCMD_CTRL_GET_INFO = 0x01010000 MR_DCMD_PD_GET_LIST = 0x02010000 // Obsolete / deprecated command MR_DCMD_PD_LIST_QUERY = 0x02010100 MFI_FRAME_DIR_NONE = 0x0000 MFI_FRAME_DIR_WRITE = 0x0008 MFI_FRAME_DIR_READ = 0x0010 MFI_FRAME_DIR_BOTH = 0x0018 )
Variables ¶
Functions ¶
func OpenMegasasIoctl ¶
Types ¶
type MegasasDevice ¶
type MegasasDevice struct { Name string // contains filtered or unexported fields }
type MegasasIoctl ¶
type MegasasIoctl struct { DeviceMajor uint32 // contains filtered or unexported fields }
Holder for megaraid_sas ioctl device
func CreateMegasasIoctl ¶
func CreateMegasasIoctl() (MegasasIoctl, error)
CreateMegasasIoctl determines the device ID for the MegaRAID SAS ioctl device, creates it if necessary, and returns a MegasasIoctl struct to interact with the megaraid_sas driver.
func (*MegasasIoctl) Close ¶
func (m *MegasasIoctl) Close()
Close closes the file descriptor of the MegasasIoctl instance
func (*MegasasIoctl) GetPDList ¶
func (m *MegasasIoctl) GetPDList(host uint16) ([]MegasasPDAddress, error)
GetPDList retrieves a list of physical devices attached to the specified host
func (*MegasasIoctl) MFI ¶
func (m *MegasasIoctl) MFI(host uint16, opcode uint32, b []byte) error
MFI sends a MegaRAID Firmware Interface (MFI) command to the specified host
func (*MegasasIoctl) PassThru ¶
func (m *MegasasIoctl) PassThru(host uint16, diskNum uint8, cdb []byte, buf []byte, dxfer_dir int) error
PassThru sends a SCSI command to a MegaRAID controller
func (*MegasasIoctl) ScanDevices ¶
func (m *MegasasIoctl) ScanDevices() []MegasasDevice
ScanDevices scans systme for (presumably) SMART-capable devices on all available host adapters
func (*MegasasIoctl) ScanHosts ¶
func (m *MegasasIoctl) ScanHosts() ([]uint16, error)
ScanHosts scans system for megaraid_sas controllers and returns a slice of host numbers
Click to show internal directories.
Click to hide internal directories.