CN112069147A - FAT sharing system and sharing method for multi-host FAT file system - Google Patents

FAT sharing system and sharing method for multi-host FAT file system Download PDF

Info

Publication number
CN112069147A
CN112069147A CN202011275079.0A CN202011275079A CN112069147A CN 112069147 A CN112069147 A CN 112069147A CN 202011275079 A CN202011275079 A CN 202011275079A CN 112069147 A CN112069147 A CN 112069147A
Authority
CN
China
Prior art keywords
fat
read
storage module
host
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011275079.0A
Other languages
Chinese (zh)
Other versions
CN112069147B (en
Inventor
赵丹
蒋湘涛
马瑞欢
扈世伟
单嘉成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Runcore Innovation Technology Co ltd
Original Assignee
Hunan Runcore Innovation Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Runcore Innovation Technology Co ltd filed Critical Hunan Runcore Innovation Technology Co ltd
Priority to CN202011275079.0A priority Critical patent/CN112069147B/en
Publication of CN112069147A publication Critical patent/CN112069147A/en
Application granted granted Critical
Publication of CN112069147B publication Critical patent/CN112069147B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/188Virtual file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Abstract

The invention discloses a FAT sharing system and a sharing method facing a multi-host FAT file system, wherein the system comprises the following steps: the system comprises a storage module end and a plurality of host machine ends; each host end is in communication connection with the storage module end and is used for sending a read-write command aiming at FAT resources to the storage module end; the storage module end comprises an FAT table management module and a storage module; the FAT table management module is used for adding the received read-write commands sent by the host terminals into a task queue so as to process the read-write commands in the task queue one by one, acquiring the FAT table from the storage module, and returning the FAT table to the host terminal corresponding to the currently processed read-write commands, wherein the FAT table stores actual read-write addresses of FAT files. The technical scheme of the invention aims to solve the problem that the FAT file system does not support multi-host requests.

Description

FAT sharing system and sharing method for multi-host FAT file system
Technical Field
The invention relates to the technical field of computers, in particular to a multi-host FAT file system-oriented FAT sharing system and a multi-host FAT file system-oriented FAT sharing method.
Background
The FAT (File Allocation Table) is a general File system, and the existing FAT File system in the market at present can only implement File system operation under a single host, and when multi-host shared access is performed, read-write conflicts can be formed among the hosts, which may cause data coverage and File damage to a great extent, and data security cannot be guaranteed. Therefore, the FAT file system cannot correctly process the multi-host request and does not support the multi-host request.
Disclosure of Invention
The invention mainly aims to provide a FAT sharing system facing a multi-host FAT file system, and aims to solve the problem that the FAT file system does not support multi-host requests.
In order to achieve the purpose, the FAT sharing system facing the multi-host FAT file system comprises a storage module end and a plurality of host ends;
each host end is in communication connection with the storage module end and is used for sending a read-write command aiming at FAT resources to the storage module end;
the storage module end is independent of the host end, the storage module end comprises an FAT table management module and a storage module, and the FAT table is stored in the storage module; the FAT table management module is used for adding the received read-write commands sent by the host terminals into a task queue so as to process the read-write commands in the task queue one by one, acquiring the FAT table from the storage module, and returning the FAT table to the host terminal corresponding to the currently processed read-write commands, wherein the FAT table stores actual read-write addresses of FAT files.
Preferably, the host side includes:
the application program module is used for initiating the read-write instruction aiming at the FAT resource;
the virtual file system module is used for granulating the read-write command to a read-write function through an API (application programming interface) to generate a read-write command and issuing the read-write command;
the FAT file system kernel module is used for sending the read-write command to the storage module end so as to apply for the FAT resources to the storage module end;
and the drive module is used for performing read-write operation according to the FAT table fed back by the storage module end.
Preferably, the storage module end comprises a CPU module, an FPGA module, a power module, a clock module and a hot plug module, and the CPU module comprises the FAT table management module; the FPGA module, the storage module and the hot plug module are respectively and electrically connected with the CPU module, and the power supply module is respectively and electrically connected with the CPU module and the FPGA module; the clock module is electrically connected with the CPU module and the FPGA module respectively;
the FPGA module comprises an FC interface, a port control unit and a port routing unit which are sequentially in signal connection; the port routing unit is also respectively connected with a common register general protocol unit and an FC read-write protocol control unit in a signal mode.
Preferably, each host end is respectively connected with a fibre channel switch in a communication manner, and the fibre channel switch is connected with the storage module end in a communication manner; the storage module end comprises a Xilinx FPGA 7K325T, a Feiteng CPU FT2000/4 and a SATA SSD storage module;
the FAT sharing system further comprises a destruction control module, wherein the destruction control module comprises a destruction trigger detection unit and a destruction trigger time sequence control unit which are in signal connection, the destruction trigger time sequence control unit is used for being connected with the end of the storage module, the destruction trigger detection unit is used for detecting a trigger signal of which the front end is connected with a pin, filtering interference and jitter in the trigger signal and a false trigger signal of which a chip initialization pin signal is unstable in the power-on process, and sending the filtered trigger signal to the destruction trigger time sequence control unit; the destruction triggering time sequence control unit is used for carrying out destruction control according to the destruction triggering time sequence burnt by the storage module end after receiving the triggering signal so as to carry out parallel triggering of the destruction signal on each storage module end connected with the destruction triggering time sequence control unit and realize synchronous destruction.
In addition, in order to achieve the above object, the present invention further provides a multiple host FAT file system oriented FAT sharing method, which is applied to any one of the multiple host FAT file system oriented FAT sharing systems; the FAT sharing method comprises the following steps:
acquiring a read-write command aiming at FAT resources, which is sent to the storage module end by each host end;
receiving the read-write commands sent by the host terminals through the FAT table management module, and adding the read-write commands into a task queue;
processing the read-write commands in the task queue one by one through the FAT table management module;
and acquiring a FAT table from the FAT table management module, and returning the FAT table to the host side corresponding to the currently processed read-write command.
Preferably, the step of obtaining the read-write command for the FAT resource sent from each host to the storage module includes:
initiating the read-write instruction aiming at the FAT resource at the host side;
granulating the read-write command to a read-write function through an API (application programming interface) interface to generate a read-write command, and issuing the read-write command;
and sending the read-write command to the storage module end so as to apply for the FAT resource to the storage module end.
Preferably, the step of processing the read-write commands in the task queue one by one through the FAT table management module includes:
acquiring the receiving time of each read-write command;
adding the read-write commands into a task queue according to the time arrangement sequence according to the receiving time of the read-write commands;
and processing the read-write commands in the task queue one by one according to the time arrangement sequence.
Preferably, after the step of obtaining the FAT table from the FAT table management module and returning the FAT table to the host side corresponding to the currently processed read-write command, the method further includes:
after detecting that the FAT table is modified, sending a first broadcast to each host end through the storage module end, wherein the first broadcast comprises the modification position of the FAT table;
after receiving the first broadcast, each host end judges whether the locally stored FAT table needs to be updated according to the modification position of the FAT table;
the host terminal which needs to update the locally stored FAT table sends a synchronous request aiming at the FAT table to the storage module terminal, and locally stores the modified FAT table after receiving the modified FAT table.
Preferably, the FAT file system comprises a shared storage module subsystem, and the shared storage module subsystem comprises a plurality of storage module terminals; the FAT sharing method further comprises the following steps:
and when detecting that the storage module end is newly added, sending a second broadcast to each host end so that each host end establishes communication connection with the newly added storage module end after receiving the second broadcast.
Preferably, the FAT sharing system includes a plurality of the storage module terminals, and each of the host terminals is associated with a corresponding storage module terminal;
the step of obtaining the read-write command for the FAT resources sent from each host to the storage module includes:
acquiring a current read-write command aiming at the FAT resource, which is sent to the associated storage module end by each host end;
the step of receiving the read-write command sent by each host end through the FAT table management module and adding each read-write command into a task queue includes:
when the associated storage module end receives a current read-write command sent by the associated host end, judging whether the number of tasks in the task queue of the associated storage module end reaches a preset value;
when the number of tasks in the task queue does not reach a preset value, adding a current read-write command into the associated task queue of the storage module end;
when the number of tasks in the task queue reaches a preset value, acquiring the number of tasks in the task queues of other storage module ends to determine whether other storage module ends with the number of tasks smaller than the preset value exist;
when other storage module ends with the task quantity smaller than the preset value exist, distributing the current read-write command to the storage module ends with the task quantity smaller than the preset value;
and when other storage module ends with the task number smaller than the preset value do not exist, adding the current read-write command into the associated task queue of the storage module end.
In the technical scheme of the invention, the FAT file system originally arranged at the host end is divided, wherein an FAT table in the FAT file system is arranged at an independent storage module end, and an FAT table management module is arranged at the storage module end to manage the read-write commands aiming at FAT resources initiated by each host end. The file operation module, the read-write module and the interface in the FAT file system are still reserved at the host end so as to realize the sharing of the FAT table to each host end. Furthermore, the FAT table management module is configured to add the received read-write commands sent by each host into a task queue, so as to process each read-write command in the task queue one by one, obtain the FAT table from the storage module, and return the FAT table to the host corresponding to the currently processed read-write command, so that the FAT table can only perform resource sharing on one host at a time, an actual read-write address of the FAT file is stored in the FAT table, and the host obtaining the FAT table can perform read-write operation according to read-write requirements, so as to avoid read-write conflicts between the hosts, and avoid data coverage of FAT marks caused by the hosts. Therefore, the technical scheme of the invention forms the FAT sharing system capable of correctly processing the multi-host request.
Drawings
FIG. 1 is a block diagram of an embodiment of a multi-host FAT file system oriented FAT sharing system of the present invention;
FIG. 2 is a flowchart illustrating a FAT sharing method for a multi-host FAT file system according to a first embodiment of the present invention.
The objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "unit", "means", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "unit", "means" or "unit" may be used mixedly.
Referring to fig. 1, to achieve the above object, the present invention provides a multiple host FAT file system oriented FAT sharing system, which includes a storage module end and multiple host ends;
each host end is in communication connection with the storage module end and is used for sending a read-write command aiming at FAT resources to the storage module end;
the storage module end is independent of the host end, the storage module end comprises an FAT table management module and a storage module, and the FAT table is stored in the storage module; the FAT table management module is used for adding the received read-write commands sent by the host terminals into a task queue so as to process the read-write commands in the task queue one by one, acquiring the FAT table from the storage module, and returning the FAT table to the host terminal corresponding to the currently processed read-write commands, wherein the FAT table stores actual read-write addresses of FAT files.
In the technical scheme of the invention, the FAT file system originally arranged at the host end is divided, wherein an FAT table in the FAT file system is arranged at an independent storage module end, and an FAT table management module is arranged at the storage module end to manage the read-write commands aiming at FAT resources initiated by each host end. The file operation module, the read-write module and the interface in the FAT file system are still reserved at the host end so as to realize the sharing of the FAT table to each host end and reduce the workload of the storage module end. Furthermore, the FAT table management module is configured to add the received read-write commands sent by each host into a task queue, so as to process each read-write command in the task queue one by one, obtain the FAT table from the storage module, and return the FAT table to the host corresponding to the currently processed read-write command, so that the FAT table can only be provided to one of the host for modification or deletion at a time, an actual read-write address of the FAT file is stored in the FAT table, and the host obtaining the FAT table can perform read-write operation according to read-write requirements, so as to avoid read-write collision between the hosts, and prevent the hosts from causing data coverage of FAT labels. Therefore, the technical scheme of the invention forms the FAT sharing system capable of correctly processing the multi-host request.
The FAT sharing system also comprises a control module which is respectively in signal connection with the storage module end and the host end, and is used for managing the storage module ends, including discovery, loading, conflict detection and FAT synchronization of the storage module ends, combining a plurality of storage module ends in the whole FAT sharing system into a uniform resource pool, providing access operation for an upper-layer FAT file system, and realizing storage resource virtualization; meanwhile, balanced scheduling can be realized in the layer, and global performance optimization can be carried out on the whole system.
By migrating the FAT module of the file system layer of the host end to the storage module end, the conflict that the host ends operate the same storage module end at the same time is avoided, and therefore the storage resources of the system are efficiently shared by the host ends.
The storage module end does not need to store any host end information, provides peer-to-peer service for each host end, and has no other load except the storage service itself, and in fact, except for providing FAT distribution service for write operation, all other operation flows are consistent with DAS and SAN modes, thereby ensuring the storage service performance to the maximum extent and improving the module reliability.
The method is beneficial to realizing a multi-host end and a multi-task sharing access storage module end under the linux system, and mainly comprises an FAT sharing mechanism, FAT synchronization, IO operation request queuing and the like. The SATA SSD storage unit is a system disk and is used for storing system software and update firmware of the FPGA.
The FAT table management module is separated from a standard file system of a host end and is proxied by the storage module end. Specifically, the number of the host sides is at least two, and the number of the host sides is not limited herein. Each host end and the storage module end use FC for communication, a fiber channel switch is connected to multiple machines, specifically, each host end is respectively in communication connection with the fiber channel switch, and the fiber channel switch is in communication connection with the storage module end.
Preferably, the storage module end comprises a Xilinx FPGA 7K325T, a Feiteng CPU FT2000/4 and a SATA SSD storage module, and FAT sharing and queuing can be realized.
The invention is used for normally operating the storage equipment under multiple host ends and multiple tasks, and can more efficiently realize the file sharing of each host end.
When a multi-host end carries out file read-write request, handshake is carried out with a storage module end at first, FAT resource application or FAT resource deletion is carried out on the storage module end in a unified mode, and resource results are fed back to the host ends after FAT distribution or algorithm is carried out on the storage module end.
Preferably, the host side includes:
the application program module is used for initiating the read-write instruction aiming at the FAT resource;
the virtual file system module is used for granulating the read-write command to a read-write function through an API (application programming interface) to generate a read-write command and issuing the read-write command;
the FAT file system kernel module is used for sending the read-write command to the storage module end so as to apply for the FAT resources to the storage module end;
and the drive module is used for performing read-write operation according to the FAT table fed back by the storage module end.
In this embodiment, the communication process between the host side and the storage module side is as follows: and the host side issues a read-write instruction from the application program module. The virtual file system module performs read-write operation through the API interface to generate a read-write command, and sends the read-write command to the FAT file system kernel module. The FAT file system kernel module applies for FAT resources to the storage module end, after the host end and the storage module end perform handshake, the storage module end adds read-write requests into a task queue, processes the task requests one by one and performs FAT unified management, returns an FAT table to the host end, and the host end analyzes an actual read-write address according to the obtained FAT table and calls a bottom layer drive module to perform data read-write. After completing the read-write request of one host end each time, the storage module end sends broadcast to other host ends and synchronizes the FAT table. When more hosts exist, the communication process can realize file sharing in the same way.
Furthermore, the storage module end comprises a CPU module, an FPGA module, a power supply module, a clock module and a hot plug module, wherein the CPU module comprises the FAT table management module; the FPGA module, the storage module and the hot plug module are respectively and electrically connected with the CPU module, and the power supply module is respectively and electrically connected with the CPU module and the FPGA module; the clock module is electrically connected with the CPU module and the FPGA module respectively.
The CPU module selects FT-2000/4, and FT-2000/4 connects resources as follows: 1. 2 DDR4-3200 channels are integrated, and real-time encryption of DDR storage data is supported; 2. integrating 34Lanes PCIe 3.0 interfaces, 2X 16 (each separable into 2X 8), and 2X 1; 3. 2 gigabit network interface (RGMII) is integrated, and 10/100/1000Mbps adaptation is supported; 4. integrate 4 UARTs, 1 LPC Master, 32 GPIOs, 4I 2C, 1 QSPI, 2 general SPIs, 2 WDTs, 1 RTC and 16 external interrupts (sharing IO with GPIOs).
The power supply module adopts a mode of respectively supplying power according to the characteristics of the power-on time sequence and the current magnitude of the CPU and the FPGA, so that the influence of the power supply on the use of the two chips is reduced.
The FPGA module comprises an FC interface, a port control unit and a port routing unit which are sequentially in signal connection; the port routing unit is also respectively connected with a common register general protocol unit and an FC read-write protocol control unit in a signal mode, and the common register general protocol unit and the FC read-write protocol control unit are respectively connected with a PCIe interface control unit in a signal mode.
Specifically, the FPGA module further includes a high-speed interface for implementing data transceiving of the FC fiber channel protocol. The FC interfaces are two paths (FC 0 and FC 1), and the two paths of FC interface data carry out transceiving control on the FC interface data through the port control unit; the port routing selection unit realizes the port routing function through the port number for receiving and transmitting data and the register configuration information of the common register universal protocol control unit of the CPU module; the FC read-write protocol control unit controls data receiving and sending, and combines the register configuration information to realize the receiving and sending of the CPU module data protocol packet through the PCIe interface control unit; the Switch routing function of FC0 and FC1 two-path fiber channel protocol data and PCIe protocol is realized, and the transparent bridge data forwarding function between the FC interface of the storage module end and the CPU module is realized.
Furthermore, the FAT sharing system further comprises a destruction control module, wherein the destruction control module comprises a destruction trigger detection unit and a destruction trigger time sequence control unit which are in signal connection, the destruction trigger time sequence control unit is used for being connected with the end of the storage module, the destruction trigger detection unit is used for detecting a trigger signal of which the front end is connected with a pin, filtering false trigger signals of interference and jitter in the trigger signal and instability of a chip initialization pin signal in the power-on process, and sending the filtered trigger signal to the destruction trigger time sequence control unit; the destruction triggering time sequence control unit is used for carrying out destruction control according to the destruction triggering time sequence burnt by the storage module end after receiving the triggering signal so as to carry out parallel triggering of the destruction signal on each storage module end connected with the destruction triggering time sequence control unit and realize synchronous destruction.
Referring to fig. 2, in order to achieve the above object, a FAT sharing method for a multi-host FAT file system according to a first embodiment of the present invention is applied to any one of the FAT sharing systems for a multi-host FAT file system described above; the FAT sharing method comprises the following steps:
step S10, obtaining the read-write command aiming at the FAT resource sent by each host terminal to the storage module terminal;
step S20, receiving the read-write command sent by each host end through the FAT table management module, and adding each read-write command into a task queue;
step S30, processing the read-write commands in the task queue one by one through the FAT table management module;
step S40, obtaining a FAT table from the FAT table management module, and returning the FAT table to the host side corresponding to the currently processed read-write command.
In the technical scheme of the invention, the FAT file system originally arranged at the host end is divided, wherein an FAT table in the FAT file system is arranged at an independent storage module end, and an FAT table management module is arranged at the storage module end to manage the read-write commands aiming at FAT resources initiated by each host end. The file operation module, the read-write module and the interface in the FAT file system are still reserved at the host end so as to realize the sharing of the FAT table to each host end and reduce the workload of the storage module end. Furthermore, the FAT table management module is configured to add the received read-write commands sent by each host into a task queue, so as to process each read-write command in the task queue one by one, obtain the FAT table from the storage module, and return the FAT table to the host corresponding to the currently processed read-write command, so that the FAT table can only be provided to one of the host for modification or deletion at a time, an actual read-write address of the FAT file is stored in the FAT table, and the host obtaining the FAT table can perform read-write operation according to read-write requirements, so as to avoid read-write collision between the hosts, and prevent the hosts from causing data coverage of FAT labels. Therefore, the technical scheme of the invention forms the FAT sharing system capable of correctly processing the multi-host request.
Specifically, the FAT table management module may process each read-write command in the task queue one by one in a plurality of ways, for example, a preset processing sequence of the read-write command is set, and when the read-write command is received, each read-write command in the task queue is sequentially processed according to the preset processing sequence.
The method includes the steps of setting a preset processing sequence according to types of read-write commands, specifically, firstly setting a read-write command category list comprising a plurality of categories, establishing a processing priority level of each category, classifying the read-write commands according to the read-write command category list after the read-write commands are received so as to determine the processing priority level of the current read-write commands, and then processing the read-write commands in a task queue one by one according to the processing priority levels of the read-write commands of the various categories.
If a plurality of read-write commands exist in the same processing priority level, the receiving time of each read-write command can be obtained, and each read-write command in the same processing priority level is processed in sequence according to the receiving time of each read-write command.
In this embodiment, the read-write command is divided into two types, i.e., a read command and a write command, and the processing priority of the read command and the processing priority of the write command are set. For example, the priority of the read command may be set to be higher than that of the write command, when the read-write command is received, the read command is added to the first task queue, the write command is added to the second task queue, after the read commands in the first task queue are sequentially completed according to the receiving time of the read command, the write commands in the second task queue are sequentially completed according to the receiving time of the write command.
Based on the first embodiment of the FAT sharing method for the multi-host FAT file system of the present invention, in the second embodiment of the FAT sharing method for the multi-host FAT file system of the present invention, the step S10 includes:
step S11, initiating the read-write instruction for FAT resources at the host end;
step S12, granulating the read-write command to a read-write function through an API (application programming interface) to generate a read-write command, and issuing the read-write command;
and step S13, sending the read-write command to the storage module end to apply for the FAT resource to the storage module end.
In this embodiment, the communication process between the host side and the storage module side is as follows: and the host side issues a read-write instruction from the application program module. The virtual file system module performs read-write operation through the API interface to generate a read-write command, and sends the read-write command to the FAT file system kernel module. The FAT file system kernel module applies for FAT resources to the storage module end, after the host end and the storage module end perform handshake, the storage module end adds read-write requests into a task queue, processes the task requests one by one and performs FAT unified management, returns an FAT table to the host end, and the host end analyzes an actual read-write address according to the obtained FAT table and calls a bottom layer drive module to perform data read-write. After completing the read-write request of one host end each time, the storage module end sends broadcast to other host ends and synchronizes the FAT table. When more hosts exist, the communication process can realize file sharing in the same way.
Based on the first embodiment or the second embodiment of the FAT sharing method for the multi-host FAT file system of the present invention, in the third embodiment of the FAT sharing method for the multi-host FAT file system of the present invention, the step S30 includes:
step S31, obtaining the receiving time of each read-write command;
step S32, adding each read-write command into a task queue according to the time arrangement sequence according to the receiving time of each read-write command;
step S33, processing the read-write commands in the task queue one by one according to the time arrangement order.
In this embodiment, the storage module side implements queuing management on file system operations under multiple hosts according to the receiving time of each read-write command. When each host terminal initiates a data read-write request, the host terminal applies for management of the FAT table to the storage module terminal, and the storage module terminal sequentially adds the received multiple tasks into the task processing queue, so that task queuing is realized, multiple task conflict is avoided, and the tasks can be sequentially executed according to a first-in first-out strategy.
Furthermore, the sequence of each read-write command in the task queue is processed one by one, and other strategies can be formulated. For example, the priority order is set for each host, and when receiving a read-write command from the host, the FAT table management module identifies the source of the read-write command, so as to determine which host sends the read-write command through the source identification, so that the read-write command sent from the host with the higher priority order is processed preferentially.
When a plurality of read-write commands with the same source identification exist, the read-write commands with the same source identification are added to the same task sub-queue, different task sub-queues are processed in sequence according to different priority orders of the host end, one task sub-queue is processed, and then the next task sub-queue is processed. And processing the read-write commands in the same task sub-queue according to the receiving time sequence.
Specifically, in another embodiment, the reading and writing order may be determined by a plurality of factors and respective weight values.
Based on the first to third embodiments of the FAT sharing method for multi-host FAT file system of the present invention, in the fourth embodiment of the FAT sharing method for multi-host FAT file system of the present invention, after the step S40, the method further includes:
step S50, after detecting that the FAT table is modified, sending a first broadcast to each host end through the storage module end, wherein the first broadcast comprises the modification position of the FAT table;
step S60, after each host end receives the first broadcast, whether the locally stored FAT table needs to be updated is judged according to the modification position of the FAT table;
step S70, the host that needs to update the locally stored FAT table sends a synchronization request for the FAT table to the storage module, and locally stores the modified FAT table after receiving the modified FAT table.
When any host terminal modifies the shared FAT table, the storage module terminal sends broadcast to each host terminal, the host terminal synchronizes the updated FAT table to the local in time after receiving the broadcast, and updates the local file list by using the latest FAT table to realize file synchronization.
Based on the first to fourth embodiments of the FAT sharing method for a multi-host FAT file system of the present invention, in the fifth embodiment of the FAT sharing method for a multi-host FAT file system of the present invention, after the step S10, the method further includes:
step S80, determining the type of the read-write command;
when the read-write command is a write command, executing the step S20;
when the read-write command is a read command, step S90 is executed: and obtaining the FAT table from the FAT table management module, and returning the FAT table to the host terminal corresponding to the read command.
Specifically, in this embodiment, if the read/write command causes modification of the FAT table, the read/write command is added to the task queue to perform unified management of the execution sequence with reference to step S20, step S30, and step S40 of the present invention. And if the read-write command cannot cause the modification of the FAT table, acquiring the FAT table from the FAT table management module, and returning the FAT table to the host side corresponding to the read command. Different FAT table sharing strategies are formulated for the read command or the write command according to the read-write command so as to reduce the processing calculation amount of an FAT table management module and reduce the waiting time of each host terminal for applying FAT resources, thereby improving the processing efficiency of each host terminal.
Based on the first to fifth embodiments of the FAT sharing method for multi-host FAT file system of the present invention, in the sixth embodiment of the FAT sharing method for multi-host FAT file system of the present invention, after the step S40, the method further includes:
and S100, performing read-write operation according to the FAT table fed back by the storage module end.
Specifically, step S100 is performed between step S40 and step S50.
Based on the first to sixth embodiments of the multi-host FAT file system-oriented FAT sharing method of the present invention, in the seventh embodiment of the multi-host FAT file system-oriented FAT sharing method of the present invention, the FAT file system includes a shared storage module subsystem, and the shared storage module subsystem includes a plurality of storage module ends; the FAT sharing method further comprises the following steps:
step S110, when detecting that the storage module end is newly added, sending a second broadcast to each host end, so that each host end establishes a communication connection with the newly added storage module end after receiving the second broadcast.
In this embodiment, a management function of each storage module end is realized, when a storage module end for sharing is added, the newly added storage module end broadcasts to each host end, and after each host end receives broadcast information, the newly added storage module end is discovered and mounted. Each host end can mount a plurality of storage module ends for unified management and use. A plurality of physical storage module ends are virtualized into a new logic device through a resource virtualization technology to form a large shared storage resource pool.
Based on the first to seventh embodiments of the multi-host FAT file system-oriented FAT sharing method of the present invention, in an eighth embodiment of the multi-host FAT file system-oriented FAT sharing method of the present invention, the FAT sharing system includes a plurality of the storage module ends, and each of the host ends is associated with a corresponding storage module end;
the step S10 includes:
step S14, obtaining the current read-write command for FAT resource sent by each host terminal to the associated storage module terminal;
the step S20 includes:
step S21, when the associated storage module end receives the current read-write command sent by the associated host end, determining whether the number of tasks in the task queue of the associated storage module end reaches a preset value;
when the number of tasks in the task queue does not reach a preset value, executing step S22, and adding the current read-write command to the associated task queue of the storage module end;
when the number of tasks in the task queue reaches a preset value, executing step S23 to obtain the number of tasks in the task queues of the other storage module ends to determine whether there are other storage module ends whose number of tasks is less than the preset value;
when other storage module ends with the task quantity smaller than the preset value exist, executing the step S24, and distributing the current read-write command to the storage module ends with the task quantity smaller than the preset value;
and when no other storage module end with the task number smaller than the preset value exists, executing the step S25, and adding the current read-write command into the task queue of the associated storage module end.
When a plurality of host terminals and a plurality of storage module terminals exist, in order to avoid load imbalance caused by the operation of the same storage module terminal by the plurality of host terminals, the corresponding storage module terminal may be associated with each host terminal, so as to implement capacity balancing and load balancing. For example, the host side 1 and the host side 2 mainly access the storage module side a, and the host side 3 and the host side 4 mainly access the storage module side B.
Furthermore, the invention can also carry out unified FAT table management. For example, the storage module is powered on to perform system self-test and initialization, the file system boot area data is read from the storage module, the FAT table is reconstructed, and the FAT management function of the file system of each host is proxied, so that a plurality of host sides share one FAT table, and uniform distribution, query and recovery of the FAT table are realized. When a plurality of data write-in requests exist, the storage module end searches free address spaces in the FAT table in sequence and feeds back the free address spaces to the corresponding host end, so that data can be written in different address spaces, address conflict and data loss are avoided, when the FAT table is updated, the FAT table is updated to the storage module in an instant refreshing or timing refreshing mode, and file information read from the storage module by the host end is ensured to be updated without delay.
The file system supports multithread parallel operation, the internal part of the file system can arbitrate read-write operation among a plurality of threads, and read-write conflict can not be caused even if a plurality of threads operate one file at the same time.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a computer-readable storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above, and includes several instructions for enabling a terminal device to enter the method according to the embodiments of the present invention.
In the description herein, references to the description of the term "an embodiment," "another embodiment," "other embodiments," or "first through Xth embodiments," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, method steps, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A FAT sharing system facing a multi-host FAT file system is characterized by comprising a storage module end and a plurality of host ends;
each host end is in communication connection with the storage module end and is used for sending a read-write command aiming at FAT resources to the storage module end;
the storage module end is independent of the host end, the storage module end comprises an FAT table management module and a storage module, and the FAT table is stored in the storage module; the FAT table management module is used for adding the received read-write commands sent by the host terminals into a task queue so as to process the read-write commands in the task queue one by one, acquiring the FAT table from the storage module, and returning the FAT table to the host terminal corresponding to the currently processed read-write commands, wherein the FAT table stores actual read-write addresses of FAT files.
2. The multi-host FAT file system oriented FAT sharing system of claim 1 wherein the host side comprises:
the application program module is used for initiating a read-write instruction aiming at the FAT resource;
the virtual file system module is used for granulating the read-write command to a read-write function through an API (application programming interface) to generate a read-write command and issuing the read-write command;
the FAT file system kernel module is used for sending the read-write command to the storage module end so as to apply for the FAT resources to the storage module end;
and the drive module is used for performing read-write operation according to the FAT table fed back by the storage module end.
3. The FAT sharing system for the multi-host FAT file system according to claim 1 or 2, wherein the storage module end comprises a CPU module, an FPGA module, a power module, a clock module and a hot plug module, and the CPU module comprises the FAT table management module; the FPGA module, the storage module and the hot plug module are respectively and electrically connected with the CPU module, and the power supply module is respectively and electrically connected with the CPU module and the FPGA module; the clock module is electrically connected with the CPU module and the FPGA module respectively;
the FPGA module comprises an FC interface, a port control unit and a port routing unit which are sequentially in signal connection; the port routing unit is also respectively connected with a common register general protocol unit and an FC read-write protocol control unit in a signal mode.
4. The FAT sharing system for a multi-host FAT file system according to claim 1 or 2, wherein each host end is communicatively connected with a fibre channel switch, respectively, and the fibre channel switch is communicatively connected with the storage module end; the storage module end comprises a Xilinx FPGA 7K325T, a Feiteng CPU FT2000/4 and a SATA SSD storage module;
the FAT sharing system also comprises a destruction control module, wherein the destruction control module comprises a destruction trigger detection unit and a destruction trigger time sequence control unit which are in signal connection, and the destruction trigger time sequence control unit is used for being connected with the storage module end; the destruction trigger detection unit is used for detecting a trigger signal of a front-end access pin, filtering interference and jitter in the trigger signal and a false trigger signal of unstable chip initialization pin signals in the power-on process, and sending the filtered trigger signal to the destruction trigger time sequence control unit; the destruction triggering time sequence control unit is used for carrying out destruction control according to the destruction triggering time sequence burnt by the storage module end after receiving the triggering signal so as to carry out parallel triggering of the destruction signal on each storage module end connected with the destruction triggering time sequence control unit and realize synchronous destruction.
5. A FAT sharing method facing a multi-host FAT file system is characterized in that the FAT sharing method is applied to the FAT sharing system facing the multi-host FAT file system as claimed in any one of claims 1 to 4; the FAT sharing method comprises the following steps:
acquiring a read-write command aiming at FAT resources, which is sent to the storage module end by each host end;
receiving the read-write commands sent by the host terminals through the FAT table management module, and adding the read-write commands into a task queue;
processing the read-write commands in the task queue one by one through the FAT table management module;
and acquiring a FAT table from the FAT table management module, and returning the FAT table to the host side corresponding to the currently processed read-write command.
6. The FAT sharing method for the multi-host FAT file system according to claim 5, wherein the step of obtaining the read-write command for the FAT resources sent from each host to the storage module comprises:
initiating a read-write instruction aiming at the FAT resource at the host side;
granulating the read-write command to a read-write function through an API (application programming interface) interface to generate a read-write command, and issuing the read-write command;
and sending the read-write command to the storage module end so as to apply for the FAT resource to the storage module end.
7. The FAT sharing method for multi-host FAT file system according to claim 5, wherein the step of processing each read-write command in the task queue one by one through the FAT table management module comprises:
acquiring the receiving time of each read-write command;
adding the read-write commands into a task queue according to the time arrangement sequence according to the receiving time of the read-write commands;
and processing the read-write commands in the task queue one by one according to the time arrangement sequence.
8. The FAT sharing method for a multi-host FAT file system according to claim 5, wherein after the step of obtaining a FAT table from the FAT table management module and returning the FAT table to the host side corresponding to the currently processed read-write command, the method further comprises:
after detecting that the FAT table is modified, sending a first broadcast to each host end through the storage module end, wherein the first broadcast comprises the modification position of the FAT table;
after receiving the first broadcast, each host end judges whether the locally stored FAT table needs to be updated according to the modification position of the FAT table;
the host terminal which needs to update the locally stored FAT table sends a synchronous request aiming at the FAT table to the storage module terminal, and locally stores the modified FAT table after receiving the modified FAT table.
9. The FAT sharing method for a multi-host FAT file system according to any one of claims 5 to 8, wherein the FAT file system comprises a shared storage module subsystem, and the shared storage module subsystem comprises a plurality of the storage module terminals; the FAT sharing method further comprises the following steps:
and when detecting that the storage module end is newly added, sending a second broadcast to each host end so that each host end establishes communication connection with the newly added storage module end after receiving the second broadcast.
10. The FAT sharing method for a multi-host FAT file system according to any one of claims 5 to 8, wherein the FAT sharing system comprises a plurality of the storage module terminals, and each of the host terminals is associated with a corresponding storage module terminal;
the step of obtaining the read-write command for the FAT resources sent from each host to the storage module includes:
acquiring a current read-write command aiming at the FAT resource, which is sent to the associated storage module end by each host end;
the step of receiving the read-write command sent by each host end through the FAT table management module and adding each read-write command into a task queue includes:
when the associated storage module end receives a current read-write command sent by the associated host end, judging whether the number of tasks in the task queue of the associated storage module end reaches a preset value;
when the number of tasks in the task queue does not reach a preset value, adding a current read-write command into the associated task queue of the storage module end;
when the number of tasks in the task queue reaches a preset value, acquiring the number of tasks in the task queues of other storage module ends to determine whether other storage module ends with the number of tasks smaller than the preset value exist;
when other storage module ends with the task quantity smaller than the preset value exist, distributing the current read-write command to the storage module ends with the task quantity smaller than the preset value;
and when other storage module ends with the task number smaller than the preset value do not exist, adding the current read-write command into the associated task queue of the storage module end.
CN202011275079.0A 2020-11-16 2020-11-16 FAT sharing system and sharing method for multi-host FAT file system Active CN112069147B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011275079.0A CN112069147B (en) 2020-11-16 2020-11-16 FAT sharing system and sharing method for multi-host FAT file system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011275079.0A CN112069147B (en) 2020-11-16 2020-11-16 FAT sharing system and sharing method for multi-host FAT file system

Publications (2)

Publication Number Publication Date
CN112069147A true CN112069147A (en) 2020-12-11
CN112069147B CN112069147B (en) 2021-01-29

Family

ID=73655112

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011275079.0A Active CN112069147B (en) 2020-11-16 2020-11-16 FAT sharing system and sharing method for multi-host FAT file system

Country Status (1)

Country Link
CN (1) CN112069147B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113722166A (en) * 2021-08-27 2021-11-30 苏州浪潮智能科技有限公司 Out-of-band data access optimization method, system, device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101587427A (en) * 2008-05-23 2009-11-25 凤凰微电子(中国)有限公司 Method for realizing control of storage card by digital equipment by expanding SD/MMC protocol
EP1451686B1 (en) * 2001-12-05 2012-08-22 Scientific Atlanta, Inc. Disk driver cluster management of time shift buffer with file allocation table structure
CN103077249A (en) * 2013-01-28 2013-05-01 清华大学 FAT (file allocation table) system with two loading main bodies and using method thereof
CN104571950A (en) * 2014-12-24 2015-04-29 中国科学院信息工程研究所 Command identifying method for external storage medium
CN111373383A (en) * 2018-04-19 2020-07-03 西部数据技术公司 Memory cache management

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1451686B1 (en) * 2001-12-05 2012-08-22 Scientific Atlanta, Inc. Disk driver cluster management of time shift buffer with file allocation table structure
CN101587427A (en) * 2008-05-23 2009-11-25 凤凰微电子(中国)有限公司 Method for realizing control of storage card by digital equipment by expanding SD/MMC protocol
CN103077249A (en) * 2013-01-28 2013-05-01 清华大学 FAT (file allocation table) system with two loading main bodies and using method thereof
CN104571950A (en) * 2014-12-24 2015-04-29 中国科学院信息工程研究所 Command identifying method for external storage medium
CN111373383A (en) * 2018-04-19 2020-07-03 西部数据技术公司 Memory cache management

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113722166A (en) * 2021-08-27 2021-11-30 苏州浪潮智能科技有限公司 Out-of-band data access optimization method, system, device and storage medium
CN113722166B (en) * 2021-08-27 2023-07-14 苏州浪潮智能科技有限公司 Out-of-band data access optimization method, system, device and storage medium

Also Published As

Publication number Publication date
CN112069147B (en) 2021-01-29

Similar Documents

Publication Publication Date Title
US10884799B2 (en) Multi-core processor in storage system executing dynamic thread for increased core availability
CN107894913B (en) Computer system and storage access device
RU2427891C2 (en) Virtual network system of information storage, network storage device and virtual method
US9262346B2 (en) Prioritizing input/outputs at a host bus adapter
EP1920345B1 (en) Virtual data center for network resource management
US7793298B2 (en) Facilitating access to input/output resources via an I/O partition shared by multiple consumer partitions
US7437462B2 (en) Method for zoning data storage network using SAS addressing
JP5266590B2 (en) Computer system management method, computer system, and program
US8719484B2 (en) System and method for using a multipath
US9697024B2 (en) Interrupt management method, and computer implementing the interrupt management method
US20130290541A1 (en) Resource management system and resource managing method
US20170102874A1 (en) Computer system
US10678465B2 (en) Seamless migration of storage volumes between storage arrays
US20150370595A1 (en) Implementing dynamic virtualization of an sriov capable sas adapter
US10459773B2 (en) PLD management method and PLD management system
JP2003345631A (en) Computer system and allocating method for storage area
EP1966710B1 (en) Integrated circuit capable of independently operating a plurality of communication channels
US20120054393A1 (en) Computer system, i/o device control method, and i/o drawer
US10795608B2 (en) Computer, communication driver, and communication control method
US20100064301A1 (en) Information processing device having load sharing function
CA3129984A1 (en) Method and system for accessing distributed block storage system in user mode
CN112069147B (en) FAT sharing system and sharing method for multi-host FAT file system
KR100372915B1 (en) Network-attached disk system
KR101137085B1 (en) Managing of an initial program load in a logical partition of data storage system, a storage controller, and a computer readable storage medium
US20120089804A1 (en) Volume allocating method for virtual computers and computer system using the method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant