Control method and system for route construction software
By operating the reference storage space through the interface between user space and kernel space, the problem of low efficiency in updating storage devices by path building software is solved, and efficient updates without modifying driver code are achieved, simplifying software maintenance and reducing authentication costs.
Patent Information
- Application Number
- CN202511580977.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2045-10-31
AI Technical Summary
Existing path building software requires modification of driver code and WHQL certification when updating supported storage devices, resulting in low efficiency.
The installation program for the path building software runs in the user space of the target host. It allocates storage device information to the reference storage space by detecting the storage space in the kernel space, and calls the target interface between the user space and the kernel space to store the storage device information in the reference storage space. When the operating system kernel starts the target kernel driver, it determines the supported storage devices based on the data in the reference storage space.
This avoids modifying the driver code in kernel mode, saves time in adjusting paths and building software, improves adjustment efficiency, simplifies the software maintenance and upgrade process, and reduces the requirement for WHQL certification.
Smart Images

Figure CN121050785B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers, and particularly relates to a path construction software control method and system. BACKGROUND
[0002] With the continuous development of technologies such as the Internet of Things, big data, and artificial intelligence, data information in various industries is becoming increasingly large, and path construction software for constructing a data information transmission path between a storage device and a host is also attracting more and more attention. In the related art, the path construction software implements construction of a transmission path based on device information of a storage device maintained in a driver program. When it is necessary to update a storage device supported by the path construction software, the driver code needs to be modified and WHQL (Windows Hardware Quality Lab) certification needs to be re-performed, which consumes a large amount of time. SUMMARY
[0003] The present application provides a path construction software control method and system to at least solve the problem of low efficiency of adjusting path construction software in the related art.
[0004] The present application provides a path construction software control method, which includes the following steps: in a process of running an installation program of path construction software in a user mode of a target host, detecting, by the installation program, a reference storage space allocated for the path construction software in a storage space in a kernel mode of the target host, wherein the path construction software is used to construct a transmission path between the target host and a storage device connected to the target host according to a first storage device supported by a target kernel driver in the kernel mode, and the reference storage space is used to store a start attribute of a target kernel driver installed on the target host; in a case where the reference storage space is detected, calling, by the installation program in the user mode, a target interface between the user mode and the kernel mode; and storing, by the installation program, storage device information in the installation program into the reference storage space through the target interface, wherein the storage device information is used to indicate a second storage device, and an operating system kernel of the target host is used to determine the first storage device according to data stored in the reference storage space in a process of starting the target kernel driver.
[0005] The present application also provides a path construction software control system, which includes the foregoing installation program and the foregoing operating system kernel, the installation program is arranged in a user mode of a target host, the operating system kernel is a kernel of an operating system of the target host, and a target kernel driver of path construction software is further arranged in a kernel mode of the target host.
[0006] The present application also provides an electronic device, which includes a memory configured to store a computer program and a processor configured to execute the computer program to implement the steps of any one of the path construction software control methods.
[0007] The application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement the steps of the control method of any one of the path construction software.
[0008] The application further provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the steps of the control method of any one of the path construction software.
[0009] By the application, in the process of running the installation program of the path construction software in the user mode of the target host, the installation program detects a reference storage space allocated by the target host in the kernel mode for storing the start-up attribute of the kernel driver installed on the target host for the path construction software, in the case of detecting the reference storage space, the installation program calls a target interface between the user mode and the kernel mode in the user mode, the installation program stores the storage device information for indicating the second storage device in the installation program into the reference storage space through the target interface, and the operating system kernel of the target host is used to determine the first storage device supported by the target kernel driver of the path construction software in the kernel mode according to the data stored in the reference storage space in the process of starting the target kernel driver, that is, the reference storage space is operated by the installation program calling the target interface in the user mode, and the storage device supported by the target kernel driver is determined by the operating system kernel in the kernel mode according to the data stored in the reference storage space, so that the operation of adjusting the storage device supported by the path construction software no longer needs to modify the driver code in the kernel mode, unnecessary WHQL authentication operation is avoided, the time for adjusting the path construction software is saved, and therefore, the technical problem of low efficiency of adjusting the path construction software in the related art can be solved, and the technical effect of improving the adjustment efficiency of the path construction software is achieved. BRIEF DESCRIPTION OF DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0011] Figure 1 is a hardware structure block diagram of the control method of the path construction software according to the embodiments of the application;
[0012] Figure 2 is a flowchart of the control method of the path construction software according to the embodiments of the application;
[0013] Figure 3is a schematic diagram of an application scenario of a multi-path construction software according to an embodiment of the present application;
[0014] Figure 4 is a schematic diagram of a component of a multi-path construction software according to an embodiment of the present application;
[0015] Figure 5 is a flowchart of an installation method of a path construction software according to an embodiment of the present application;
[0016] Figure 6 is a flowchart of a multi-path kernel driver starting method of a path construction software according to an embodiment of the present application;
[0017] Figure 7 is a structural block diagram of a control device of a path construction software according to an embodiment of the present application. DETAILED DESCRIPTION
[0018] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0019] It should be noted that, in the description of the present application, the terms “comprise”, “contain” or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. The terms “first”, “second” and the like in the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0020] In order for those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0021] In combination with the specific application environment architecture or specific hardware architecture on which the execution of the control method of the path construction software depends, the specific application environment architecture or specific hardware architecture is described here.
[0022] The method embodiments provided in the embodiments of the present application can be executed in a server device or similar computing device. Taking the case of running on a server device, Figure 1 is a hardware structural block diagram of the control method of the path construction software according to the embodiments of the present application. As Figure 1 shown, the server device can include one or more ( Figure 1The server device shown in FIG. 1 includes one processor 102 (the processor 102 can include, but is not limited to, a central processing unit (CPU), a microprocessor (MCU), a programmable logic device (FPGA), or a processing device), and a memory 104 for storing data. The server device can further include a transmission device 106 for communication function and an input / output device 108. Those skilled in the art can understand that Figure 1 The structure shown in FIG. 1 is only illustrative and does not limit the structure of the server device. For example, the server device can include more or less components than those shown in FIG. 1, or have a different configuration than that shown in FIG. 1. Figure 1 Figure 1 The structure shown in FIG. 1 is only illustrative and does not limit the structure of the server device. For example, the server device can include more or less components than those shown in FIG. 1, or have a different configuration than that shown in FIG. 1.
[0023] The memory 104 can be used to store computer programs, such as software programs of application software and modules, such as a computer program corresponding to the control method of the path construction software in the embodiments of the present application. The processor 102 can execute various functional applications and data processing by running the computer programs stored in the memory 104, that is, implement the above-mentioned method. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, a flash memory, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, and the remote memory can be connected to the server device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0024] The transmission device 106 is used to receive or send data via a network. Specific examples of the network can include a wireless network provided by a communication service provider of the server device. In one example, the transmission device 106 includes a network adapter (NIC) which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module which is used to communicate with the Internet in a wireless manner.
[0025] The embodiments of the present application provide a control method of path construction software. The method is described in detail in combination with an execution flow of the control method of path construction software.
[0026] The following explains the professional terms appearing in the present application:
[0027] WHQL: Windows Hardware Quality Lab, the Chinese name is "Windows hardware device quality laboratory", is a hardware device and driver certification system, designed to ensure the compatibility and stability of products and Windows system through standardized testing.
[0028] MPIO: Multipath Input / Output, is a storage architecture, by configuring up to 32 standby data paths between storage devices, reduce the impact of HBA (Host Bus Adapter, host bus adapter) failure, to improve the redundancy and load balancing capability of Windows storage environment.
[0029] A control method of path construction software is provided in the embodiment, Figure 2 is a flow chart of the control method of path construction software according to the embodiment of the application, as Figure 2 shown, the method comprises the following steps:
[0030] Step S202, in the process of running the installation program of the path construction software in the user mode of the target host, the installation program detects the reference storage space allocated by the target host in the kernel mode for the path construction software, wherein the path construction software is used to construct the transmission path between the target host and the storage device connected to the target host according to the supported first storage device through the target kernel driver in the kernel mode, and the reference storage space is used to store the startup attribute of the target kernel driver installed on the target host;
[0031] Step S204, in the case of detecting the reference storage space, the installation program calls the target interface between the user mode and the kernel mode in the user mode;
[0032] Step S206, the installation program stores the storage device information in the installation program into the reference storage space through the target interface, wherein the storage device information is used to indicate the second storage device, and the operating system kernel of the target host is used to determine the first storage device according to the data stored in the reference storage space in the process of starting the target kernel driver.
[0033] In the process of running the installation program of the path construction software in the user mode of the target host through the above steps, the reference storage space allocated by the installation program to the path construction software in the storage space of the target host in the kernel mode for storing the boot attribute of the kernel driver installed on the target host is detected by the installation program, in the case of detecting the reference storage space, the target interface between the user mode and the kernel mode is called by the installation program in the user mode, the storage device information in the installation program for indicating the second storage device is stored into the reference storage space by the installation program through the target interface, the operating system kernel of the target host is used to determine the first storage device supported by the target kernel driver of the path construction software in the kernel mode according to the data stored in the reference storage space in the process of booting the target kernel driver, that is, the reference storage space is operated by the installation program in the user mode through the target interface, and the storage device supported by the target kernel driver is determined by the operating system kernel in the kernel mode according to the data stored in the reference storage space, the operation of adjusting the storage device supported by the path construction software no longer needs to modify the driver code in the kernel mode, unnecessary WHQL authentication operation is avoided, the time of adjusting the path construction software is saved, therefore, the technical problem of low efficiency of adjusting the path construction software in the related art can be solved, and the technical effect of improving the adjustment efficiency of the path construction software is achieved.
[0034] In the embodiment provided in step S202, the path construction software can but is not limited to be used to construct the transmission path between the target host and the storage device connected to the target host through the target kernel driver in the kernel mode according to the supported first storage device, the path construction software can but is not limited to fall back to using a predefined default path strategy or prompting the user that the storage device is not supported in the case that the device information of the storage device connected to the target host recognized by the target kernel driver does not fall within the range of the first storage device supported by the target kernel driver, resulting in that the function of the path construction software cannot be normally used. Therefore, in order to ensure the normal use of the path construction software, the first storage device supported by the target kernel driver can but is not limited to need to be updated in time.
[0035] Optionally, in the embodiment, the path construction software can include, but is not limited to, a multi-path construction software, and store a plurality of paths. The multi-path construction software is a technology that can select an alternative path to enable an application to still access data in a network storage device when a storage physical link path fails, and use more than one physical path to access the network storage device. The multi-path construction software can use a plurality of input / output routing strategies such as fault tolerance and traffic load balancing to provide higher availability and performance advantages for network storage applications. The multi-path construction software can be used to construct a plurality of transmission paths between a target host and a storage device connected to the target host according to a first storage device supported by a target kernel driver in a kernel mode. If the target kernel driver identifies that device information of the storage device connected to the target host does not fall within the range of the first storage device supported by the target kernel driver, the multi-path construction software can ignore the storage device. Even if a plurality of connection cables have been connected between the storage device and the target host, the multi-path construction software cannot construct a plurality of transmission paths between the storage device and the target host. Therefore, in order to ensure the normal construction of the plurality of transmission paths, the first storage device supported by the target kernel driver needs to be updated in time.
[0036] Optionally, in the embodiment, Figure 3 is a schematic diagram of an application scenario of a multi-path construction software according to an embodiment of the present application, as Figure 3 shown, a storage system can be used by a plurality of business hosts (for example, host A, host B, and the like shown in Figure 3 . User business application software services on the hosts use volumes provided by the storage system for data access, and load balancing and fault redundancy are achieved through storage system multi-path software (i.e., path construction software). However, if the device information of the storage system does not fall within the range of a first storage device supported by the storage system multi-path software on the host A, load balancing and fault redundancy between the host A and the storage system cannot be achieved.
[0037] Optionally, in the embodiment, the installation program can be used to install the path construction software on the target host. Figure 4 is a schematic diagram of a component of a multi-path construction software according to an embodiment of the present application, as Figure 4As shown, the path construction software can include, but is not limited to, multi-path construction software, which can include, but is not limited to, an installer, a multi-path service, and a command line tool in a user mode, and a multi-path kernel driver in a kernel mode. The installer can provide a unified entry and function to achieve automatic installation of the multi-path kernel driver, the user-mode multi-path command line tool, and the user-mode multi-path service. The multi-path service can cooperate with the kernel-mode multi-path driver to complete basic functions such as periodic detection of path status and kernel-mode log saving. The path command line tool can interact with the kernel-mode multi-path kernel driver to achieve basic functions such as path device information query display, path selection policy setting and maintenance, and path management. The multi-path kernel driver can be the core of the multi-path software, and can implement functions such as identification and discovery of supported storage volume devices, aggregation, and Input / Output (I / O) routing management in the kernel mode.
[0038] Optionally, in this embodiment, the installer of the path construction software can detect a reference storage space allocated by the target host in a kernel-mode storage space of the target host for the path construction software during a process in which the installer of the path construction software is run in a user mode of the target host to install the path construction software. The kernel-mode storage space can be a part of a storage area in a kernel-mode running environment, and can be used to store data structures, variables, configuration information, and other data closely related to driver operation of the kernel driver itself. The reference storage space can be a storage area allocated by an operating system for the kernel driver of the path construction software. The area can be used to store startup attributes of the target kernel driver.
[0039] Optionally, in this embodiment, the kernel-mode storage space can include a system registry.
[0040] Optionally, in this embodiment, the startup attributes can include a driver name of the target kernel driver and a startup type of the target kernel driver.
[0041] Optionally, in this embodiment, the installer can monitor a running progress of itself, and can determine that the reference storage space is detected when it is detected that the installer completes installation of the target kernel driver. Alternatively, the installer can constantly attempt to open the reference storage space through a reference interface between the user mode and the kernel mode, and can determine that the reference storage space is detected when the reference storage space is successfully opened. The reference interface can be a function interface determined according to a RegOpenKeyEx function.
[0042] In the embodiment provided in step S204, in the case that the reference storage space is detected, the target interface between the user mode and the kernel mode can be invoked by the installer in the user mode, but is not limited thereto, to provide a possibility for transmitting the storage device information maintained in the installer to the target kernel driver through the isolation between the user mode and the kernel mode.
[0043] Optionally, in the embodiment, after confirming the existence of the reference storage space through the foregoing operation, the target interface can be invoked again by using the foregoing reference interface, in combination with the index information of the reference storage space returned by the kernel mode in the case that the reference storage space is successfully opened.
[0044] Optionally, in the embodiment, the target interface can be used for writing data to the reference storage space, but is not limited thereto. Optionally, the target interface herein can be a function interface determined according to the RegSetValueEx function.
[0045] In the embodiment provided in step S206, the storage device information maintained in the installer can be stored into the reference storage space in the kernel mode by the installer through the target interface, but is not limited thereto.
[0046] Optionally, in the embodiment, the storage device information can be used for indicating the second storage device, but is not limited thereto. The second storage device herein can be a storage device supported by the newly-added path construction software (or referred to as a storage device supported by the target kernel driver), or can be a storage device supported by the path construction software after being changed (or referred to as a storage device supported by the target kernel driver), but is not limited thereto, and the present application does not make a specific limitation thereon.
[0047] Optionally, in the embodiment, the storing, by the installer, of the storage device information in the installer into the reference storage space through the target interface can but is not limited to include: detecting, by the installer, whether a mark value of a mark bit set in the reference storage space is a first mark value through the target interface; reading, by the installer, initial device information from the reference storage space through the target interface in a case where it is detected that the mark value is the first mark value, wherein the initial mark value of the mark bit is the first mark value, the first mark value is used to indicate that the first write operation is to be performed by the installer, and the initial device information is used to indicate the current first storage device; merging, by the installer, the initial device information and the storage device information to obtain final device information; writing, by the installer, the final device information into the reference storage space through the target interface, and setting, by the installer, the mark value to a second mark value through the target interface, wherein the second mark value is used to indicate that the second write operation is to be performed by the operating system kernel, and the operating system kernel is used to: detect whether the mark value is the second mark value; and in a case where it is detected that the mark value is the second mark value, set the mark value to the first mark value, and replace the initial device information in the target storage space with the final device information to obtain the first storage device. Through the above scheme, a non-blocking communication mechanism is formed, the operations of the installer and the kernel do not interfere with each other, and the response speed and overall running efficiency are improved. The introduction of the mark bit and the read-write separation mechanism ensure the stable operation of the kernel mode, and even if the user mode program is abnormal, the normal work of the kernel is not affected. At the same time, because the read-write operation is controlled, potential security risks are also reduced. The updating of the device information no longer needs to directly modify the kernel program, but only needs to adjust the installer in the user mode, greatly simplifying the maintenance and upgrading process of the software, reducing the need for WHQL re-certification, saving certification time and cost.
[0048] As an optional implementation, the calling, by the installer, of the target interface between the user mode and the kernel mode in the user mode can but is not limited to include: obtaining, by the installer, a first function interface and a second function interface, wherein the first function interface is used to create a storage location in a storage space in the kernel mode, and the second function interface is used to write data to the storage location in the kernel mode; generating, by the installer, a third function interface using the first function interface, wherein the third function interface is used to create a target storage location in a reference storage space in the kernel mode; generating, by the installer, a fourth function interface according to the third function interface and the second function interface, wherein the fourth function interface is used to write storage device information to the target storage location in the kernel mode, and the target interface includes the fourth function interface.
[0049] Optionally, in the embodiment, the first function interface can but is not limited to be used to create a storage location in a storage space in the kernel mode, and the first function interface can but is not limited to be a RegCreateKeyEx function or the like.
[0050] Optionally, in this embodiment, the second function interface can be, but is not limited to, used for writing data to a storage location in the kernel state, and the second function interface can be, but is not limited to, a RegSetValueEx function, etc.
[0051] Through the above steps, by obtaining and using the first function interface and the second function interface, the installer is able to interact with the kernel state in a standardized manner. This not only simplifies the maintenance and upgrade of the driver program, but also improves the scalability and security of the path building software, because the storage and reading of data are controlled through explicit interfaces, avoiding instability and security vulnerabilities that may be caused by direct operation of the kernel space.
[0052] As an optional implementation, generating the third function interface by the installer using the first function interface can include, but is not limited to: writing, by the installer, a storage path of a reference storage space into a first position in the first function interface, and writing a storage sub-path of a target storage location into a second position in the first function interface, to obtain the third function interface, wherein the third function interface is used to create the storage sub-path on the storage path in the kernel state.
[0053] Through the above steps, by specifying the storage path and the storage sub-path in the first function interface, the installer is able to accurately create the target storage location in the reference storage space in the kernel state. This mechanism ensures that the storage device information can be written in the correct location, and also provides a structured framework for subsequent reading and management. By creating a specific path to store data, data conflicts between different driver programs can be avoided, enhancing the compatibility and stability of the path building software.
[0054] As an optional implementation, generating the fourth function interface by the installer according to the third function interface and the second function interface can include, but is not limited to: sending, by the installer, the third function interface to the operating system kernel; receiving, by the installer, a target location identifier returned by the operating system kernel in response to the third function interface, wherein the target location identifier is used to indicate that the storage sub-path of the target storage location is allowed to write data; writing, by the installer, the target location identifier into a third position in the second function interface, and writing the storage device information into a fourth position in the second function interface, to obtain the fourth function interface, wherein the fourth function interface is used to write the storage device information through the target location identifier.
[0055] Optionally, in this embodiment, the target location identifier can be, but is not limited to, used to indicate that the storage sub-path of the target storage location is allowed to write data, and the target location identifier can be, but is not limited to, a storage sub-path operation handle returned by the operating system kernel in response to the RegCreateKeyEx function.
[0056] Through the above steps, in the process of generating the fourth function interface, the target location identifier is written as a data permission identifier, ensuring that the storage device information can only be written to the target storage location if the verification is passed. This permission management mechanism improves the security of the system, preventing unauthorized write operations, while ensuring data consistency and integrity through bidirectional communication with the kernel.
[0057] As an optional implementation, after the third function interface is sent to the operating system kernel by the installer, the third function interface can be received by the operating system kernel, but is not limited to, wherein the third function interface is used to create a storage sub-path on the storage path of the reference storage space in the kernel state; the operating system kernel searches for the storage sub-path in the storage path in response to the third function interface; in the case of finding the storage sub-path, the operating system kernel obtains the first identifier corresponding to the storage sub-path as the target location identifier; in the case of not finding the storage sub-path, the operating system kernel creates the storage sub-path in the storage path and generates a second identifier corresponding to the storage sub-path as the target location identifier; and the target location identifier is sent to the installer.
[0058] Optionally, in this embodiment, after receiving the third function interface, the operating system kernel can first search for the storage sub-path. In the case of finding the storage sub-path, that is, the storage sub-path has been created in advance, the first identifier corresponding to the storage sub-path is obtained.
[0059] Optionally, in this embodiment, the corresponding identifier can be matched for the storage sub-path in the path and identifier with the corresponding relationship to obtain the first identifier. In the case that the corresponding identifier cannot be matched for the storage sub-path, an identifier in the identifier pool is extracted as the first identifier for the storage sub-path, and the storage sub-path with the corresponding relationship and the first identifier are stored in the path and identifier with the corresponding relationship, wherein each identifier in the identifier pool is different from each other.
[0060] Optionally, in this embodiment, the operating system kernel can create the storage sub-path in the storage path and generate the second identifier corresponding to the storage sub-path as the target location identifier in the case of not finding the storage sub-path, that is, the storage sub-path has not been created.
[0061] Optionally, in this embodiment, generating the second identifier corresponding to the storage sub-path as the target location identifier can include, but is not limited to, calculating the second identifier according to the target function and the storage sub-path. In this case, the operating system kernel can calculate the storage sub-path according to the inverse function of the target function and the target location identifier when receiving the fourth function interface.
[0062] Optionally, in the embodiment, generating the second identifier corresponding to the storage sub-path as the target location identifier can further include, but is not limited to, extracting an identifier from an identifier pool as the second identifier for the storage sub-path, and storing the storage sub-path and the second identifier having a corresponding relationship into the path and identifier having a corresponding relationship, wherein each identifier in the identifier pool is different from each other.
[0063] Through the above steps, the kernel can intelligently perform corresponding processing according to the presence or absence of the storage sub-path after receiving the third function interface, and the generation and sending of the target location identifier, thereby ensuring orderly data exchange between the user mode and the kernel mode, and improving the execution efficiency and reliability of the path construction software.
[0064] As an optional implementation, storing the storage device information in the installation program into the reference storage space through the target interface by the installation program can include, but is not limited to, sending, by the installation program, a fourth function interface to the operating system kernel, wherein the fourth function interface is used to write the storage device information through the target location identifier, the target location identifier is used to indicate that the storage sub-path of the target storage location in the reference storage space is allowed to write data, and the target interface includes the fourth function interface.
[0065] Through the above steps, the storage device information is accurately written to the specified location of the reference storage space through the fourth function interface, and the operating system kernel can read these information when the target kernel driver is started, and then update the storage device supported by the target kernel driver. This method avoids the need to directly modify the driver source code, reduces the maintenance cost, and at the same time ensures the stability and compatibility of the driver program.
[0066] As an optional implementation, after sending the fourth function interface to the operating system kernel by the installation program, the operating system kernel can receive the fourth function interface; the operating system kernel can verify the target location identifier in response to the fourth function interface; and in the case that the target location identifier passes the verification, the operating system kernel can write the storage device information into the storage sub-path.
[0067] Optionally, in the embodiment, the operating system kernel can verify the target location identifier, which can include, but is not limited to, searching the target location identifier in the path and identifier having a corresponding relationship. In the case that the target location identifier is found in the path and identifier having a corresponding relationship, it is determined that the target location identifier passes the verification, and the path corresponding to the target location identifier is searched in the path and identifier having a corresponding relationship to obtain the storage sub-path.
[0068] Optionally, in the embodiment, the verification of the target location identifier by the operating system kernel can further include, but is not limited to, calculating a path from the target location identifier by using the stored inverse function; and determining that the target location identifier passes the verification if the calculated path is identifiable.
[0069] Through the above steps, the kernel verifies the target location identifier before writing the storage device information, and ensures the legality of data writing. This mechanism prevents erroneous or malicious data modification, and ensures the safe operation of the system and the driver.
[0070] As an optional implementation, after the installation program stores the storage device information in the reference storage space through the target interface, the installation program can further obtain a target path of a host storage space on the target host, where the host storage space is used to store device information of a fourth storage device supported by the operating system kernel, and the installation program can further add the storage device information to the target path.
[0071] Optionally, in the embodiment, after the installation program stores the storage device information in the reference storage device through the target interface, the installation program can further register the second storage device indicated by the storage device information to the target path of the host storage space, i.e., the installation program can further update the fourth storage device supported by the operating system kernel.
[0072] Optionally, in the embodiment, the installation program can further add the storage device information to the target path, which can further include: generating a sixth function interface by the installation program using a fifth function interface, where the fifth function interface is used to obtain a location identifier of a path, and the sixth function interface is used to obtain a location identifier of the target path; sending the sixth function interface to the operating system kernel by the installation program; receiving a reference location identifier returned by the operating system kernel in response to the sixth function interface, where the reference location identifier is used to indicate that data is allowed to be written to the target path of the host storage space; writing the reference location identifier to a third location in the second function interface and writing the storage device information to a fourth location in the second function interface to obtain a seventh function interface, where the seventh function interface is used to write the storage device information through the reference location identifier; and sending the seventh function interface to the operating system kernel by the installation program, where the operating system kernel is used to: receive the seventh function interface; verify the reference location identifier in response to the seventh function interface; and write the storage device information to the target path if the reference location identifier passes the verification.
[0073] Optionally, in the embodiment, the adding, by the installer, the storage device information into the target path can further include, but is not limited to: generating, by the installer, a sixth function interface using a fifth function interface, wherein the fifth function interface is used to obtain the location identifier of the path, and the sixth function interface is used to obtain the location identifier of the target path; sending, by the installer, the sixth function interface to the operating system kernel; receiving, by the installer, a reference location identifier returned by the operating system kernel in response to the sixth function interface, wherein the reference location identifier is used to indicate that the target path of the host storage space is allowed to write data; writing, by the installer, the reference location identifier into a fifth location in an eighth function interface to obtain a ninth function interface, wherein the eighth function interface is used to obtain data of the storage space in the kernel mode, and the ninth function interface is used to obtain the data through the reference location identifier; sending, by the installer, the ninth function interface to the operating system kernel; receiving, by the installer, host device information returned by the operating system kernel in response to the ninth function interface, wherein the host device information is used to indicate the fourth storage device currently supported by the operating system kernel; screening, by the installer, new device information from the storage device information according to the host device information, wherein the new device information is used to indicate new storage devices different from the storage devices indicated by the host device information in the storage device information; writing, by the installer, the reference location identifier into a third location in the second function interface and writing the new device information into a fourth location in the second function interface to obtain a tenth function interface, wherein the tenth function interface is used to write the new device information through the reference location identifier; sending, by the installer, the tenth function interface to the operating system kernel, wherein the operating system kernel is used to: receive the tenth function interface; verify the reference location identifier in response to the tenth function interface; and write, by the operating system kernel, the new device information into the target path in a case where the reference location identifier passes the verification. Through the above steps, not only the security and accuracy of the storage device information management are improved, but also the dynamic expansion capability and system efficiency of the software are greatly optimized, and a more flexible and efficient solution is provided for the upgrade and maintenance of the path construction software.
[0074] Through the above steps, after the writing of the storage device information is completed, the installer further adds the information into the target path of the host storage space, so that the information in the operating system kernel and the host storage space is kept consistent, and the newly added storage device can also be normally recognized and used by the operating system kernel.
[0075] Figure 5 is a flowchart of an installation method of a path construction software according to an embodiment of the present application, as shown in Figure 5As shown, in order to update the storage devices supported by the path construction software, the storage brand information (i.e., the storage device information) of the newly added support can be first maintained in the user-mode installer, the process of registering the storage brand to the MPIO is extracted from the installation information file and executed in the user-mode installer, avoiding the need to modify the installation information file when adding new brand information, and secondly, the installer writes the newly added storage brand information to the system registry (i.e., the aforementioned storage space in the kernel mode), and the storage brand information maintained in the kernel driver file (i.e., the aforementioned target kernel driver) is dynamically read from the system registry when the kernel driver is loaded.
[0076] Specifically, the installation steps of the multi-path construction software include:
[0077] Step SA1, the user runs the user-mode installer, the installer reads the kernel driver installation information file, and completes the copying of the driver file to the system driver installation directory and the registration of related information.
[0078] Step SA2, the installer copies the multi-path service related files to the multi-path installation directory, completes the service related registry information writing, and completes the service startup automatic setting.
[0079] Step SA3, the installer copies the multi-path command line tool related files to the multi-path installation directory.
[0080] Step SA4, the installer writes the newly added storage brand information (i.e., the aforementioned storage device information) to the Vender item (i.e., the aforementioned storage sub-path) under the registry path (i.e., the aforementioned reference storage space storage path) corresponding to the multi-path kernel driver (i.e., the aforementioned target kernel driver) (SYSTEM\CurrentControlSet\Services\InPathDSM) according to the newly added storage brand information (i.e., the aforementioned storage device information) maintained by itself, and the driver name, startup type and other information (i.e., startup attribute) registered in the installation information file are in the same registry path. This step realizes the function supplement of the kernel mode multi-path driver, and the kernel mode multi-path driver needs to dynamically read the storage brand information under this registry item when starting, and complete the initialization of the entire supported storage brand list. Unlike the traditional kernel mode driver which is designed and implemented as a complete and independent user-mode program, the original kernel mode driver independent design mode is broken.
[0081] When the API function is invoked to write the newly added storage brand information, the operation handle (i.e. the aforementioned target location identifier) of the corresponding path (SYSTEM\CurrentControlSet\Services\InPathDSM\Vender) is obtained through the RegCreateKeyEx function (i.e. the aforementioned first function interface), which is used to create a specified registry item according to a path. If the key already exists, the function will open it. When the brand information is written into the registry Vender item, the operation handle of the registry path obtained by the RegCreateKeyEx function and the storage brand information (i.e. the aforementioned storage device information) to be set are passed to the RegSetValueEx function (i.e. the aforementioned second function interface), so as to write the storage brand information (i.e. the aforementioned storage device information) into the registry SYSTEM\CurrentControlSet\Services\InPathDSM\Vender.
[0082] In step SA5, the installer invokes the system registry related user mode API function to write the storage brand information (i.e. the aforementioned storage device information) into the system MPIO corresponding registry item (the MPIOSupportedDeviceList item under the registry SYSTEM\CurrentControlSet\Control\MPDEV path) according to the newly added storage brand information maintained by itself, and completes the registration to MPIO.
[0083] Specifically, the operation handle (i.e. the aforementioned reference location identifier) of the MPIO corresponding registry path (SYSTEM\CurrentControlSet\Control\MPDEV) (i.e. the aforementioned target path) is obtained through the API function RegOpenKeyEx (i.e. the aforementioned fifth function interface), the API function RegQueryValueEx (i.e. the aforementioned eighth function interface) is invoked to query all the storage brand information (which may include other storage manufacturers registered storage brands and the previously installed low version multi-path registered self storage brand information) (i.e. the aforementioned host device information) registered by the current operating system MPIO according to the operation handle obtained in the previous step and the registry MPIOSupportedDeviceList item, and whether the current multi-path newly added storage brand has been registered in the system is compared one by one. If it has been registered, it will not be registered again. If it has not been registered, the current newly added storage brand is registered in the system MPIO.
[0084] As an optional implementation, after the installation program stores the storage device information in the installation program into the reference storage space through the target interface, the operating system kernel can extract the storage device information from the reference storage space, but is not limited to, in the process of starting the target kernel driver.
[0085] Optionally, in this embodiment, after the installation program transfers the storage device information from the user state to the kernel state, the operating system kernel can determine the first storage device that the target kernel driver should currently support according to the storage device information, but is not limited to.
[0086] Through the above steps, when the target kernel driver starts, the operating system kernel reads the storage device information from the reference storage space to determine the first storage device supported by the kernel driver. This mechanism ensures that the target kernel driver can quickly and accurately identify and configure the storage device when starting, improving the efficiency and accuracy of path construction.
[0087] As an optional implementation, the operating system kernel extracts the storage device information from the reference storage space, which can include but is not limited to: the operating system kernel sends a read request to the reference storage space, wherein the read request is used to request reading data on the target storage location in the reference storage space; the operating system kernel receives the storage device information returned by the reference storage space in response to the read request.
[0088] Optionally, in this embodiment, the operating system kernel can construct a read request by a registry read function and a storage sub-path to read the storage device information from the target storage location.
[0089] Optionally, in this embodiment, the aforementioned registry read function can be but is not limited to RtlQueryRegistryValues function, etc.
[0090] As an optional implementation, the operating system kernel determines the first storage device according to the storage device information, which can include but is not limited to: the operating system kernel extracts reference device information from the target storage space of the target kernel driver, wherein the reference device information is used to indicate the third storage device currently supported by the target kernel driver; the operating system kernel merges the storage device information and the reference device information to obtain target device information; the operating system kernel replaces the reference device information in the target storage space with the target device information to obtain the first storage device.
[0091] By the above steps, by merging the storage device information and the reference device information, the target device information is generated and applied to the storage space of the target kernel driver, realizing the updating and expansion of the supported devices. This method not only improves the flexibility of device management, but also ensures that the kernel driver can adapt to the changing device environment, enhancing the adaptability and competitiveness of the path construction software.
[0092] Figure 6 is a flowchart of a multi-path kernel driver startup method of a path construction software according to an embodiment of the present application, as shown in Figure 6 The startup steps of the multi-path kernel driver, i.e. the target kernel driver, include:
[0093] Step SQ1, when the operating system starts, the multi-path kernel driver startup type (i.e. the startup attribute mentioned above) registered in the registry is loaded and initialized when the system starts;
[0094] Step SQ2, when the multi-path kernel driver is initialized, the DriverEntry entry function is called, and the relevant kernel state API function (i.e. the RtlQueryRegistryValues function) is operated through the system registry to read and parse the newly added storage brand information (i.e. the storage device information mentioned above) from the Vender item (i.e. the target storage location mentioned above) of the registry path (SYSTEM\CurrentControlSet\Services\InPathDSM) written by the multi-path user state installer during installation.
[0095] Step SQ3, when the multi-path kernel driver is initialized, based on the default storage brand information supported by the kernel state (i.e. the reference device information mentioned above) and the newly added storage brand information read from the registry (i.e. the storage device information mentioned above), the complete storage brand information list supported by the multi-path kernel driver (i.e. the target device information mentioned above) is obtained.
[0096] Through the above method, the storage brand information list is maintained by the kernel state driver, which is divided into two parts, one part of the default supported brand information is maintained by the kernel state, and the other part of the extended new brand information is maintained by the user state installer, which is written to the system registry during installation. The kernel state multi-path driver startup initialization process reads the extended storage brand information from the system registry, merges it with the default storage brand list maintained by itself, and obtains the complete storage brand information list supported by the current multi-path driver. If there is a newly supported storage brand, only the installer needs to be modified to extend the newly supported storage brand information, without modifying the kernel state multi-path driver, and thus without re-performing the WHQL certification of the kernel state multi-path driver.
[0097] By decoupling the multi-path supported storage brand information list from the kernel driver, the registration process of the new brand information is transferred from the kernel state to the user state, avoiding frequent modification of the kernel driver code due to the addition of brand information, thereby reducing the number of WHQL certifications, reducing the cost of manpower and time. Reduce the version delivery delay caused by WHQL certification, so that the function of adding brand support can be faster to the market, improve the competitiveness and market response speed of the product.
[0098] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment.
[0099] The embodiment of the application also provides a path construction software control system, which comprises the installation program in the path construction software control method and the operating system kernel in the path construction software control method, the installation program is arranged in the user state of the target host, and the operating system kernel is the kernel of the operating system of the target host. The kernel state of the target host also has a target kernel driver of the path construction software.
[0100] Through the above path construction software control system, in the process of running the installation program of the path construction software in the user state of the target host, the reference storage space for storing the start-up attributes of the kernel driver installed on the target host is allocated by the installation program in the storage space in the kernel state of the target host. In the case of detecting the reference storage space, the target interface between the user state and the kernel state is called by the installation program in the user state, the storage device information of the second storage device in the installation program is stored into the reference storage space by the installation program through the target interface, and the operating system kernel of the target host is used to determine the first storage device supported by the target kernel driver of the path construction software in the kernel state according to the data stored in the reference storage space in the process of starting the target kernel driver. That is, by calling the target interface in the user state through the installation program to operate the reference storage space and by determining the storage device supported by the target kernel driver according to the data stored in the reference storage space in the kernel state through the operating system kernel, the operation of adjusting the storage device supported by the path construction software no longer needs to modify the driver code in the kernel state, avoiding unnecessary WHQL certification operation, saving the time of adjusting the path construction software, and thus the technical problem of low efficiency of adjusting the path construction software in the related art can be solved, and the technical effect of improving the adjustment efficiency of the path construction software is achieved.
[0101] The features of the embodiments of the control system of the path construction software can refer to the related descriptions of the embodiments of the control method of the path construction software, which will not be repeated here.
[0102] The embodiments of the present application also provide a control device of path construction software, Figure 7 is a structural block diagram of a control device of path construction software according to an embodiment of the present application, as shown in the figure, the device comprises: Figure 7
[0103] The detection module 702 is configured to detect, by the installation program, a reference storage space allocated by the target host for the path construction software in a kernel state during a process of running an installation program of the path construction software in a user state of the target host, wherein the path construction software is used to construct a transmission path between the target host and a storage device connected to the target host according to a supported first storage device through a target kernel driver in the kernel state, and the reference storage space is used to store a startup attribute of the target kernel driver installed on the target host.
[0104] The calling module 704 is configured to call, by the installation program, a target interface between the user state and the kernel state in the user state in a case where the reference storage space is detected.
[0105] The storage module 706 is configured to store, by the installation program, storage device information in the installation program into the reference storage space through the target interface, wherein the storage device information is used to indicate the second storage device, and an operating system kernel of the target host is used to determine the first storage device according to the data stored in the reference storage space during a process of starting the target kernel driver.
[0106] In the process of running the installation program of the path construction software in the user mode of the target host, the reference storage space allocated by the installation program to the path construction software for storing the start-up attribute of the kernel driver installed on the target host in the storage space in the kernel mode of the target host is detected, in the case of detecting the reference storage space, the target interface between the user mode and the kernel mode is called by the installation program in the user mode, the storage device information in the installation program for indicating the second storage device is stored into the reference storage space by the installation program through the target interface, and the operating system kernel of the target host is used to determine the first storage device supported by the target kernel driver of the path construction software in the kernel mode according to the data stored in the reference storage space in the process of starting the target kernel driver, that is, the reference storage space is operated by the installation program in the user mode through the target interface, and the storage device supported by the target kernel driver is determined according to the data stored in the reference storage space by the operating system kernel in the kernel mode, so that the operation of adjusting the storage device supported by the path construction software no longer needs to modify the driver code in the kernel mode, unnecessary WHQL authentication operation is avoided, the time for adjusting the path construction software is saved, and therefore, the technical problem of low efficiency of adjusting the path construction software in the related art can be solved, and the technical effect of improving the adjustment efficiency of the path construction software is achieved.
[0107] In some embodiments, the calling module comprises: a first obtaining unit configured to obtain, by the installation program, a first function interface and a second function interface, wherein the first function interface is configured to create a storage location in a storage space in a kernel mode, and the second function interface is configured to write data to the storage location in the kernel mode; a first generating unit configured to generate, by the installation program, a third function interface using the first function interface, wherein the third function interface is configured to create a target storage location in a reference storage space in the kernel mode; and a second generating unit configured to generate, by the installation program, a fourth function interface according to the third function interface and the second function interface, wherein the fourth function interface is configured to write storage device information to the target storage location in the kernel mode, and the target interface comprises the fourth function interface.
[0108] In some embodiments, the first generating unit is further configured to: write, by the installation program, a storage path of the reference storage space to a first position in the first function interface, and write a storage sub-path of the target storage location to a second position in the first function interface, to obtain the third function interface, wherein the third function interface is configured to create the storage sub-path on the storage path in the kernel mode.
[0109] In some embodiments, the second generating unit is further configured to: send, by the installer, a third function interface to the operating system kernel; receive, by the installer, a target location identifier returned by the operating system kernel in response to the third function interface, wherein the target location identifier is used to indicate that data is allowed to be written to a storage sub-path of a target storage location; write, by the installer, the target location identifier to a third location in the second function interface and write storage device information to a fourth location in the second function interface to obtain a fourth function interface, wherein the fourth function interface is used to write the storage device information through the target location identifier.
[0110] In some embodiments, the calling module further includes: a first receiving unit configured to receive, by the operating system kernel, a third function interface, wherein the third function interface is used to create a storage sub-path on a storage path of a reference storage space in a kernel mode; a searching unit configured to search, by the operating system kernel, for the storage sub-path in the storage path in response to the third function interface; a second obtaining unit configured to, in a case where the storage sub-path is found, obtain, by the operating system kernel, a first identifier corresponding to the storage sub-path as a target location identifier; a creating unit configured to, in a case where the storage sub-path is not found, create, by the operating system kernel, the storage sub-path in the storage path and generate a second identifier corresponding to the storage sub-path as the target location identifier; and send, by the operating system kernel, the target location identifier to the installer.
[0111] In some embodiments, the storage module includes: a first sending unit configured to send, by the installer, a fourth function interface to the operating system kernel, wherein the fourth function interface is used to write storage device information through a target location identifier, the target location identifier is used to indicate that data is allowed to be written to a storage sub-path of a target storage location in a reference storage space, and the target interface includes the fourth function interface.
[0112] In some embodiments, the storage module further includes: a second receiving unit configured to receive, by the operating system kernel, the fourth function interface; a verifying unit configured to verify, by the operating system kernel, the target location identifier in response to the fourth function interface; and a writing unit configured to, in a case where the target location identifier passes the verification, write, by the operating system kernel, the storage device information to the storage sub-path.
[0113] In some embodiments, the control device of the path construction software further includes: an extracting module configured to extract, by the operating system kernel, storage device information from a reference storage space in a process of starting a target kernel driver; and a determining module configured to determine, by the operating system kernel, a first storage device according to the storage device information.
[0114] In some embodiments, the extracting module comprises: a second sending unit configured to send, by the operating system kernel, a read request to the reference storage space, wherein the read request is configured to request reading data at a target storage location in the reference storage space; and a third receiving unit configured to receive, by the operating system kernel, storage device information returned by the reference storage space in response to the read request.
[0115] In some embodiments, the determining module comprises: an extracting unit configured to extract, by the operating system kernel, reference device information from the target storage space of the target kernel driver, wherein the reference device information is configured to indicate a third storage device currently supported by the target kernel driver; a merging unit configured to merge, by the operating system kernel, the storage device information and the reference device information to obtain target device information; and a replacing unit configured to replace, by the operating system kernel, the reference device information in the target storage space with the target device information to obtain the first storage device.
[0116] In some embodiments, the control apparatus of the path construction software further comprises: an obtaining module configured to obtain, by the installer, a target path of a host storage space on the target host, wherein the host storage space is configured to store device information of a fourth storage device supported by the operating system kernel; and an adding module configured to add, by the installer, the storage device information to the target path.
[0117] The features of the embodiments of the control apparatus of the path construction software can be understood in the light of the related descriptions of the embodiments of the control method of the path construction software, which will not be repeated here.
[0118] Embodiments of the present application further provide an electronic device comprising a memory and a processor, the memory storing a computer program, and the processor being configured to run the computer program to perform the steps in any of the embodiments of the control method of the path construction software.
[0119] Embodiments of the present application further provide a computer readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the embodiments of the control method of the path construction software when running.
[0120] In an example embodiment, the computer readable storage medium described above can be, but is not limited to, a computer non-volatile readable storage medium.
[0121] In an example embodiment, the computer readable storage medium described above can include, but is not limited to, a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0122] The embodiment of the present application further provides a computer program product, which comprises a computer program, and the computer program realizes the steps in the method embodiment of the control method of the path construction software when executed by a processor.
[0123] The embodiment of the present application further provides another computer program product, which comprises a nonvolatile computer readable storage medium, and the nonvolatile computer readable storage medium stores a computer program, and the computer program realizes the steps in the method embodiment of the control method of the path construction software when executed by a processor.
[0124] Those skilled in the art will further appreciate that the steps of the example units and algorithms described in connection with the embodiments disclosed herein can be embodied in electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various examples have been described generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the particular application and design constraints imposed on the overall system. Skilled artisans can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
[0125] The above describes in detail the method and system of the control method of the path construction software provided by the present application. The principle and implementation mode of the present application are described by applying specific examples in the present application. The above description of the examples is only applicable to help understand the method of the present application and its core idea. It should be pointed out that, for those skilled in the art, some improvements and modifications can be made to the present application without departing from the principle of the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A control method of route construction software, characterized by, The application relates to a method for installing path construction software in a target host. In a process of running an installation program of path construction software in a user state of a target host, a reference storage space allocated by the target host for the path construction software in a kernel state is detected by the installation program, wherein the path construction software is used for constructing a transmission path between the target host and a storage device connected to the target host by a target kernel driver in the kernel state according to a supported first storage device, and the reference storage space is used for storing start-up attributes of the target kernel driver installed on the target host; In a case where the reference storage space is detected, a target interface between the user state and the kernel state is invoked by the installation program in the user state; Storage device information in the installation program is stored into the reference storage space by the installation program through the target interface, wherein the storage device information is used for indicating a second storage device, and an operating system kernel of the target host is used for determining the first storage device according to data stored in the reference storage space in a process of starting up the target kernel driver.
2. The control method of path construction software according to claim 1, characterized by, The target interface between the user state and the kernel state invoked by the installation program in the user state comprises: A first function interface and a second function interface are acquired by the installation program, wherein the first function interface is used for creating a storage location in a storage space of the kernel state, and the second function interface is used for writing data into the storage location in the kernel state; A third function interface is generated by the installation program using the first function interface, wherein the third function interface is used for creating a target storage location in the reference storage space of the kernel state; A fourth function interface is generated by the installation program according to the third function interface and the second function interface, wherein the fourth function interface is used for writing the storage device information into the target storage location in the kernel state, and the target interface comprises the fourth function interface.
3. The control method of path construction software according to claim 2, characterized in that, The third function interface generated by the installation program using the first function interface comprises: The storage path of the reference storage space is written into a first position in the first function interface, and a storage sub-path of the target storage location is written into a second position in the first function interface, so that the third function interface is obtained, wherein the third function interface is used for creating the storage sub-path on the storage path of the kernel state.
4. The control method of path construction software according to claim 2, characterized by, The fourth function interface generated by the installation program according to the third function interface and the second function interface comprises: The third function interface is sent to the operating system kernel by the installation program; A target position identifier returned by the operating system kernel in response to the third function interface is received by the installation program, wherein the target position identifier is used for indicating that data is allowed to be written into the storage sub-path of the target storage location; writing, by the installation program, the target position identifier into a third position in the second function interface and writing the storage device information into a fourth position in the second function interface to obtain a fourth function interface, wherein the fourth function interface is used to write the storage device information through the target position identifier.
5. The control method of path construction software according to claim 4, characterized in that, After the sending, by the installation program, of the third function interface to the operating system kernel, the method further includes: receiving, by the operating system kernel, the third function interface, wherein the third function interface is used to create the storage sub-path on the storage path of the reference storage space in the kernel mode; finding, by the operating system kernel, the storage sub-path in the storage path in response to the third function interface; in a case where the storage sub-path is found, obtaining, by the operating system kernel, a first identifier corresponding to the storage sub-path as the target position identifier; in a case where the storage sub-path is not found, creating, by the operating system kernel, the storage sub-path in the storage path and generating a second identifier corresponding to the storage sub-path as the target position identifier; sending the target position identifier to the installation program.
6. The control method of path building software according to claim 1, wherein The storing, by the installation program, of the storage device information in the installation program into the reference storage space through the target interface includes: sending, by the installation program, a fourth function interface to the operating system kernel, wherein the fourth function interface is used to write the storage device information through a target position identifier, the target position identifier is used to indicate that data is allowed to be written to a storage sub-path of a target storage position in the reference storage space, and the target interface includes the fourth function interface.
7. The control method of path construction software according to claim 6, wherein After the sending, by the installation program, of the fourth function interface to the operating system kernel, the method further includes: receiving, by the operating system kernel, the fourth function interface; verifying, by the operating system kernel, the target position identifier in response to the fourth function interface; in a case where the target position identifier passes the verification, writing, by the operating system kernel, the storage device information into the storage sub-path.
8. The control method of path construction software according to claim 1, characterized by, After the storing, by the installation program, of the storage device information in the installation program into the reference storage space through the target interface, the method further includes: extracting, by the operating system kernel, the storage device information from the reference storage space in a process of starting the target kernel driver; determining, by the operating system kernel, the first storage device according to the storage device information.
9. The control method of path construction software according to claim 8, characterized by, The extracting, by the operating system kernel, of the storage device information from the reference storage space includes: sending, by the operating system kernel, a reading request to the reference storage space, wherein the reading request is used to request reading of data on a target storage position in the reference storage space; receiving, by the operating system kernel, the storage device information returned by the reference storage space in response to the reading request.
10. The control method of path construction software according to claim 8, wherein The determining, by the operating system kernel, of the first storage device according to the storage device information includes: extracting, by the operating system kernel, reference device information from a target storage space of the target kernel driver, wherein the reference device information is used to indicate a third storage device currently supported by the target kernel driver; merging, by the operating system kernel, the storage device information and the reference device information to obtain target device information; replacing, by the operating system kernel, the reference device information in the target storage space with the target device information to obtain the first storage device.
11. The control method of the route construction software according to claim 1, characterized by, After the storing, by the installer, of the storage device information in the installer into the reference storage space through the target interface, the method further comprises: obtaining, by the installer, a target path of a host storage space on the target host, wherein the host storage space is used to store device information of a fourth storage device supported by the operating system kernel; adding, by the installer, storage device information to the target path.
12. A control system for a route building software, characterized in that comprise: an installer in a control method of the path construction software according to any one of claims 1 to 11 and an operating system kernel in the control method of the path construction software according to any one of claims 1 to 11, the installer is arranged in a user state of a target host, the operating system kernel is a kernel of an operating system of the target host, and a target kernel driver of the path construction software is further arranged in a kernel state of the target host.
13. An electronic device, comprising: comprise: a memory configured to store a computer program; a processor configured to implement the steps of the control method of the path construction software according to any one of claims 1 to 11 when executing the computer program.
14. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, wherein the computer program is executed by the processor to implement the steps of the control method of the path construction software according to any one of claims 1 to 11.
15. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the control method of the path construction software according to any one of claims 1 to 11.
Citation Information
Patent Citations
Management method and system for multi-path software based on multiple storage manufacturers
CN106814977A
Method and device for communication between kernel mode and user mode and terminal
CN108062253A