Object-based Storage System (OBS) is a new network storage architecture.It combines the high-performance in Storage Area Network (SAN) and cross- platform advantages in Network Attached Storage (NAS).Because of low latency, high-bandwidth, supporting long-distance transmission and scalability etc.of fibre channel,it can be used in mass storage devices in OBS.The driver for Fibre Channel adapter is the key part.Linux Driver, which hids details of the various equipment, provides the same interface.Generally,in Linux Operate System, a device is mapped to a special device file.When the user program accesses one device,it's just like operating one common file.Linux system supports three types of hardware device, such as character device, block device and network device.The multi-level structure is used in the Fibre Channel Adapter Driver for Linux system.They are SCSI(Small Computer System Interface) middle layer, transmission independent layer and FCP(Fibre Channel Protocol) layer.SCSI middle layer is responsible for receiving SCSI commands from the Linux file system ,and converts it into CCB(Command Control Block), then joins CCB processing queue,finally submits it to FCP layer.Transmission independent layer ,which defines the interface between SCSI middle layer and the FCP layer,is a abstraction interface layer, and is independent of the operating system and specific transfer protocol.The main function of FCP layer,is to parse CCB.It gets address information form CCB,then locates the corresponding equipment and Fibre Channel LUN(Logical Unit Number),finally submits information unit into FCP firmware modules to handle.The Extended Scatter/Gather Lists and Interrupt Avoidance mechanism are included in our driver. And the test results show that the driver gets a good performance. |