WO2021008425A1 - 一种系统启动方法以及相关设备 - Google Patents

一种系统启动方法以及相关设备 Download PDF

Info

Publication number
WO2021008425A1
WO2021008425A1 PCT/CN2020/100972 CN2020100972W WO2021008425A1 WO 2021008425 A1 WO2021008425 A1 WO 2021008425A1 CN 2020100972 W CN2020100972 W CN 2020100972W WO 2021008425 A1 WO2021008425 A1 WO 2021008425A1
Authority
WO
WIPO (PCT)
Prior art keywords
disk partition
thread
metadata
partition
disk
Prior art date
Application number
PCT/CN2020/100972
Other languages
English (en)
French (fr)
Inventor
龚晨
何彪
俞超
方炜
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP20839633.3A priority Critical patent/EP3974969A4/en
Priority to US17/626,331 priority patent/US11868631B2/en
Publication of WO2021008425A1 publication Critical patent/WO2021008425A1/zh

Links

Images

Classifications

    • 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0632Configuration or reconfiguration of storage systems by initialisation or re-initialisation of storage systems
    • 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • 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/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • 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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0659Command handling arrangements, e.g. command buffers, queues, command scheduling
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Definitions

  • This application relates to the field of electronic technology, and in particular to a system startup method and related equipment.
  • the terminal device is easy to lose power. If the terminal device suddenly loses power during the process of reading and writing the disk file, it will easily cause the disk file to be damaged. Therefore, in order to ensure that the disk is usable, it is necessary to perform a file system check (fsck) on the disk partition during the startup process of the terminal device to detect whether the disk partition is damaged.
  • fsck file system check
  • the kernel driver in the kernel mode After the kernel driver in the kernel mode detects the disk partition, it will report the disk partition event to the user mode, and the user space process (ueventd) in the user mode monitors the disk partition event Later, the corresponding disk partition node will be generated, and other programs in the subsequent user mode can read and write the disk partition by reading and writing the corresponding node.
  • the initialization process (init) in the user mode monitors the generation of disk partition nodes
  • the init process starts the child process file system check (file system check, fsck). The fsck process detects whether these disk partition nodes are abnormal. If the detection result is normal, Then the init process mounts the disk partition.
  • the terminal equipment system is prone to congestion when the system is started, which increases the time-consuming of system startup.
  • the embodiment of the application provides a system startup method and related equipment, including; when the kernel driver in the kernel mode detects the first disk partition, creating a first thread; in the kernel mode, reading the first thread through the first thread The metadata of the disk partition; the metadata of the first disk partition is written into the first page cache through the first thread.
  • the first thread pre-caches the metadata of the disk partition into the page cache, and the subsequent fsck process in the user mode can directly read the metadata of the disk partition from the page cache. Since the storage area of the page cache is the memory, the read and write operation rate is higher than that of the disk. Therefore, it can effectively avoid the congestion of the terminal device system during startup and reduce the time consumption of the system startup.
  • this application provides a system startup method, including:
  • the kernel driver in the kernel mode first detects the disk partition, and when the kernel driver in the kernel mode detects the first disk partition, the first thread is created;
  • the metadata of the first disk partition is written into the first page cache through the first thread.
  • the first page cache is managed by a first address space (i_mapping), the first address space is managed by a first index node (bd_inode), and the first index node is managed by a block device pointer (bdev).
  • the first thread pre-caches the metadata of the disk partition in the page cache, and the subsequent file system detection fsck process and the load process in the user mode can be directly read from the page cache Get the metadata of the disk partition. Due to the fsck process and the mount process in the user mode, the cache data in the first page cache can be read instead of reading the first disk partition and fsck and mount the metadata of the first disk partition.
  • the data in the first page cache is cached in the memory, so the speed of reading the first page cache is much greater than the speed of reading the first disk partition.
  • the first thread pre-caches the metadata of the disk partition to the page cache, which can be executed in parallel with other system startup procedures, reducing the time consumption of system startup. Therefore, it is possible to effectively avoid congestion when the terminal device system is started, and reduce the time consumption of the system to start.
  • creating the first thread when the kernel driver in the kernel mode detects the first disk partition, creating the first thread includes:
  • the kernel driver in the kernel mode detects whether the current disk partition is the first disk partition. Specifically, the kernel driver checks whether the partition number of the disk partition is the first partition number by calling the initialization function to determine whether the disk partition is the first partition number.
  • the initialization function can be "add_partition()";
  • the first function is called to create the first thread, and the first function can be "kthread_run(read_pagecaches, NULL, "fsck_boost”";
  • the first structure pointer and the first partition number of the first disk partition are passed to the first thread, where the first structure pointer is the general disk structure pointer of the first disk partition, and the first structure pointer may It is "struct gendisk*disk", the first partition number is the partition number of the first disk partition.
  • the first thread is created by calling the first function, and the first structure pointer of the first disk partition and the first partition number are passed to the first thread, so that the first thread can operate on the first disk partition. Enriched the flexibility of the solution.
  • the reading the metadata of the first disk partition by the first thread includes:
  • the metadata of the first disk partition needs to be read.
  • the first thread can call the page operation function and read the first disk partition through the page operation function.
  • Metadata The page operation function may be a "pagechache" operation function.
  • the metadata is used to save the state information of the file system corresponding to the disk partition.
  • the first disk partition is opened by calling the third function, and the first thread can read the metadata of the first disk partition by calling the page operation function. Enriched the flexibility of the solution.
  • the method before calling the third function through the first thread to open the first disk partition, the method further includes:
  • the second function is called by the first thread to obtain the first block pointer, where the first block pointer corresponds to the first disk device
  • the second function is "bdget_disk(disk, partno)" as an example, where “disk” is the first structure pointer and "partno” is the first partition number.
  • the first thread can obtain the block device (block device) structure pointer corresponding to the first disk partition through the second function. This pointer is called the first block pointer, specifically, the first block pointer is "bdev";
  • the first disk partition is opened through the third function.
  • the first thread of the terminal device calls the second function to obtain the first block pointer according to the first structure pointer of the first disk partition and the first partition number.
  • the first thread calls the third function and passes the first block pointer to the third function to open the first disk partition.
  • the reading the metadata of the first disk partition through the page operation function includes:
  • the size of the amount of data to be read and the offset of the amount of data to be read are passed to the page operation function through the first thread, according to the size of the amount of data to be read and the data to be read.
  • the amount of offset read the metadata of the first disk partition through the page operation function.
  • the size of the data volume read by the page operation function is close to the actual demand, avoiding extreme situations where the volume of data read is too large or too small, and the feasibility of the solution is improved.
  • the reading the metadata of the first disk partition through the page operation function includes:
  • the page operation function can write the metadata of the first disk partition into the first page cache through the "__do_page_cache_readahead(mapping,NULL,offset,nr_to_read,0)" function.
  • the embodiment of the first aspect further includes:
  • the terminal device executes the startup action according to the original process. After the system boots into the user mode, the terminal device needs to perform file system check (fsck) on the first disk partition. In the user mode, perform file system detection on the first disk partition. If the file system detection result of the first disk partition is normal, query the first page cache according to the first index relationship and by calling the fourth function , Whether there is cache data, where the first index relationship includes a first address space that manages the first page cache, and a first index node that manages the first address space.
  • the first index relationship "bdev-bd_inode-i_mapping";
  • the cache data cached in the first page cache can be used for subsequent mounting processes. It can greatly increase the speed of the loading process and reduce the time-consuming system startup.
  • the method further includes:
  • the metadata of the first disk partition is read by calling the fifth function; the metadata of the first disk partition is used for mounting. To ensure the normal startup of the system.
  • the embodiment of the first aspect further includes:
  • the kernel mode apply for the first memory space through the first thread; read the metadata of the first disk partition through the first thread; write the metadata of the first disk partition through the first thread A memory space.
  • the first file node is established through the first thread, and the first file node is mapped to the first memory space; in the user mode, the first disk cached in the first memory space is read by accessing the first file node Partition metadata; perform file system detection on the cached metadata of the first disk partition, and, by accessing the first file node, write the result into the first memory space, and write the result to the first Write the result in the disk partition.
  • the metadata of the first disk partition is cached in the first memory space by calling the first thread.
  • the metadata of the first disk partition cached in the first memory space can be directly read. Since the first thread caches the metadata of the first disk partition in the first memory space, this action can be performed in parallel with other boot processes, and therefore, the time consumption of system booting can be effectively reduced.
  • a terminal device in a second aspect, has the function of implementing the system startup method in the first aspect.
  • This function can be realized by hardware, or by hardware executing corresponding software.
  • the hardware or software includes one or more modules corresponding to the above-mentioned functions.
  • a terminal device in a third aspect, includes a transceiver, a memory, and a processor.
  • the transceiver, the memory, and the processor communicate with each other through an internal connection path, the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the receiver to receive signals and control the transmitter to send signals , And when the processor executes the instructions stored in the memory, the processor is caused to execute the first aspect or the method in any possible implementation manner of the first aspect.
  • a computer program product comprising: computer program code, which when the computer program code is run by a computer, causes the computer to execute the methods in the above aspects.
  • a computer-readable medium for storing a computer program, and the computer program includes instructions for executing the methods in the foregoing aspects.
  • a chip system including a processor, the processor is configured to call and run the computer program from a memory, and the computer program is used to implement the methods in the foregoing aspects.
  • the kernel driver in the kernel mode detects the first disk partition
  • the first thread is created; in the kernel mode, the metadata of the first disk partition is read by the first thread; the metadata of the first disk partition is read by the first thread Data is written to the first page cache.
  • the first thread pre-caches the metadata of the disk partition into the page cache, and the subsequent fsck process in the user mode can directly read the metadata of the disk partition from the page cache. Since the storage area of the page cache is the memory, the read and write operation rate is higher than that of the disk. Therefore, it can effectively avoid the congestion of the terminal device system during startup and reduce the time consumption of the system startup.
  • FIG. 1 is a schematic diagram of an embodiment of a system startup method provided by an embodiment of the application
  • FIG. 2 is a schematic diagram of an embodiment of another system startup method provided by an embodiment of the application.
  • Figure 3 is a schematic diagram of an embodiment of a terminal device in an embodiment of the application.
  • FIG. 4 is a schematic diagram of the hardware structure of a terminal device in an embodiment of the application.
  • FIG. 5 is a schematic structural diagram of a chip system according to an embodiment of the application.
  • File system detection The file system in the computer is generally in one of two states: clean or dirty. If you want to mount a file system on a disk partition, the file system must be clean, that is to say, the structure is complete, and the metadata, metadata and data are consistent. But sometimes the consistency of the file system may be destroyed. For example, when the system is powered off, the data in the memory will be lost, or due to a disk failure, such as a bad disk track, it will destroy the consistency of the file system data. In order to check and maintain inconsistent file systems, the file system will provide file system check (fsck) to facilitate users to check and repair the file system.
  • fsck file system check
  • the boot file system detection method proposed in this application can be applied to terminal equipment.
  • the terminal device may be a wireless terminal that provides voice and/or data connectivity to the user, a handheld device with a wireless connection function, or other processing devices connected to a wireless modem.
  • a wireless terminal can communicate with one or more core networks through a radio access network (RAN).
  • the wireless terminal can be a mobile terminal, such as a mobile phone (or called a "cellular" phone) and a mobile terminal computer. It may also be a personal computer, for example, it may be a portable, pocket-sized, handheld, computer-built or vehicle-mounted mobile device, which exchanges language and/or data with the wireless access network.
  • Wireless terminal can also be called system, subscriber unit, subscriber station, mobile station, mobile station, remote station, access point, Remote terminal (remote terminal), access terminal (access terminal), user terminal (user terminal), user agent (user agent), user equipment (user device), or user equipment (user equipment, UE), specifically not done here limited.
  • FIG. 1 is a schematic diagram of an embodiment of a system startup method provided by an embodiment of the application.
  • the system of the terminal device is a Linux system as an example for description.
  • the kernel driver in the kernel mode detects the disk partition.
  • the kernel driver in the kernel mode first detects the disk partition. Specifically, the kernel driver determines whether the disk partition is a preset by detecting whether the partition number of the disk partition is a preset partition number. Disk partition.
  • the preset disk partition is referred to as the first disk partition in the embodiment of this application.
  • the first disk partition is a "userdata” partition, and at this time, the partition name of the first disk partition is preset to be "userdata”.
  • the first disk partition can be other disk partitions, such as "A" partition, in addition to being preset as the "userdata” partition. It may also be multiple disk partitions.
  • the first disk partition is a "data" partition and an "A" partition, which is not limited here.
  • the kernel driver first calls an initialization function, which may be an "add_partition()" function. Then, the initialization function detects the partition name of each disk partition. When it is detected that the partition name is "userdata", the disk partition corresponding to the partition name is determined to be the first disk partition.
  • an initialization function which may be an "add_partition()" function.
  • the kernel driver Since the kernel driver detects whether each disk partition is the first disk partition through a traversal method, every time a disk partition is detected, it will give the partition number corresponding to the disk partition. For example: when the kernel driver detects the first disk partition "A”, it marks the partition number of the disk partition as "1". When the kernel driver detects the second disk partition "userdata”, it marks the partition number of the disk partition as "2", because the partition name of the disk partition is "userdata”, which is consistent with the predefined partition name of the first disk partition , It is determined that the partition is the first disk partition, so the kernel driver determines that the partition number "2" of the disk partition is the first partition number.
  • the kernel driver when the kernel driver detects that the partition name of a certain disk partition is a preset partition name, the kernel driver determines that the currently detected disk partition is the first disk partition.
  • the kernel driver can create the first thread by calling the first function, or other functions predefined by the user, which are not limited here. Create a first thread, which is an independent thread running in parallel with other threads in the kernel mode.
  • the first thread may be a "fsck_boost" thread or other threads predefined by the user, which is not limited here.
  • the first function is "kthread_run(read_pagecaches,NULL,”fsck_boost”” function as an example.
  • the kernel driver determines that the current disk partition is the first disk partition based on the return value.
  • the kernel driver creates by calling the first function The first thread.
  • the kernel driver passes the general structure pointer corresponding to the first disk partition to the first thread, and the kernel driver also passes the partition number corresponding to the first disk partition to the first thread.
  • the general structure pointer is this In the application embodiment, it is called the first structure pointer, and the partition number is the first partition number.
  • This structure is used to indicate the physical pages of a file that have been cached.
  • the system reads a file, it first queries whether the required data has been cached from the index relationship corresponding to the file. If the data is not cached, it initiates a read and write request to the disk.
  • the first structure pointer is "struct gendisk*disk”.
  • the first thread obtains the first block pointer by calling the second function according to the first structure pointer and the first partition number.
  • the second function may be "bdget_disk(disk, partno)", taking the second function of "bdget_disk(disk, partno)" as an example, where “disk” is the first structure Body pointer, "partno" is the first partition number.
  • the first thread can obtain the block device (block device) structure pointer corresponding to the first disk partition through the second function. This pointer is called the first block pointer. Specifically, the first block pointer is "bdev".
  • the third function is called through the first thread, and the first block pointer is passed to the third function.
  • the third function is used to open the first disk partition.
  • the third function can be "blkdev_get(bdev,FMODE_READ,NULL)", and the third function is "blkdev_get(bdev,FMODE_READ,NULL)" as an example, where: The first block pointer, find the first disk partition through the first block pointer, "FMODE_READ” indicates read-only mode, and "NULL” is an irrelevant variable, which can be empty.
  • the third function opens the first disk partition.
  • the metadata of the first disk partition needs to be read.
  • the first thread can call the page operation function and read it through the page operation function Metadata of the first disk partition.
  • the page operation function may be a "pagechache" operation function.
  • the metadata is used to save the state information of the file system corresponding to the disk partition.
  • the size of the amount of data that needs to be read is transmitted to the page operation function through the first thread, and the size of the amount of data that needs to be read is determined by the size of the metadata of the first disk partition.
  • the metadata size of the first disk partition is 200 megabytes (mbit, MB). Therefore, the size of the amount of data that needs to be read is 200 MB, and if the total capacity of the first disk partition is 512 GB, the size of the amount of data that needs to be read is 500 MB.
  • the metadata size of the first disk partition is 300MB
  • the size of the data to be read can be less than 300MB, such as 100MB; it can also be greater than 300MB, such as 400MB, which is not limited here.
  • the page is to read the metadata of the first disk partition, and the metadata (with a size of 200MB as an example) is usually stored in the disk partition address 0-0 ⁇ 0xC800000, therefore, the offset of the amount of data that needs to be read Usually 0.
  • the page manipulation function can read the metadata of the first disk partition through the "__do_page_cache_readahead(mapping, NULL, offset, nr_to_read, 0)" function.
  • the page operation function called by the first thread is in the kernel mode. In this page operation function, there is no need to include operations on the "struct file" structure pointer.
  • the page operation function is used to write the metadata of the first disk partition into the first page cache (pagecache).
  • the first page cache is managed by a first address space (i_mapping), the first address space is managed by a first index node (bd_inode), and the first index node is managed by a block device pointer (bdev).
  • i_mapping first address space
  • bd_inode first index node
  • bdev block device pointer
  • the foregoing management relationship is referred to as a first index relationship
  • the first index relationship is "bdev-bd_inode-i_mapping”
  • the first index node corresponds to the first disk partition.
  • the page operation function can write the metadata of the first disk partition into the first page cache through the "__do_page_cache_readahead(mapping, NULL, offset, nr_to_read, 0)" function.
  • the page operation function After the page operation function writes the metadata of the first disk partition into the first page cache, the metadata of the first disk partition cached in the first page cache can be read through the first index relationship, which is cached in the first page
  • the metadata of the first disk partition that is cached is called cache data.
  • the terminal device executes the startup action according to the original process.
  • the terminal device needs to perform file system check (fsck) on the first disk partition. Since in the foregoing steps, the terminal device has cached the metadata of the first disk partition in the first page cache, in the user mode, file system detection can be performed on the cached data in the first page cache instead of reading. Take the first disk partition and perform file system detection on the metadata of the first disk partition.
  • the file system detection process can be started through the initialization process (init). At this time, the file system detection obtains the cache data by accessing the address "dev/block/userdata" of the first disk partition. It is the metadata of the first disk partition cached in the first page cache.
  • the "dev/block/userdata" in the user mode has an association relationship with the first index relationship "bdev-bd_inode-i_mapping" in the kernel mode. Therefore, the cache data in the first page cache corresponding to the first address space can be read by accessing "dev/block/userdata".
  • the object of the read and write operation is "dev/block/userdata”. It should be noted that the "userdata" in "dev/block/userdata” is only illustrative, and may be other address names depending on the actual disk partition.
  • step 107 is executed; when the result of the file system detection is abnormal, the original file system detection process of the system is entered to repair the first disk partition.
  • the loading system call mode is performed.
  • the terminal device when the detection of the file system ends and the detection result of the file system of the disk partition is normal, the terminal device needs to mount the disk partition.
  • the mount is a kind of mount naming of the disk partition.
  • the disk partition needs to be mounted with a certain file system, such as flash friendly file system (F2FS) or fourth-generation extended file system. , EXT4), the user can access the files on the partition.
  • F2FS flash friendly file system
  • EXT4 fourth-generation extended file system
  • step 107 is entered.
  • the terminal device calls the fifth function to start the mounting process, and calls the fourth function through the fifth function to query whether there is cached data in the first page cache.
  • the fourth function can be an independent function or a sub-function under the fifth function, which is not limited here.
  • the terminal device obtains the first index relationship through the fifth function. Then, the fourth function learns the first page cache according to the first index relationship.
  • the fifth function carries "sbi", a variable in the fifth function of "sbi”.
  • the “sbi” points to "sb", which is a standard superblock structure pointer in the Linux system, and the "sb” further points to "s_bdev", which points to the file system where the file system is installed.
  • Block device in this embodiment, "s_bdev” points to the block device corresponding to the first disk partition, that is, "bdev”, and "bdev” stores the first index node corresponding to the first disk partition.
  • bd_inode the first address space "i_mapping" is managed in the first index node.
  • the fifth function can obtain the first index relationship "bdev-bd_inode-i_mapping" through "sbi-sb-s_bdev", and finally obtain the index relationship: "sbi-sb-s_bdev-bd_inode-i_mapping”.
  • the fifth function transfers the first index relationship to the fourth function, and the fourth function can obtain the first address space through the first index relationship, and the first address space manages the first page cache.
  • the "mapping" is "i_mapping".
  • the terminal device uses the cache data to mount. After the mount is successful, the terminal device calls "blkdev_put" to release the data in the first page cache; when the fourth function detects that there is no cache data in the storage area corresponding to the first address space, the fourth function will check the result The range is given to the fifth function.
  • the fifth function reads the metadata of the first disk partition from the first disk partition according to the detection result. In an optional implementation scheme, if the fourth function is a sub-function of the fifth function, then the fifth function calls functions other than the fourth function in the fifth function according to the detection result, from the first disk partition , Read the metadata of the first disk partition.
  • the fifth function uses the metadata of the first disk partition to perform the mount process.
  • the first thread pre-caches the metadata of the disk partition in the page cache, and the fsck process and mount process in the subsequent user mode can directly read the disk partition’s data from the page cache. Metadata. Due to the fsck process and the mount process in the user mode, the cache data in the first page cache can be read instead of reading the first disk partition and fsck and mount the metadata of the first disk partition.
  • the data in the first page cache is cached in the memory, so the speed of reading the first page cache is much greater than the speed of reading the first disk partition.
  • the first thread pre-caches the metadata of the disk partition to the page cache, which can be executed in parallel with other system startup procedures, reducing the time-consuming system startup. Therefore, it is possible to effectively avoid congestion when the terminal equipment system is started, and reduce the time consumption of the system to start.
  • FIG. 2 is a schematic diagram of an embodiment of another system startup method provided by an embodiment of the application.
  • the system of the terminal device is also a Linux system as an example for illustration.
  • the kernel driver in the kernel mode detects the disk partition.
  • the first thread is created.
  • the terminal device uses the first thread to apply for the first memory space in the memory.
  • the size of the first memory space is determined by the metadata size of the first disk partition.
  • the metadata size of the first disk partition is 200 megabytes (mbit, MB). Therefore, the size of the first memory space requested is 200MB, that is, a 200MB memory block is requested; if the total capacity of the first disk partition is 512GB, the size of the first memory space is 500MB.
  • the metadata size of the first disk partition is 300MB
  • the size of the data to be read can be less than 300MB, such as 100MB; it can also be greater than 300MB, such as 400MB, which is not limited here.
  • the metadata of the first disk partition is read through the first thread.
  • the first thread reads the metadata of the first disk partition by calling a page operation function.
  • the specific reading method is similar to that of step 104, and will not be repeated here.
  • the first thread writes the read metadata of the first disk partition into the first memory space.
  • the specific writing method is similar to step 105, and will not be repeated here.
  • the first file node needs to be established through the first thread, and the first file node is mapped to the first memory space.
  • the first file node may be a file node in the "proc" directory.
  • the address name of the first file node can be "proc/block/xxx", and the "xxx" can be changed according to actual conditions.
  • the address name of the first file node can be "proc/block/userdata” or "Proc/block/123" is not limited here.
  • the "proc" directory is a kind of file system, that is, the proc file system.
  • the proc file system is a pseudo file system (that is, a virtual file system), which stores a series of special files of the current kernel running state. Users can view information about system hardware and currently running processes through these files. Some of these files are used to change the running state of the kernel.
  • the terminal device performs file system detection on the metadata of the first disk partition cached in the first memory space.
  • the initialization process (init) in the user mode implements the read operation of the metadata of the first disk partition cached in the first memory space by accessing the first file node.
  • the process of file system detection if a write operation is required, in addition to the write operation to the first memory space, it is also necessary to simultaneously write to the first disk partition.
  • the terminal device writes the file system detection result into the first memory space by accessing the first file node; at the same time, writes the file system detection result into the first disk partition . Synchronously write data to the memory block and the disk to ensure that the data in the memory block is consistent with the data in the corresponding location on the disk.
  • the first disk partition is accessed by accessing the address "dev/block/userdata" of the first disk partition. It should be noted that the address of the first disk partition is only illustrative, and is not limited here.
  • the terminal device releases the first memory space. Afterwards, mount is performed, and the metadata of the first disk partition is read by accessing the address of the first disk partition. And use the metadata of the first disk partition for mounting.
  • the metadata of the first disk partition is cached in the first memory space by calling the first thread.
  • the metadata of the first disk partition cached in the first memory space can be directly read. Since the first thread caches the metadata of the first disk partition in the first memory space, this action can be performed in parallel with other boot processes, and therefore, the time consumption of system booting can be effectively reduced.
  • the solution provided in the embodiment of the present application is introduced.
  • the above-mentioned terminal device includes hardware structures and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
  • the embodiment of the present application may divide the terminal device into functional modules according to the foregoing method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module 301.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • the terminal device in this application will be described in detail below, please refer to FIG. 3, which is a schematic diagram of an embodiment of the terminal device in an embodiment of the application.
  • the terminal device 30 includes:
  • the processing module 301 is configured to create a first thread when the kernel driver in the kernel mode detects the first disk partition;
  • the reading module 302 is configured to read the metadata of the first disk partition through the first thread in the kernel mode
  • the writing module 303 is configured to write the metadata of the first disk partition into the first page cache through the first thread.
  • the terminal device 30 includes:
  • the processing module 301 is specifically configured to detect whether the current disk partition is the first disk partition through the kernel driver in the kernel mode;
  • the processing module 301 is specifically configured to call the first function to create the first thread when it is determined by the kernel driver that the current disk partition is the first disk partition;
  • the processing module 301 is specifically configured to transfer the first structure pointer of the first disk partition and the first partition number to the first thread, where the first structure pointer is the general disk structure pointer of the first disk partition, and the first partition Number is the partition number of the first disk partition.
  • the terminal device 30 includes:
  • the reading module 302 is specifically configured to call a third function through the first thread to open the first disk partition;
  • the reading module 302 is specifically configured to call the page operation function through the first thread, and read the metadata of the first disk partition through the page operation function.
  • the terminal device 30 includes:
  • the reading module 302 is further configured to call the second function through the first thread to obtain the first block pointer according to the first structure pointer and the first partition number of the first disk partition,
  • the first block pointer is the block device structure pointer corresponding to the first disk device
  • the reading module 302 is also used to call the third function through the first thread and pass the first block pointer to the third function;
  • the reading module 302 is also used to open the first disk partition through the third function according to the first block pointer.
  • the terminal device 30 includes:
  • the reading module 302 is specifically used to pass in the size of the amount of data to be read and the offset of the amount of data to be read to the page operation function through the first thread,
  • the metadata of the first disk partition is read through the page operation function.
  • the terminal device 30 includes:
  • the writing module 303 is specifically configured to write the read metadata of the first disk partition into the first page cache through a page operation function.
  • the terminal device 30 includes:
  • the processing module 301 is also used in the user mode to perform file system detection on the first disk partition. If the fsck result of the file system detection of the first disk partition is normal,
  • the processing module 301 is further configured to query whether there is cache data in the first page cache according to the first index relationship and by calling the fourth function, where the first index relationship includes the first address space for managing the first page cache, And the first index node that manages the first address space;
  • the processing module 301 is also used for mounting using cached data if it exists.
  • the terminal device 30 includes:
  • the processing module 301 is further configured to read the metadata of the first disk partition by calling the fifth function if it does not exist;
  • the processing module 301 is also configured to use the metadata of the first disk partition for mounting.
  • the terminal device 30 includes:
  • the processing module 301 is also used in the kernel mode to apply for the first memory space through the first thread;
  • the processing module 301 is further configured to read the metadata of the first disk partition through the first thread;
  • the processing module 301 is further configured to write the metadata of the first disk partition into the first memory space through the first thread.
  • the terminal device 30 includes:
  • the processing module 301 is further configured to establish a first file node through the first thread, and the first file node is mapped to the first memory space;
  • the processing module 301 is also used in the user mode to read the metadata of the first disk partition cached in the first memory space by accessing the first file node;
  • the processing module 301 is also configured to perform file system detection on the cached metadata of the first disk partition, and record the result of the file system detection.
  • the terminal device 30 includes:
  • the processing module 301 is further configured to write the result into the first disk partition while accessing the first file node to write the result into the first memory space.
  • FIG. 4 is a schematic diagram of the hardware structure of a terminal device in an embodiment of the application. As shown in Figure 4, the terminal device may include:
  • Fig. 4 is a schematic diagram of the hardware structure of a terminal device in an embodiment of the present application.
  • the terminal device may include:
  • the terminal device includes at least one processor 401, a communication line 407, a memory 403, and at least one communication interface 404.
  • the processor 401 can be a general-purpose central processing unit (central processing unit, CPU), microprocessor, application-specific integrated circuit (server IC), or one or more programs for controlling the execution of the program of this application Integrated circuits.
  • CPU central processing unit
  • server IC application-specific integrated circuit
  • the communication line 407 may include a path to transmit information between the aforementioned components.
  • the communication interface 404 uses any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet.
  • the memory 403 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, random access memory (RAM), or other types that can store information and instructions
  • ROM read-only memory
  • RAM random access memory
  • the memory can exist independently and is connected to the processor through the communication line 407.
  • the memory can also be integrated with the processor.
  • the memory 403 is used to store computer-executed instructions for executing the solution of the present application, and the processor 401 controls the execution.
  • the processor 401 is configured to execute computer-executable instructions stored in the memory 403, so as to implement the system startup method provided in the foregoing embodiment of the present application.
  • the computer-executable instructions in the embodiments of the present application may also be referred to as application program code, which is not specifically limited in the embodiments of the present application.
  • the terminal device may include multiple processors, such as the processor 401 and the processor 402 in FIG. 4.
  • processors can be a single-CPU (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (for example, computer program instructions).
  • the terminal device may further include an output device 405 and an input device 406.
  • the output device 405 communicates with the processor 401 and can display information in a variety of ways.
  • the input device 406 communicates with the processor 401 and can receive user input in a variety of ways.
  • the input device 406 may be a mouse, a touch screen device, a sensor device, or the like.
  • the present application also provides a chip system. Please refer to FIG. 5.
  • the chip system includes a processor 501 and a memory 502.
  • the memory 502 is used to store necessary program instructions and data for the terminal device.
  • the chip system can be composed of chips, or include chips and other discrete devices.
  • the chip system also includes a power supply and a transceiver (not shown in FIG. 5), which are used to support the above-mentioned terminal device to realize its related functions, for example, the transceiver receives the information in the above-mentioned method embodiment.
  • the data and/or information involved such as the metadata of the first disk partition, etc.
  • the transceiver After the transceiver receives the data and/or information involved in the foregoing method embodiments, it sends the data and/or information to the processor 501 so that the processor 501 can process the data and/or information.
  • the device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physically separate
  • the physical unit can be located in one place or distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the connection relationship between the modules indicates that they have a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
  • this application can be implemented by means of software plus necessary general hardware.
  • it can also be implemented by dedicated hardware including dedicated integrated circuits, dedicated CPUs, dedicated memory, Dedicated components and so on to achieve.
  • all functions completed by computer programs can be easily implemented with corresponding hardware.
  • the specific hardware structure used to achieve the same function can also be diverse, such as analog circuits, digital circuits or dedicated Circuit etc.
  • software program implementation is a better implementation in more cases.
  • the technical solution of this application essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, such as a computer floppy disk. , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to make a terminal device execute the method described in each embodiment of this application.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be constructed from a website, a computer, or a training set.
  • the computer-readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a training device or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk (SSD)), etc.
  • one embodiment or “an embodiment” mentioned throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the present application. Therefore, the appearance of "in one embodiment” or “in an embodiment” in various places throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that, in the various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, rather than corresponding to the embodiments of the present application. The implementation process constitutes any limitation.
  • system and “network” in this article are often used interchangeably in this article.
  • the term “and/or” in this article is only an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, exist alone B these three situations.
  • the character "/" in this text generally indicates that the associated objects before and after are in an "or” relationship.
  • B corresponding to A means that B is associated with A, and B can be determined according to A.
  • determining B according to A does not mean that B is determined only according to A, and B can also be determined according to A and/or other information.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a terminal device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in the various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例公开了一种系统启动方法以及相关设备,包括:当内核态中的内核驱动检测到第一磁盘分区时,创建第一线程;在内核态中,通过第一线程读取第一磁盘分区的元数据;通过第一线程将第一磁盘分区的元数据,写入第一页面缓存。在内核态中,第一线程将磁盘分区的元数据预先缓存至页面缓存中,后续用户态中的流程,可以直接从该页面缓存中读取磁盘分区的元数据。由于,该页面缓存存储的区域为内存,相较于磁盘而言读写操作速率较大,因此,可有效避免终端设备系统启动时发生拥塞的情况,降低系统启动的耗时。

Description

一种系统启动方法以及相关设备
本申请要求于2019年7月12日提交中国专利局、申请号为201910631422.1、发明名称为“一种加快终端开机速度的方法及终端”的中国专利申请的优先权,和,于2019年9月26日提交中国专利局、申请号为201910917908.1、发明名称为“一种系统启动方法以及相关设备”的中国专利申请的优先权,其全部内容通过应用结合在本申请中。
技术领域
本申请涉及电子技术领域,尤其涉及一种系统启动方法以及相关设备。
背景技术
终端设备具有易掉电性,终端设备在读写磁盘文件的过程中,若突然掉电,则容易导致磁盘文件损坏。因此,为了保证磁盘可用,在终端设备开机的过程中,需要对磁盘分区进行文件系统检测(file system check,fsck),以检测磁盘分区是否损坏。
现有技术中,内核态(kernel mode)中的内核驱动检测到磁盘分区后,将会向用户态(user mode)上报磁盘分区事件,用户态中的用户空间进程(ueventd)监听到磁盘分区事件后,会生成相应的磁盘分区节点,后续用户态中的其它程序可以通过读写对应的节点读写磁盘分区。当用户态中的初始化进程(init)监听到磁盘分区节点生成后,init进程启动子进程文件系统检测(file system check,fsck),fsck流程检测这些磁盘分区节点是否异常,若检测结果为正常,则init进程挂载磁盘分区。
由于fsck流程需要对磁盘进行读写操作(input/output,I/0),而用户态中的其它程序需要等待fsck流程检测完毕后,才可运行。因此终端设备系统启动时易发生拥塞,增加系统启动的耗时。
发明内容
本申请实施例提供了一种系统启动方法以及相关设备,包括;当内核态中的内核驱动检测到第一磁盘分区时,创建第一线程;在内核态中,通过第一线程读取第一磁盘分区的元数据;通过第一线程将第一磁盘分区的元数据,写入第一页面缓存。
在内核态中,第一线程将磁盘分区的元数据预先缓存至页面缓存中,后续用户态中的fsck流程,可以直接从该页面缓存中读取磁盘分区的元数据。由于,该页面缓存存储的区域为内存,相较于磁盘而言读写操作速率较大,因此,可有效避免终端设备系统启动时发生拥塞的情况,降低系统启动的耗时。
第一方面,本申请提供一种系统启动方法,包括:
终端设备开机启动后,首先内核态中的内核驱动检测磁盘分区,当内核态中的内核驱动检测到第一磁盘分区时,创建第一线程;
在内核态中,通过该第一线程读取该第一磁盘分区的元数据;
通过该第一线程将该第一磁盘分区的元数据,写入第一页面缓存。该第一页面缓存由第一地址空间(i_mapping)管理,该第一地址空间由第一索引节点(bd_inode)管理,第一索引节点由块设备指针(bdev)管理。
本申请实施例中,在内核态中,第一线程将磁盘分区的元数据预先缓存至页面缓存中, 后续用户态中的文件系统检测fsck流程以及加载mount流程,可以直接从该页面缓存中读取磁盘分区的元数据。由于用户态中的fsck流程以及mount流程,可通过读取第一页面缓存中的缓存数据,代替读取第一磁盘分区并对第一磁盘分区的元数据进行fsck以及mount。而第一页面缓存中的数据缓存于内存中,因此读取第一页面缓存的速度远大于读取第一磁盘分区的速度。同时,第一线程将磁盘分区的元数据预先缓存至页面缓存这一动作,可以与其它系统启动流程并行执行,降低了系统启动的耗时。因此,可有效避免终端设备系统启动时发生拥塞的情况,降低系统启动的耗时。
结合第一方面,在第一方面实施例中,该当内核态中的该内核驱动检测到该第一磁盘分区时,创建该第一线程,包括:
通过内核态中的该内核驱动检测当前磁盘分区是否为该第一磁盘分区,具体的,内核驱动通过调用初始化函数检测磁盘分区的分区号是否为第一分区号,来确定该磁盘分区是否为第一磁盘分区,该初始化函数可以是“add_partition()”;
当通过该内核驱动确定当前磁盘分区为该第一磁盘分区时,调用第一函数创建该第一线程,该第一函数可以是“kthread_run(read_pagecaches,NULL,"fsck_boost"”;
向该第一线程传递该第一磁盘分区的第一结构体指针和第一分区号,其中,该第一结构体指针为该第一磁盘分区的通用磁盘结构体指针,第一结构体指针可以是“struct gendisk*disk”,该第一分区号为该第一磁盘分区的分区号。
本申请实施例中,通过调用第一函数创建第一线程,向第一线程传递第一磁盘分区的第一结构体指针和第一分区号,使得第一线程可以对第一磁盘分区进行操作。丰富了本方案的实现灵活性。
结合第一方面,在第一方面实施例中,该通过该第一线程读取该第一磁盘分区的元数据,包括:
通过该第一线程调用第三函数打开该第一磁盘分区;
当通过第一线程打开第一磁盘分区后,需要读取第一磁盘分区的元数据(meta data),此时第一线程可以调用页面操作函数,并通过页面操作函数读取第一磁盘分区的元数据。该页面操作函数可以是“pagechache”操作函数。该元数据用于保存该磁盘分区所对应文件系统的状态信息。
本申请实施例中,通过调用第三函数打开第一磁盘分区,第一线程可通过调用页面操作函数读取第一磁盘分区的元数据。丰富了本方案的实现灵活性。
结合第一方面,在第一方面实施例中,该通过该第一线程调用该第三函数打开该第一磁盘分区之前,还包括:
根据该第一磁盘分区的该第一结构体指针和该第一分区号,通过该第一线程调用第二函数以获得第一块指针,其中,该第一块指针为该第一磁盘设备对应的块设备结构体指针,第二函数是“bdget_disk(disk,partno)”为例,其中,“disk”为第一结构体指针,“partno”为第一分区号。第一线程通过第二函数可以获取第一磁盘分区所对应的块设备(block device)结构体指针。该指针称为第一块指针,具体的,第一块指针为“bdev”;
通过该第一线程调用该第三函数,并向该第三函数传递该第一块指针;
根据该第一块指针,通过该第三函数打开该第一磁盘分区。
本申请实施例中,终端设备的第一线程,根据第一磁盘分区的第一结构体指针和第一分区号,调用第二函数获取第一块指针。第一线程通过调用第三函数,并向该第三函数传递该第一块指针,以打开第一磁盘分区。提升了本方案的可行性。
结合第一方面,在第一方面实施例中,该通过该页面操作函数读取该第一磁盘分区的元数据,包括:
通过该第一线程向该页面操作函数传入需要读取的数据量的大小,以及需要读取的数据量的偏移情况,根据该读取的数据量的大小,以及该需要读取的数据量的偏移情况,通过该页面操作函数读取该第一磁盘分区的元数据。使得页面操作函数所读取的数据量的大小与实际需求贴近,避免读取数据量过大或过少的极端情况出现,提升本方案的可行性。
结合第一方面,在第一方面实施例中,该通过该页面操作函数读取该第一磁盘分区的元数据,包括:
通过该页面操作函数,将读取的该第一磁盘分区的元数据,写入该第一页面缓存。页面操作函数可以通过“__do_page_cache_readahead(mapping,NULL,offset,nr_to_read,0)”函数,将第一磁盘分区的元数据写入第一页面缓存。
结合第一方面,在第一方面实施例中,还包括:
终端设备按照原有流程执行开机动作。当系统启动进入用户态后,终端设备需要对第一磁盘分区进行文件系统检测(file system check,fsck)。用户态中,对该第一磁盘分区进行文件系统检测,若该第一磁盘分区的文件系统检测结果为正常,根据该第一索引关系,并通过调用第四函数,查询该第一页面缓存中,是否存在缓存数据,其中,该第一索引关系包括管理该第一页面缓存的第一地址空间,以及管理该第一地址空间的第一索引节点。第一索引关系“bdev-bd_inode-i_mapping”;
若存在,则使用该缓存数据进行挂载。
本申请实施例中,进入用户态后,若文件系统检测结果为正常,则第一磁盘分区的元数据为正常数据,终端设备无需对这部分数据进行修复。可使用缓存于第一页面缓存的缓存数据,进行后续挂载流程。可大幅提升加载流程的速度,降低系统启动的耗时。
结合第一方面,在第一方面实施例中,该查询该第一页面缓存中,是否存在该缓存数据之后,还包括:
若该第一页面缓存中不存在缓存数据,则通过调用第五函数读取该第一磁盘分区的元数据;使用该第一磁盘分区的元数据进行挂载。以保证系统的正常启动。
结合第一方面,在第一方面实施例中,还包括:
内核态中,通过该第一线程申请第一内存空间;通过该第一线程读取该第一磁盘分区的元数据;通过该第一线程将该第一磁盘分区的元数据,写入该第一内存空间。通过该第一线程建立第一文件节点,该第一文件节点映射于该第一内存空间;用户态中,通过访问该第一文件节点,读取该第一内存空间中缓存的该第一磁盘分区的元数据;对该缓存的第一磁盘分区的元数据进行文件系统检测,并且,在通过访问该第一文件节点,向该第一内存空间中写入该结果的同时,向该第一磁盘分区中写入该结果。
本申请实施例中,终端设备系统启动时,在内核态中,通过调用第一线程,将第一磁盘分区的元数据缓存至第一内存空间。后续用户态中,进行文件系统检测时,直接读取第一内存空间中缓存的第一磁盘分区的元数据即可。由于第一线程将第一磁盘分区的元数据缓存至第一内存空间,这一动作可以与其它开机流程并行执行,因此,可有效降低系统启动的耗时。
第二方面,提供了一种终端设备,该终端设备具有实现上述第一方面中系统启动方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第三方面,提供了一种终端设备,该装置包括:收发器、存储器和处理器。其中,该收发器、该存储器和该处理器通过内部连接通路互相通信,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,以控制接收器接收信号,并控制发送器发送信号,并且当该处理器执行该存储器存储的指令时,使得该处理器执行第一方面或第一方面的任一种可能的实现方式中的方法。
第四方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码被计算机运行时,使得所述计算机执行上述各方面中的方法。
第五方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行上述各方面中的方法的指令。
第六方面,提供一种芯片系统,包括处理器,该处理器用于从存储器中调用并运行该计算机程序,该计算机程序用于实现上述各方面中的方法。
从以上技术方案可以看出,本申请实施例具有以下优点:
当内核态中的内核驱动检测到第一磁盘分区时,创建第一线程;在内核态中,通过第一线程读取第一磁盘分区的元数据;通过第一线程将第一磁盘分区的元数据,写入第一页面缓存。
在内核态中,第一线程将磁盘分区的元数据预先缓存至页面缓存中,后续用户态中的fsck流程,可以直接从该页面缓存中读取磁盘分区的元数据。由于,该页面缓存存储的区域为内存,相较于磁盘而言读写操作速率较大,因此,可有效避免终端设备系统启动时发生拥塞的情况,降低系统启动的耗时。
附图说明
图1为本申请实施例提供的一种系统启动方法的实施例示意图;
图2为本申请实施例提供的另一种系统启动方法的实施例示意图;
图3为本申请实施例中终端设备的一种实施例示意图;
图4为本申请实施例中的终端设备的硬件结构示意图;
图5为本申请实施例的芯片系统的结构示意图。
具体实施方式
在介绍本实施例之前,首先介绍本实施例中可能出现的几个概念。应理解的是,以下 的概念解释可能会因为本实施例的具体情况有所限制,但并不代表本申请仅能局限于该具体情况,以下概念的解释伴随不同实施例的具体情况可能也会存在差异。
文件系统检测:计算机中的文件系统一般会处于两种状态之一:清洁的(clean)或者脏的(dirty)。如果要在磁盘分区上挂载一个文件系统,这个文件系统必须是clean的,也就是说是结构完整的,元数据之间、元数据和数据之间是一致的。但有时文件系统的一致性可能被破坏,如系统掉电时,内存中的数据会丢失,或者由于磁盘发生故障,如磁盘坏道等,都会破坏文件系统数据的一致性。为了检查和维护不一致的文件系统,文件系统会提供文件系统检测(file system check,fsck)来方便用户检查和修复文件系统。
本申请提出的开机文件系统检测方法,可应用于终端设备中。终端设备可以是指向用户提供语音和/或数据连通性的无线终端,具有无线连接功能的手持式设备、或连接到无线调制解调器的其他处理设备。无线终端可以经无线接入网(radio access network,RAN)与一个或多个核心网进行通信,无线终端可以是移动终端,如移动电话(或称为“蜂窝”电话)和移动终端的计算机,还可以是个人计算机(personal computer),例如,可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置,它们与无线接入网交换语言和/或数据。例如,个人通信业务(personal communication service,PCS)电话、无绳电话、会话发起协议(session initiation protocol,SIP)话机、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)等设备。无线终端也可以称为系统、订户单元(subscriber unit)、订户站(subscriber station),移动站(mobile station)、移动台(mobile)、远程站(remote station)、接入点(access point)、远程终端(remote terminal)、接入终端(access terminal)、用户终端(user terminal)、用户代理(user agent)、用户设备(user device)、或用户装备(user equipment,UE),具体这里不做限定。
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例进行介绍。请参阅图1,图1为本申请实施例提供的一种系统启动方法的实施例示意图。本申请实施例中,以终端设备的系统为Linux系统为例进行举例说明。
101、内核态中的内核驱动检测磁盘分区。
本实施例中,终端设备开机启动后,首先内核态中的内核驱动检测磁盘分区,具体的,内核驱动通过检测磁盘分区的分区号是否为预设分区号,来确定该磁盘分区是否为预设的磁盘分区。
本实施例中,该预设的磁盘分区在本申请实施例中称为第一磁盘分区。在一种可选的实现方式中,该第一磁盘分区为“userdata”分区,此时预设第一磁盘分区的分区名为“userdata”。需要说明的是,第一磁盘分区除了预设为“userdata”分区外,还可以是其它磁盘分区,例如“A”分区。还可以是多个磁盘分区,例如第一磁盘分区为“data”分区以及“A”分区,此处不作限定。
在一种可选的实现方式中,内核驱动首先调用初始化函数,该初始化函数可以是“add_partition()”函数。然后,该初始化函数检测各个磁盘分区的分区名。当检测到分区名为“userdata”时,确定该分区名所对应的磁盘分区为第一磁盘分区。
由于内核驱动是通过遍历的方式,检测各个磁盘分区是否为第一磁盘分区,因此,每检测一个磁盘分区时,会给该磁盘分区对应的分区号。例如:当内核驱动检测第一个磁盘分区“A”时,标记该磁盘分区的分区号为“1”。当内核驱动检测第二个磁盘分区“userdata”时,标记该磁盘分区的分区号为“2”,由于该磁盘分区的分区名为“userdata”,与预定义的第一磁盘分区的分区名一致,因此确定该分区为第一磁盘分区,因此内核驱动确定该磁盘分区的分区号“2”为第一分区号。
102、当内核驱动检测到第一磁盘分区时,创建第一线程。
本实施例中,当内核驱动检测到某一磁盘分区的分区名为预设的分区名时,内核驱动确定当前检测到的磁盘分区为第一磁盘分区。当内核驱动检测到第一磁盘分区时,内核驱动可以通过调用第一函数创建第一线程,也可以是用户预定义的其它函数,此处不作限定。创建第一线程,该第一线程为独立运行的线程,与内核态中的其它线程并行运行。该第一线程可以是“fsck_boost”线程,也可以是用户预定义的其它线程,此处不作限定。
在一种可选的实现方式中,以第一函数为“kthread_run(read_pagecaches,NULL,"fsck_boost"”函数为例进行说明,当内核驱动通过第一函数检测到当前磁盘分区名为“userdata”,第一函数中“fsck_boost”返回值为“1”,即“fsck_boost=1”。此时内核驱动根据该返回值,确定当前磁盘分区为第一磁盘分区。此时内核驱动通过调用第一函数创建第一线程。
当创建第一线程时,内核驱动向第一线程传递第一磁盘分区所对应的通用结构体指针,内核驱动还向第一线程传递第一磁盘分区所对应的分区号,该通用结构体指针本申请实施例中称为第一结构体指针,该分区号为第一分区号。该结构体用于指示一个文件已经缓存了的物理页。系统在读取文件时,会先从该文件对应的索引关系查询所需数据是否已经缓存,如果数据未缓存,则对磁盘发起读写请求。
在一种可选的实现方式中,第一结构体指针为“struct gendisk*disk”。
103、通过第一线程打开第一磁盘分区。
本实施例中,首先第一线程根据第一结构体指针和第一分区号,通过调用第二函数来获得第一块指针。在一种可选的实现方式中,该第二函数可以是“bdget_disk(disk,partno)”,以第二函数是“bdget_disk(disk,partno)”为例,其中,“disk”为第一结构体指针,“partno”为第一分区号。第一线程通过第二函数可以获取第一磁盘分区所对应的块设备(block device)结构体指针。该指针称为第一块指针,具体的,第一块指针为“bdev”。
其次,根据第一块指针,通过第一线程调用第三函数,并向第三函数传递第一块指针。第三函数用于打开第一磁盘分区。在一种可选的实现方式中,第三函数可以是“blkdev_get(bdev,FMODE_READ,NULL)”,以第三函数为“blkdev_get(bdev,FMODE_READ,NULL)”为例,其中:“bdev”为第一块指针,通过第一块指针找到第一磁盘分区,“FMODE_READ”指示只读模式,“NULL”为无关变量,可以为空。
最后,通过第三函数以及向第三函数传递的第一块指针,第三函数打开第一磁盘分区。
104、通过第一线程调用页面操作函数,并使用页面操作函数读取第一磁盘分区的元数据。
本实施例中,当通过第一线程打开第一磁盘分区后,需要读取第一磁盘分区的元数据(meta data),此时第一线程可以调用页面操作函数,并通过页面操作函数读取第一磁盘分区的元数据。该页面操作函数可以是“pagechache”操作函数。该元数据用于保存该磁盘分区所对应文件系统的状态信息。
具体的,通过第一线程向该页面操作函数传输需要读取的数据量的大小,该需要读取的数据量的大小由第一磁盘分区的元数据大小决定。通常第一磁盘分区的总容量为64吉字节(gigabyte,GB)时,第一磁盘分区的元数据大小为200兆字节(mbit,MB)。因此,该需要读取的数据量的大小为200MB,若第一磁盘分区的总容量为512GB时,该需要读取的数据量的大小为500MB。需要说明的是,当第一磁盘分区的元数据大小为300MB时,该需要读取的数据量的大小可以小于300MB,例如为100MB;也可以大于300MB,例如为400MB,此处不作限定。
除此之外,还需要通过第一线程向该页面操作函数传输需要读取的数据量的偏移情况。由于页面是读取第一磁盘分区的元数据,而元数据(以大小为200MB为例)通常存放在磁盘分区地址的0-0~0xC800000,因此,该需要读取的数据量的偏移情况通常为0。
在一种可选的实现方式中,页面操作函数可以通过“__do_page_cache_readahead(mapping,NULL,offset,nr_to_read,0)”函数,读取第一磁盘分区的元数据。
需要说明的是,由于第一线程是在内核态的线程,并且第一线程是在内核态中读取第一磁盘分区的元数据,因此,第一线程所调用的页面操作函数是在内核态中运行,该页面操作函数中无需包括对“struct file”结构体指针的操作。
105、使用页面操作函数将第一磁盘分区的元数据写入第一页面缓存。
本实施例中,当读取了第一磁盘分区的元数据后,使用页面操作函数将第一磁盘分区的元数据写入第一页面缓存(pagecache)。
具体的,该第一页面缓存由第一地址空间(i_mapping)管理,该第一地址空间由第一索引节点(bd_inode)管理,第一索引节点由块设备指针(bdev)管理。在本申请实施例中,上述管理关系称为第一索引关系,该第一索引关系为“bdev-bd_inode-i_mapping”,第一索引节点对应于第一磁盘分区。
在一种可选的实现方式中,页面操作函数可以通过“__do_page_cache_readahead(mapping,NULL,offset,nr_to_read,0)”函数,将第一磁盘分区的元数据写入第一页面缓存。
当页面操作函数将第一磁盘分区的元数据写入第一页面缓存后,可通过第一索引关系读取缓存于第一页面缓存中的第一磁盘分区的元数据,该缓存于第一页面缓存的第一磁盘分区的元数据,称为缓存数据。
106、用户态中对第一磁盘分区的元数据进行文件系统检测。
本实施例中,步骤105后,终端设备按照原有流程执行开机动作。当系统启动进入用户态后,终端设备需要对第一磁盘分区进行文件系统检测(file system check,fsck)。由于在前述步骤中,终端设备已经将第一磁盘分区的元数据缓存至第一页面缓存中,因此, 在用户态中,可以通过对第一页面缓存中的缓存数据进行文件系统检测,代替读取第一磁盘分区并对第一磁盘分区的元数据进行文件系统检测。
具体的,在用户态中,可通过初始化进程(init)启动文件系统检测流程,此时,文件系统检测通过访问第一磁盘分区的地址“dev/block/userdata”,获取缓存数据,该缓存数据为第一页面缓存中缓存的第一磁盘分区的元数据。
在用户态中的“dev/block/userdata”与内核态中第一索引关系“bdev-bd_inode-i_mapping”具有关联关系。因此,可以通过访问“dev/block/userdata”,读取第一地址空间所对应的第一页面缓存中的缓存数据。当文件系统检测流程中需要进行读写操作时,读写操作的对象均是“dev/block/userdata”。需要说明的是,“dev/block/userdata”中的“userdata”仅做示例性说明,根据实际磁盘分区的情况,还可能为其它地址名。
当文件系统检测的结果为正常,则执行步骤107;当文件系统检测的结果为异常,则进入系统的原有文件系统检测流程,对第一磁盘分区进行修复。
107、若文件系统检测的结果为正常,则进行加载系统调用方式。
本实施例中,当文件系统检测结束后,且磁盘分区的文件系统检测结果为正常,终端设备需要对磁盘分区进行挂载(mount)。该挂载是磁盘分区的一种挂载命名,磁盘分区需要以某种文件系统挂载后,例如闪存友好文件系统(flash friendly file system,F2FS)或第四代扩展文件系统(fourth extended file system,EXT4),用户才可以访问分区上的文件。
因此,当步骤106中对缓存数据(也就是第一磁盘分区的元数据)的文件系统检测的结果为正常,则进入步骤107中。
首先,终端设备调用第五函数,启动挂载流程,通过第五函数调用第四函数,查询第一页面缓存中是否存在缓存数据。第四函数既可以是独立的函数,也可以是第五函数下的子函数,此处不作限定。
具体的,用户态中,终端设备通过第五函数获取第一索引关系。然后,第四函数根据第一索引关系,获知第一页面缓存。
在一种可选的实现方式中,当第一磁盘分区挂载为F2FS文件系统,第五函数中携带“sbi”,“sbi”第五函数中的一个变量。该“sbi”指向“sb”,该“sb”为linux系统中一种标准超级块(superblock)结构体指针,而该“sb”进一步指向“s_bdev”,该“s_bdev”指向文件系统被安装的块设备,在本实施例中,“s_bdev”指向的是第一磁盘分区所对应的块设备,也就是“bdev”,而“bdev”中存放有第一磁盘分区所对应的第一索引节点“bd_inode”,第一索引节点中管理着第一地址空间“i_mapping”。
因此,第五函数可通过“sbi-sb-s_bdev”获取到第一索引关系“bdev-bd_inode-i_mapping”,最终获得索引关系:“sbi-sb-s_bdev-bd_inode-i_mapping”。第五函数将第一索引关系传递给第四函数,第四函数可以通过第一索引关系,获取第一地址空间,该第一地址空间管理第一页面缓存。在本实施例中,第五函数可以是“get_meta_page_ex()”,第四函数可以是“page=find_lock_page(mapping,index)”,其中,“mapping”为第四函数读取的位置,在本实施例中,该“mapping”为“i_mapping”。
当第四函数检测到第一地址空间所对应的存储区域(第一页面缓存)中存在缓存数据时,终端设备使用该缓存数据进行挂载。在挂载成功后,终端设备调用“blkdev_put”释放第一页面缓存中的数据;当第四函数检测到第一地址空间所对应的存储区域中,不存在缓存数据时,第四函数将检测结果范围给第五函数。第五函数根据该检测结果从第一磁盘分区中,读取第一磁盘分区的元数据。在一种可选的实现方案中,若第四函数为第五函数的子函数,则第五函数根据该检测结果,调用第五函数中除第四函数外的函数,从第一磁盘分区中,读取第一磁盘分区的元数据。
第五函数使用第一磁盘分区的元数据,进行mount流程。
本申请实施例中,在内核态中,第一线程将磁盘分区的元数据预先缓存至页面缓存中,后续用户态中的fsck流程以及mount流程,可以直接从该页面缓存中读取磁盘分区的元数据。由于用户态中的fsck流程以及mount流程,可通过读取第一页面缓存中的缓存数据,代替读取第一磁盘分区并对第一磁盘分区的元数据进行fsck以及mount。而第一页面缓存中的数据缓存于内存中,因此读取第一页面缓存的速度远大于读取第一磁盘分区的速度。同时,第一线程将磁盘分区的元数据预先缓存至页面缓存这一动作,可以与其它系统启动流程并行执行,降低了系统启动的耗时。因此,可有效避免终端设备系统启动时发生拥塞的情况,降低系统启动的耗时。
除了通过上述实施例流程,降低系统启动的耗时。本申请还提出了另一种系统启动的方法,用以降低系统启动的耗时。请参阅图2,图2为本申请实施例提供的另一种系统启动方法的实施例示意图。本申请实施例中,同样以终端设备的系统为Linux系统为例进行举例说明。
201、内核态中的内核驱动检测磁盘分区。
本实施例中,与前述步骤101类似,此处不再赘述。
202、当内核驱动检测到第一磁盘分区时,创建第一线程。
本实施例中,与前述步骤102类似,此处不再赘述。
203、通过第一线程申请第一内存空间。
本实施例中,内核态中,当终端设备检测到第一磁盘分区后,创建第一线程。终端设备使用该第一线程在内存中申请第一内存空间。第一内存空间的大小与由第一磁盘分区的元数据大小决定。通常第一磁盘分区的总容量为64吉字节(gigabyte,GB)时,第一磁盘分区的元数据大小为200兆字节(mbit,MB)。因此,所申请的第一内存空间的大小为200MB,即申请200MB的内存块;若第一磁盘分区的总容量为512GB时,第一内存空间的大小为500MB。需要说明的是,当第一磁盘分区的元数据大小为300MB时,该需要读取的数据量的大小可以小于300MB,例如为100MB;也可以大于300MB,例如为400MB,此处不作限定。
204、读取第一磁盘分区的元数据。
本实施例中,当通过第一线程申请第一内存空间后,通过第一线程读取第一磁盘分区的元数据。
在一种可选的实现方式中,第一线程通过调用页面操作函数,读取第一磁盘分区的元数据,具体读取的方法与步骤104类似,此处不再赘述。
205、将第一磁盘分区的元数据写入第一内存空间。
本实施例中,第一线程将读取到的第一磁盘分区的元数据,写入第一内存空间。具体写入的方法与步骤105类似,此处不再赘述。
206、通过第一线程建立第一文件节点。
本实施例中,为了使得后续步骤可以对第一内存空间中,缓存的第一磁盘分区的元数据进行操作。需要通过第一线程建立第一文件节点,该第一文件节点映射至第一内存空间。
在一种可选的实现方式中,该第一文件节点可以是“proc”目录下的文件节点。该第一文件节点的地址名可以是“proc/block/xxx”,该“xxx”可以根据实际情况进行变动,例如第一文件节点的地址名可以是“proc/block/userdata”,还可以是“proc/block/123”此处不作限定。
具体的,在Linux系统中,“proc”目录是一种文件系统,即proc文件系统。proc文件系统是一种伪文件系统(也即虚拟文件系统),存储的是当前内核运行状态的一系列特殊文件,用户可以通过这些文件查看有关系统硬件及当前正在运行进程的信息,可以通过更改其中某些文件来改变内核的运行状态。
207、对第一内存空间中缓存的第一磁盘分区的元数据,进行文件系统检测。
本实施例中,用户态中,终端设备对第一内存空间中缓存的第一磁盘分区的元数据,进行文件系统检测。
在一种可选的实现方式中,用户态中的初始化进程(init),通过访问第一文件节点,实现对第一内存空间中缓存的第一磁盘分区的元数据的读取操作。进行文件系统检测的过程中,若需要进行写操作时,除了对第一内存空间进行写操作,还需要同时对第一磁盘分区进行写操作。以记录文件系统检测的结果为例,终端设备通过访问第一文件节点,向第一内存空间中写入该文件系统检测的结果;同时,向第一磁盘分区中写入该文件系统检测的结果。通过对内存块与磁盘的同步写入数据,以保证内存块中的数据与磁盘中对应位置的数据一致。
具体的,通过访问第一磁盘分区的地址“dev/block/userdata”访问第一磁盘分区。需要说明的是,该第一磁盘分区的地址仅做示例性说明,此处不作限定。
当文件系统检测结果为正常,终端设备释放第一内存空间。后续进行挂载(mount),通过访问第一磁盘分区的地址,读取第一磁盘分区的元数据。并使用该第一磁盘分区的元数据进行挂载。
本申请实施例中,终端设备系统启动时,在内核态中,通过调用第一线程,将第一磁盘分区的元数据缓存至第一内存空间。后续用户态中,进行文件系统检测时,直接读取第一内存空间中缓存的第一磁盘分区的元数据即可。由于第一线程将第一磁盘分区的元数据缓存至第一内存空间,这一动作可以与其它开机流程并行执行,因此,可有效降低系统启动的耗时。
上述主要方法的角度对本申请实施例提供的方案进行了介绍。可以理解的是,上述终端设备为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤, 本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法示例对终端设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块301中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
下面对本申请中的终端设备进行详细描述,请参阅图3,图3为本申请实施例中终端设备的一种实施例示意图。终端设备30包括:
处理模块301,用于当内核态中的内核驱动检测到第一磁盘分区时,创建第一线程;
读取模块302,用于在内核态中,通过第一线程读取第一磁盘分区的元数据;
写入模块303,用于通过第一线程将第一磁盘分区的元数据,写入第一页面缓存。
在本申请的一些实施例中,终端设备30包括:
处理模块301,具体用于通过内核态中的内核驱动检测当前磁盘分区是否为第一磁盘分区;
处理模块301,具体用于当通过内核驱动确定当前磁盘分区为第一磁盘分区时,调用第一函数创建第一线程;
处理模块301,具体用于向第一线程传递第一磁盘分区的第一结构体指针和第一分区号,其中,第一结构体指针为第一磁盘分区的通用磁盘结构体指针,第一分区号为第一磁盘分区的分区号。
在本申请的一些实施例中,终端设备30包括:
读取模块302,具体用于通过第一线程调用第三函数打开第一磁盘分区;
读取模块302,具体用于通过第一线程调用页面操作函数,并通过页面操作函数读取第一磁盘分区的元数据。
在本申请的一些实施例中,终端设备30包括:
读取模块302,还用于根据第一磁盘分区的第一结构体指针和第一分区号,通过第一线程调用第二函数以获得第一块指针,
其中,第一块指针为第一磁盘设备对应的块设备结构体指针;
读取模块302,还用于通过第一线程调用第三函数,并向第三函数传递第一块指针;
读取模块302,还用于根据第一块指针,通过第三函数打开第一磁盘分区。
在本申请的一些实施例中,终端设备30包括:
读取模块302,具体用于通过第一线程向页面操作函数传入需要读取的数据量的大小,以及需要读取的数据量的偏移情况,
根据读取的数据量的大小,以及需要读取的数据量的偏移情况,通过页面操作函数读取第一磁盘分区的元数据。
在本申请的一些实施例中,终端设备30包括:
写入模块303,具体用于通过页面操作函数,将读取的第一磁盘分区的元数据,写入第一页面缓存。
在本申请的一些实施例中,终端设备30包括:
处理模块301,还用于用户态中,对第一磁盘分区进行文件系统检测,若第一磁盘分区的文件系统检测fsck结果为正常,
处理模块301,还用于根据第一索引关系,并通过调用第四函数,查询第一页面缓存中,是否存在缓存数据,其中,第一索引关系包括管理第一页面缓存的第一地址空间,以及管理第一地址空间的第一索引节点;
处理模块301,还用于若存在,则使用缓存数据进行挂载。
在本申请的一些实施例中,终端设备30包括:
处理模块301,还用于若不存在,则通过调用第五函数读取第一磁盘分区的元数据;
处理模块301,还用于使用第一磁盘分区的元数据进行挂载。
在本申请的一些实施例中,终端设备30包括:
处理模块301,还用于内核态中,通过第一线程申请第一内存空间;
处理模块301,还用于通过第一线程读取第一磁盘分区的元数据;
处理模块301,还用于通过第一线程将第一磁盘分区的元数据,写入第一内存空间。
在本申请的一些实施例中,终端设备30包括:
处理模块301,还用于通过第一线程建立第一文件节点,第一文件节点映射于第一内存空间;
处理模块301,还用于用户态中,通过访问第一文件节点,读取第一内存空间中缓存的第一磁盘分区的元数据;
处理模块301,还用于对缓存的第一磁盘分区的元数据进行文件系统检测,并记录文件系统检测的结果。
在本申请的一些实施例中,终端设备30包括:
处理模块301,还用于在通过访问第一文件节点,向第一内存空间中写入结果的同时,向第一磁盘分区中写入结果。
上面从模块化功能实体的角度对本申请实施例中的终端设备进行描述,下面从硬件处理的角度对本申请实施例中的终端设备进行描述。图4为本申请实施例中的终端设备的硬件结构示意图。如图4所示,该终端设备可以包括:
图4是本申请实施例中的终端设备的硬件结构一个示意图。如图4所示,该终端设备可以包括:
该终端设备包括至少一个处理器401,通信线路407,存储器403以及至少一个通信接口404。
处理器401可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,服务器IC),或一个或多个用于控制本申请方案程序执行的集成电路。
通信线路407可包括一通路,在上述组件之间传送信息。
通信接口404,使用任何收发器一类的装置,用于与其他装置或通信网络通信,如以太网等。
存储器403可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储装置,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储装置,存储器可以是独立存在,通过通信线路407与处理器相连接。存储器也可以和处理器集成在一起。
其中,存储器403用于存储执行本申请方案的计算机执行指令,并由处理器401来控制执行。处理器401用于执行存储器403中存储的计算机执行指令,从而实现本申请上述实施例提供的系统启动方法。
可选的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。
在具体实现中,作为一种实施例,终端设备可以包括多个处理器,例如图4中的处理器401和处理器402。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个装置、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,终端设备还可以包括输出装置405和输入装置406。输出装置405和处理器401通信,可以以多种方式来显示信息。输入装置406和处理器401通信,可以以多种方式接收用户的输入。例如,输入装置406可以是鼠标、触摸屏装置或传感装置等。
本申请还提供了一种芯片系统,请参阅图5,该芯片系统包括处理器501、存储器502,该存储器502,用于保存终端设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
在一种可能的设计中,芯片系统还包括电源以及收发器(图5中未示出),用于支持上述终端设备实现其所涉及的功能,例如,通过收发器接收上述方法实施例中所涉及的数据和/或信息,如第一磁盘分区的元数据等。收发器在接收到上述方法实施例中所涉及的数据和/或信息后,将这些数据和/或信息发给处理器501,以便处理器501对这些数据和/或信息进行处理。
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容 易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台终端设备执行本申请各个实施例所述的方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、训练集构建装置、计算设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、训练集构建装置、计算设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的训练设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
另外,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
应理解,在本申请实施例中,“与A相应的B”表示B与A相关联,根据A可以确定B。但还应理解,根据A确定B并不意味着仅仅根据A确定B,还可以根据A和/或其它信息确定B。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应 认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台终端设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。
总之,以上所述仅为本申请技术方案的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (26)

  1. 一种系统启动方法,其特征在于,包括:
    当内核态中的内核驱动检测到第一磁盘分区时,创建第一线程;
    在内核态中,通过所述第一线程读取所述第一磁盘分区的元数据;
    通过所述第一线程将所述第一磁盘分区的元数据,写入第一页面缓存。
  2. 根据权利要求1所述的方法,其特征在于,所述当内核态中的所述内核驱动检测到所述第一磁盘分区时,创建所述第一线程,包括:
    通过内核态中的所述内核驱动检测当前磁盘分区是否为所述第一磁盘分区;
    当通过所述内核驱动确定当前磁盘分区为所述第一磁盘分区时,调用第一函数创建所述第一线程;
    向所述第一线程传递所述第一磁盘分区的第一结构体指针和第一分区号,其中,所述第一结构体指针为所述第一磁盘分区的通用磁盘结构体指针,所述第一分区号为所述第一磁盘分区的分区号。
  3. 根据权利要求2所述的方法,其特征在于,所述通过所述第一线程读取所述第一磁盘分区的元数据,所述方法包括:
    通过所述第一线程调用第三函数打开所述第一磁盘分区;
    通过所述第一线程调用页面操作函数,并通过所述页面操作函数读取所述第一磁盘分区的元数据。
  4. 根据权利要求3所述的方法,其特征在于,所述通过所述第一线程调用所述第三函数打开所述第一磁盘分区之前,所述方法还包括:
    根据所述第一磁盘分区的所述第一结构体指针和所述第一分区号,通过所述第一线程调用第二函数以获得第一块指针,
    其中,所述第一块指针为所述第一磁盘设备对应的块设备结构体指针;
    通过所述第一线程调用所述第三函数,并向所述第三函数传递所述第一块指针;
    根据所述第一块指针,通过所述第三函数打开所述第一磁盘分区。
  5. 根据权利要求3所述的方法,其特征在于,所述通过所述页面操作函数读取所述第一磁盘分区的元数据,包括:
    通过所述第一线程向所述页面操作函数传入需要读取的数据量的大小,以及需要读取的数据量的偏移情况,
    根据所述读取的数据量的大小,以及所述需要读取的数据量的偏移情况,通过所述页面操作函数读取所述第一磁盘分区的元数据。
  6. 根据权利要求5所述的方法,其特征在于,所述通过所述页面操作函数读取所述第一磁盘分区的元数据,包括:
    通过所述页面操作函数,将读取的所述第一磁盘分区的元数据,写入所述第一页面缓存。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述方法还包括:
    用户态中,对所述第一磁盘分区进行文件系统检测,若所述第一磁盘分区的文件系统 检测fsck结果为正常,
    根据所述第一索引关系,并通过调用第四函数,查询所述第一页面缓存中,是否存在缓存数据,其中,所述第一索引关系包括管理所述第一页面缓存的第一地址空间,以及管理所述第一地址空间的第一索引节点;
    若存在,则使用所述缓存数据进行挂载。
  8. 根据权利要求7所述的方法,其特征在于,所述查询所述第一页面缓存中,是否存在所述缓存数据之后,所述方法还包括:
    若不存在,则通过调用第五函数读取所述第一磁盘分区的元数据;
    使用所述第一磁盘分区的元数据进行挂载。
  9. 根据权利要求1所述的方法,其特征在于,所述创建所述第一线程之后,所述方法还包括:
    内核态中,通过所述第一线程申请第一内存空间;
    通过所述第一线程读取所述第一磁盘分区的元数据;
    通过所述第一线程将所述第一磁盘分区的元数据,写入所述第一内存空间。
  10. 根据权利要求9所述的方法,其特征在于,所述通过所述第一线程将所述第一磁盘分区的元数据,写入所述第一内存空间之后,所述方法还包括:
    通过所述第一线程建立第一文件节点,所述第一文件节点映射于所述第一内存空间;
    用户态中,通过访问所述第一文件节点,读取所述第一内存空间中缓存的所述第一磁盘分区的元数据;
    对所述缓存的第一磁盘分区的元数据进行文件系统检测,并记录文件系统检测的结果。
  11. 根据权利要求10所述的方法,其特征在于,所述记录文件系统检测的结果,包括:
    在通过访问所述第一文件节点,向所述第一内存空间中写入所述结果的同时,向所述第一磁盘分区中写入所述结果。
  12. 一种终端设备,其特征在于,包括:
    处理模块,用于当内核态中的内核驱动检测到第一磁盘分区时,创建第一线程;
    读取模块,用于在内核态中,通过所述第一线程读取所述第一磁盘分区的元数据;
    写入模块,用于通过所述第一线程将所述第一磁盘分区的元数据,写入第一页面缓存。
  13. 根据权利要求12所述的终端设备,其特征在于,
    所述处理模块,具体用于通过内核态中的所述内核驱动检测当前磁盘分区是否为所述第一磁盘分区;
    所述处理模块,具体用于当通过所述内核驱动确定当前磁盘分区为所述第一磁盘分区时,调用第一函数创建所述第一线程;
    所述处理模块,具体用于向所述第一线程传递所述第一磁盘分区的第一结构体指针和第一分区号,其中,所述第一结构体指针为所述第一磁盘分区的通用磁盘结构体指针,所述第一分区号为所述第一磁盘分区的分区号。
  14. 根据权利要求13所述的终端设备,其特征在于,
    所述读取模块,具体用于通过所述第一线程调用第三函数打开所述第一磁盘分区;
    所述读取模块,具体用于通过所述第一线程调用页面操作函数,并通过所述页面操作函数读取所述第一磁盘分区的元数据。
  15. 根据权利要求14所述的终端设备,其特征在于,
    所述读取模块,还用于根据所述第一磁盘分区的所述第一结构体指针和所述第一分区号,通过所述第一线程调用第二函数以获得第一块指针,
    其中,所述第一块指针为所述第一磁盘设备对应的块设备结构体指针;
    所述读取模块,还用于通过所述第一线程调用所述第三函数,并向所述第三函数传递所述第一块指针;
    所述读取模块,还用于根据所述第一块指针,通过所述第三函数打开所述第一磁盘分区。
  16. 根据权利要求14所述的终端设备,其特征在于,
    所述读取模块,具体用于通过所述第一线程向所述页面操作函数传入需要读取的数据量的大小,以及需要读取的数据量的偏移情况,
    根据所述读取的数据量的大小,以及所述需要读取的数据量的偏移情况,通过所述页面操作函数读取所述第一磁盘分区的元数据。
  17. 根据权利要求16所述的终端设备,其特征在于,
    所述写入模块,具体用于通过所述页面操作函数,将读取的所述第一磁盘分区的元数据,写入所述第一页面缓存。
  18. 根据权利要求12-17中任一项所述的终端设备,其特征在于,
    所述处理模块,还用于用户态中,对所述第一磁盘分区进行文件系统检测,若所述第一磁盘分区的文件系统检测fsck结果为正常,
    所述处理模块,还用于根据所述第一索引关系,并通过调用第四函数,查询所述第一页面缓存中,是否存在缓存数据,其中,所述第一索引关系包括管理所述第一页面缓存的第一地址空间,以及管理所述第一地址空间的第一索引节点;
    所述处理模块,还用于若存在,则使用所述缓存数据进行挂载。
  19. 根据权利要求18所述的终端设备,其特征在于,
    所述处理模块,还用于若不存在,则通过调用第五函数读取所述第一磁盘分区的元数据;
    所述处理模块,还用于使用所述第一磁盘分区的元数据进行挂载。
  20. 根据权利要求12所述的终端设备,其特征在于,
    所述处理模块,还用于内核态中,通过所述第一线程申请第一内存空间;
    所述处理模块,还用于通过所述第一线程读取所述第一磁盘分区的元数据;
    所述处理模块,还用于通过所述第一线程将所述第一磁盘分区的元数据,写入所述第一内存空间。
  21. 根据权利要求20所述的终端设备,其特征在于,
    所述处理模块,还用于通过所述第一线程建立第一文件节点,所述第一文件节点映射于所述第一内存空间;
    所述处理模块,还用于用户态中,通过访问所述第一文件节点,读取所述第一内存空间中缓存的所述第一磁盘分区的元数据;
    所述处理模块,还用于对所述缓存的第一磁盘分区的元数据进行文件系统检测,并记录文件系统检测的结果。
  22. 根据权利要求21所述的终端设备,其特征在于,
    所述处理模块,还用于在通过访问所述第一文件节点,向所述第一内存空间中写入所述结果的同时,向所述第一磁盘分区中写入所述结果。
  23. 一种终端设备,其特征在于,所述终端设备包括:输入/输出(I/O)接口、处理器和存储器,
    所述存储器中存储有程序指令;
    所述处理器用于执行所述存储器中存储的程序指令,执行如权利要求1至11中任一所述的方法。
  24. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在终端设备上运行时,使得所述终端设备执行如权利要求1至11中任一项所述的方法。
  25. 一种计算机程序,其特征在于,当所述计算机程序被终端设备执行时,用于执行权利要求1至11中任一项所述的方法。
  26. 一种芯片,包括至少一个处理器、存储器和通信接口,所述处理器与所述存储器以及所述通信接口连接,其特征在于,所述处理器用于读取并执行所述存储器中存储的计算机程序,以执行前述权利要求1至11中任一项所述的方法。
PCT/CN2020/100972 2019-07-12 2020-07-09 一种系统启动方法以及相关设备 WO2021008425A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20839633.3A EP3974969A4 (en) 2019-07-12 2020-07-09 PROCEDURE FOR COMMISSIONING A SYSTEM AND ASSOCIATED DEVICE
US17/626,331 US11868631B2 (en) 2019-07-12 2020-07-09 System startup method and related device

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201910631422.1 2019-07-12
CN201910631422 2019-07-12
CN201910917908.1 2019-09-26
CN201910917908.1A CN112214247B (zh) 2019-07-12 2019-09-26 一种系统启动方法以及相关设备

Publications (1)

Publication Number Publication Date
WO2021008425A1 true WO2021008425A1 (zh) 2021-01-21

Family

ID=74048631

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/100972 WO2021008425A1 (zh) 2019-07-12 2020-07-09 一种系统启动方法以及相关设备

Country Status (4)

Country Link
US (1) US11868631B2 (zh)
EP (1) EP3974969A4 (zh)
CN (2) CN112214247B (zh)
WO (1) WO2021008425A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115309591A (zh) * 2022-10-10 2022-11-08 浪潮电子信息产业股份有限公司 一种全闪存储系统的恢复方法及相关装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11907548B2 (en) * 2020-07-17 2024-02-20 Micron Technology, Inc. Storage of video data and file system metadata
CN113703667A (zh) * 2021-07-14 2021-11-26 深圳市有为信息技术发展有限公司 实时存储数据的文件系统处理方法、装置、车载终端及商用车
CN116302720A (zh) * 2021-12-14 2023-06-23 富联精密电子(天津)有限公司 槽位绑定方法、系统、终端设备及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102867141A (zh) * 2012-09-29 2013-01-09 北京奇虎科技有限公司 对主引导记录恶意程序进行处理的方法及装置
CN102930201A (zh) * 2012-09-29 2013-02-13 北京奇虎科技有限公司 对主引导记录恶意程序进行处理的方法及装置
CN103150506A (zh) * 2013-02-17 2013-06-12 北京奇虎科技有限公司 一种恶意程序检测的方法和装置
CN103677900A (zh) * 2013-11-15 2014-03-26 北京奇虎科技有限公司 一种计算机设备系统启动加速的方法和装置
US20150242155A1 (en) * 2012-08-27 2015-08-27 Samsung Electronics Co., Ltd. Method for protecting storage device data integrity in an external operating environment
US9336131B1 (en) * 2013-04-16 2016-05-10 Veritas Technologies, LLC Systems and methods for enabling virtual environments to mount non-native storage disks
CN109521962A (zh) * 2018-11-14 2019-03-26 郑州云海信息技术有限公司 一种元数据查询方法、装置、设备及计算机可读存储介质

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7970803B2 (en) * 2005-07-01 2011-06-28 Qnx Software Systems Gmbh & Co. Kg Optimized startup verification of file system integrity
CN100383739C (zh) * 2006-03-15 2008-04-23 浙江大学 嵌入式操作系统镜像启动的启动优化方法
CN101136900B (zh) * 2006-10-16 2011-08-10 中兴通讯股份有限公司 一种面向服务的快速透明故障转移装置及实现方法
CN100583099C (zh) * 2008-01-11 2010-01-20 清华大学 文件系统访问记录的动态采集方法
CN101706783A (zh) * 2009-11-16 2010-05-12 中兴通讯股份有限公司 一种嵌入式设备文件检测修复方法和装置
US8510597B2 (en) * 2011-02-08 2013-08-13 Wisconsin Alumni Research Foundation Providing restartable file systems within computing devices
CN103944958A (zh) * 2014-03-14 2014-07-23 中国科学院计算技术研究所 一种广域文件系统及实现方法
US10515192B2 (en) * 2016-02-02 2019-12-24 Vmware, Inc. Consistent snapshots and clones in an asymmetric virtual distributed file system
US10474636B2 (en) * 2016-03-25 2019-11-12 Amazon Technologies, Inc. Block allocation for low latency file systems
US11115239B2 (en) 2017-12-01 2021-09-07 Huawei Technologies Co., Ltd. Preamble structure supporting full duplex communications
CN114745802A (zh) 2017-12-29 2022-07-12 华为技术有限公司 无线局域网中多信道混合传输方法和装置
CN116318583B (zh) 2018-07-09 2023-12-08 华为技术有限公司 一种信令字段指示方法及装置
US10802734B2 (en) * 2018-09-28 2020-10-13 Western Digital Technologies, Inc. Method for fast boot read
US20190097850A1 (en) 2018-11-30 2019-03-28 Thomas Kenney Preamble design for extremely high throughput wireless communication with backward compatibility

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150242155A1 (en) * 2012-08-27 2015-08-27 Samsung Electronics Co., Ltd. Method for protecting storage device data integrity in an external operating environment
CN102867141A (zh) * 2012-09-29 2013-01-09 北京奇虎科技有限公司 对主引导记录恶意程序进行处理的方法及装置
CN102930201A (zh) * 2012-09-29 2013-02-13 北京奇虎科技有限公司 对主引导记录恶意程序进行处理的方法及装置
CN103150506A (zh) * 2013-02-17 2013-06-12 北京奇虎科技有限公司 一种恶意程序检测的方法和装置
US9336131B1 (en) * 2013-04-16 2016-05-10 Veritas Technologies, LLC Systems and methods for enabling virtual environments to mount non-native storage disks
CN103677900A (zh) * 2013-11-15 2014-03-26 北京奇虎科技有限公司 一种计算机设备系统启动加速的方法和装置
CN109521962A (zh) * 2018-11-14 2019-03-26 郑州云海信息技术有限公司 一种元数据查询方法、装置、设备及计算机可读存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3974969A4

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115309591A (zh) * 2022-10-10 2022-11-08 浪潮电子信息产业股份有限公司 一种全闪存储系统的恢复方法及相关装置

Also Published As

Publication number Publication date
EP3974969A4 (en) 2022-07-06
CN112214247B (zh) 2022-05-17
US11868631B2 (en) 2024-01-09
US20220269428A1 (en) 2022-08-25
EP3974969A1 (en) 2022-03-30
CN112214247A (zh) 2021-01-12
CN115061734A (zh) 2022-09-16

Similar Documents

Publication Publication Date Title
WO2021008425A1 (zh) 一种系统启动方法以及相关设备
US8595366B2 (en) Method and system for dynamically creating and servicing master-slave pairs within and across switch fabrics of a portable computing device
JP4124331B2 (ja) Dbms向け仮想ボリューム作成・管理方法
WO2010072083A1 (zh) 基于web应用的数据库系统及其数据管理方法
US10599622B2 (en) Implementing storage volumes over multiple tiers
US20070156763A1 (en) Storage management system and method thereof
WO2019080531A1 (zh) 一种信息采集及内存释放的方法及装置
CN114780252B (zh) 数据仓库系统的资源管理方法及装置
WO2023036005A1 (zh) 信息处理方法及装置
CN115794669A (zh) 一种扩展内存的方法、装置及相关设备
CN111158851B (zh) 一种虚拟机快速部署方法
US20220107752A1 (en) Data access method and apparatus
WO2021018275A1 (zh) 一种开机文件系统检测方法以及相关设备
WO2021142768A1 (zh) 一种文件系统的克隆方法及装置
WO2023193528A1 (zh) 文件解压方法、装置、电子设备及计算机可读存储介质
US20230088344A1 (en) Storage medium management method and apparatus, device, and computer-readable storage medium
CN106302733A (zh) 一种分布式集群融合nfs协议的实现方法及装置
WO2020151337A1 (zh) 分布式文件处理方法、装置、计算机设备以及存储介质
WO2022262623A1 (zh) 一种数据交换方法及装置
WO2023070462A1 (zh) 一种文件去重方法、装置和设备
WO2023125285A1 (zh) 一种数据库系统更新方法及相关装置
WO2024022329A1 (zh) 一种基于键值存储系统的数据管理方法及其相关设备
WO2024082702A1 (zh) 数据处理方法、装置、芯片以及计算机可读存储介质
WO2024045643A1 (zh) 数据访问设备、方法、系统、数据处理单元及网卡
WO2024061344A1 (zh) 数据迁移方法、装置、芯片以及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20839633

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020839633

Country of ref document: EP

Effective date: 20211221

NENP Non-entry into the national phase

Ref country code: DE