WO2022089000A1 - Procédé de vérification de système de fichiers, dispositif électronique et support de stockage lisible par ordinateur - Google Patents

Procédé de vérification de système de fichiers, dispositif électronique et support de stockage lisible par ordinateur Download PDF

Info

Publication number
WO2022089000A1
WO2022089000A1 PCT/CN2021/116730 CN2021116730W WO2022089000A1 WO 2022089000 A1 WO2022089000 A1 WO 2022089000A1 CN 2021116730 W CN2021116730 W CN 2021116730W WO 2022089000 A1 WO2022089000 A1 WO 2022089000A1
Authority
WO
WIPO (PCT)
Prior art keywords
file system
electronic device
disk
file
detection process
Prior art date
Application number
PCT/CN2021/116730
Other languages
English (en)
Chinese (zh)
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 华为技术有限公司
Publication of WO2022089000A1 publication Critical patent/WO2022089000A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present application relates to the field of storage technologies, and in particular, to a file system detection method, an electronic device, and a computer-readable storage medium.
  • the electronic devices Due to the susceptibility to power down of electronic devices (eg, mobile phones, tablet computers, etc.), the electronic devices may lose power during the process of reading the disk file, resulting in damage to the file system. Therefore, in order to ensure the normal availability of the file system of the disk partition, the electronic device needs to perform a file system check (fsck) on the disk partition during the boot process to determine whether the file system of the disk partition is damaged and take corresponding repair actions.
  • fsck file system check
  • the fsck process When the fsck process detects a file system abnormality, it needs to perform detection on all files in the file system.
  • the time for the fsck process to detect files in the file system is related to the number of files stored on the disk partition. The more files, the longer the detection time. Taking a mobile phone with 128GB of storage space (100GB used, with 3 million+ files) as an example, it takes up to 620 seconds to scan the entire disk, making the mobile phone unable to turn on for a long time. Therefore, during the detection process of the files of the file system, the user may forcibly restart the mobile phone, or the system may force restart the mobile phone when the system detects an abnormal startup.
  • the present application provides a file system detection method, an electronic device and a computer-readable storage medium, which can shorten the boot time.
  • a file system detection method applied to an electronic device, and the method includes:
  • the file system detection process exists, save the running state of the file system detection process to the disk, and the running state is used to determine when the file system detection process performs a full disk scan on the file system after restarting the electronic device start position.
  • the running state of the file system detection process is saved to the disk, and the running state is used to determine the starting position when the file system detection process performs a full-disk scan on the file system after restarting the electronic device. Therefore, after restarting the electronic device, when a full disk scan needs to be performed, the file system detection process can obtain the running state from the disk, and then can perform the full disk scan from the starting position.
  • saving the running state means to retain the file detection results before the restart of the electronic device, so in this solution, after the electronic device is restarted, it can Avoid repeated detection of files that have been detected before restarting, thus shortening the boot time.
  • the method before saving the running state of the file system detection process to the disk, the method further includes: if an instruction instructing to shut down the electronic device is received, sending an instruction to the The file system detection process sends a preset signal, and the preset signal can be captured by the file system detection process; the saving the running state of the file system detection process to the disk includes: in the file system detection process After capturing the preset signal, the running state of the file system detection process is saved to the disk.
  • the file system detection process Since the preset signal can be captured by the file system detection process, after the electronic device sends the preset signal, the file system detection process will not forcibly interrupt and shut down the electronic device, but capture the preset signal and execute the save command to save the file.
  • the operating state of the system detection process is saved to the disk, and the electronic device is turned off after executing the save instruction, so that after restarting the electronic device, the operating state before turning off the electronic device can be read from the disk.
  • saving the running state of the file system detection process to a disk includes: if the file system detection process exists, Then, the running state of the file system detection process is periodically saved to the disk according to a preset period, so that when the electronic device is restarted, the running state before restarting the electronic device can be read from the disk. Moreover, if the electronic device is shut down abnormally (for example, the electronic device is suddenly powered off), the operating state before the shutdown can still be saved in the disk. After restarting the electronic device, the operating state of the file system detection process before the restart can be read from the disk. When a full-scale scan is required, the starting position can be determined according to the operating status, and file detection is performed from the starting position to avoid repeated detection of files before the starting position, thereby shortening the boot time.
  • the method further includes:
  • the operating state is obtained from the disk; the starting position when performing a full-disk scan on the file system is determined according to the operating status;
  • the files in the file system are detected from the start position by the file system detection process.
  • the operating state is obtained from the disk, the starting position of the full-disk scanning is determined according to the operating status, and the files in the file system are detected from the starting position through the file system detection process, Therefore, the file detection results of the file system detection process before the electronic device is closed can be retained, the repeated detection of files is reduced, the detection speed of the file system is improved, and the startup time is shortened.
  • the method further includes: after restarting the electronic device, if it is determined that a full disk scan needs to be performed on the file system, scanning the file system at the starting position Previous files are not checked. Therefore, it is possible to avoid repeated detection of files before the starting position, reduce the time for file detection, and improve the startup speed.
  • the running status includes a first identifier of a file in the file system that is being detected by the file system detection process;
  • the starting position when the system performs a full scan including:
  • the directory entry in the file system is scanned by the file system detection process; when there is a target directory entry associated with the first identifier, the file node corresponding to the target directory entry is used as the starting position. Because the file system detection process only scans the directory entries before the target directory entry before scanning the target directory entry, and does not detect the file node corresponding to the directory entry, it starts to scan the file node when the target directory entry is scanned. File detection is to perform health detection on files, so as to avoid repeated detection of files that have been detected before the electronic device is turned off, thereby improving the speed of file detection.
  • the method further includes:
  • the running status is updated to a first value, where the first value indicates that the file system detection process performs a full disk scan next time from the The detection of the first file in the file system is started. After the next reboot, if a full disk scan is required, the first file in the file system is detected to determine that the disk partition can be accessed normally.
  • the method further includes:
  • the running state is updated to a second value, and the second value indicates that when the file system detection process performs a full disk scan next time, The first file starts detection. After the next restart, if a full disk scan is required, the detection starts from the first file in the file system to ensure that the disk data detected last time has not been modified.
  • the file located at the start position is not the first file in the file system. Compared with the file detection from the first file, the file detection is performed from the file at the starting position, which improves the detection speed of the file system.
  • the running state is stored in a preset position of the disk, and the preset position and the file being detected by the file system detection process are located in the same disk partition, so that the file The system detection process quickly obtains the running status of the disk storage and simplifies the program code for saving the running status.
  • a file system detection device including a processing module and a storage module;
  • the processing module is used to detect whether there is a file system detection process in the electronic device
  • the storage module is configured to save the running state of the file system detection process to a disk if the file system detection process exists, and the running state is used to determine whether the file system detection process is suitable for the file system detection process after restarting the electronic device.
  • the processing module is further configured to: if an instruction instructing to shut down the electronic device is received, send a preset signal to the file system detection process, the preset signal can be captured by the file system detection process;
  • the storage module is specifically configured to: after the file system detection process captures the preset signal, save the running state of the file system detection process to the disk.
  • the storage module is specifically configured to: if the file system detection process exists, periodically save the running state of the file system detection process to a preset period. disk.
  • the processing module is further configured to:
  • the files in the file system are detected from the start position by the file system detection process.
  • the processing module is further configured to:
  • the running state includes a first identifier of a file in the file system that is being detected by the file system detection process; the processing module is further configured to:
  • the file node corresponding to the target directory entry is used as the starting position.
  • the storage module is further configured to:
  • the running status is updated to a first value, where the first value indicates that the file system detection process performs a full disk scan next time from the The detection of the first file in the file system is started.
  • the storage module is further configured to:
  • the running state is updated to a second value, and the second value indicates that when the file system detection process performs a full disk scan next time, The first file starts detection.
  • the file located at the start position is not the first file in the file system.
  • the running state is stored in a preset position of the disk, and the preset position and the file being detected by the file system detection process are located in the same disk partition.
  • an electronic device including a processor for executing a computer program stored in a memory to implement the method for detecting a file system according to the first aspect, wherein the memory may be an electronic device internal memory, or external memory.
  • a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the file system detection method according to the first aspect.
  • a fifth aspect provides a chip system, the chip system includes a memory and a processor, and the processor executes a computer program stored in the memory to implement the file system detection method according to the first aspect, wherein , the memory can be the memory in the chip system or the external memory.
  • a sixth aspect provides a computer program product that, when the computer program product runs on an electronic device, enables the electronic device to execute the file system detection method described in the first aspect above.
  • FIG. 1 is a schematic flowchart of a file system detection method provided by an embodiment of the present application
  • FIG. 2 is a schematic interface diagram of an application scenario of the application
  • FIG. 3 is a schematic interface diagram of another application scenario of the application.
  • FIG. 4 is a schematic flowchart of restarting an electronic device according to an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a file system detection method provided by another embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a file system detection process in an application scenario of the present application.
  • FIG. 7 is a schematic flowchart of a file system detection process in another application scenario of the present application.
  • FIG. 8 is a schematic flowchart of a file system detection process in yet another application scenario of the present application.
  • FIG. 9 is a schematic diagram of an electronic device provided by an embodiment of the present application.
  • the term “if” may be contextually interpreted as “when” or “once” or “in response to determining” or “in response to detecting “.
  • the phrases “if it is determined” or “if the [described condition or event] is detected” may be interpreted, depending on the context, to mean “once it is determined” or “in response to the determination” or “once the [described condition or event] is detected. ]” or “in response to detection of the [described condition or event]”.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • the file system of the disk partition needs to be detected by the file system check (fsck) process.
  • fsck file system check
  • all File detection requires a full scan of the file system.
  • the fsck process takes a long time to scan the entire disk.
  • the electronic device will restart the electronic device when it detects that the boot time is long, or when it detects the user's restart instruction. Restart the electronics.
  • the system of the electronic device detects a restart instruction, it sends a SIGKILL signal to all processes.
  • the SIGKILL signal cannot be captured.
  • all processes are forcibly terminated. If there is an fsck process, the fsck process will also be forcibly terminated.
  • the electronic device executes the restart instruction, that is, the electronic device enters the boot process after the shutdown process is performed. Since the fsck process is forcibly terminated, the file detection information before the restart cannot be recorded.
  • the fsck process needs to start the detection from the first file of the file system, which wastes the file detection results before the restart, resulting in a longer boot time of the electronic device.
  • the present application provides a file system detection method.
  • the running state of the file system detection process is saved to a disk, and the running state is used to determine whether the file system detection process has any effect on the file system after restarting the electronic device.
  • the starting position when the system performs a full scan.
  • the fsck process can perform a full scan from the starting position. Since the running state represents the ongoing detection of the fsck process and the completed file detection results before the restart of the electronic device, saving the running state means to retain the file detection results of the fsck process before the electronic device is restarted. After that, it is possible to avoid repeated detection of the files that have been detected before the shutdown, thus shortening the startup time.
  • the file system detection method provided by the present application is exemplarily described below with reference to specific embodiments.
  • the file system detection method provided by the embodiment of the present application is applied to an electronic device.
  • the electronic device described in the embodiments of the present application may be a mobile phone, a tablet computer, a handheld computer, a personal digital assistant (personal digital assistant, PDA), and the like.
  • PDA personal digital assistant
  • a file system detection method provided by an embodiment of the present application includes:
  • the embodiment of the present application only takes the fsck process as an example, and any process that can detect the file system can replace the fsck process in the embodiment of the present application, which is uniformly described here and will not be repeated in the following.
  • the file system may be the F2FS file system of the Android system.
  • the fsck process is used to detect the file system of the disk partition before the electronic device is powered on. The fsck process first detects the file system, and when an abnormality of the file system is detected, all files in the file system are detected. If the fsck process exists in the electronic device, it means that the fsck process is performing file system detection or file detection.
  • the electronic device can detect whether there is an fsck process when a preset condition is reached, or can continuously detect whether there is an fsck process before starting up.
  • the preset condition may be when the electronic device needs to be turned off.
  • the system may save the running state of the fsck process to the disk, or the fsck process may save the running state of the fsck process to the disk.
  • the running status of the fsck process can indicate that the fsck process is detecting the file system, or the fsck process is detecting files in the file system. If the fsck process is detecting the file system The running status also includes information about the files being detected by the fsck process.
  • the fsck process or the system After saving the running state of the fsck process to disk, restart the electronic device. After the electronic device is restarted, the fsck process or the system reads the running state of the fsck process from the disk. According to the running state of the fsck process, the file being detected by the fsck process before the electronic device is restarted can be determined. Since the fsck process is detected in a fixed order each time during the full disk scan, it can also be determined that the fsck process has completed the file detection before restarting the electronic device according to the running state of the fsck process.
  • the first file of the file system will be used as the starting position of the full disk scan. If it is determined based on the operating status that the fsck process is detecting the file, the file node corresponding to the file being detected by the fsck process is used as the starting position of the full disk scan.
  • the running status of the fsck process includes the first identifier of the file being detected by the fsck process, and the first identifier may be a node identifier (node identifier). id), the first identifier may also be a data block address (block address), or may include both a node identifier and a data block address.
  • the node identifier is the identifier of the file node
  • the file node is the metadata of the file
  • the storage location of the metadata of the file in the disk corresponds to a data block address. For example, there are 100 files in the file system.
  • the fsck process When the running state of the fsck process needs to be saved, if the fsck process is detecting the 30th file, the first identifier of the 30th file is stored in the preset position of the disk. After the storage of the first identification is completed, the electronic device is restarted. After the electronic device is restarted, if it is necessary to perform a full-disk scan, the first identifier is read from the preset position of the disk. According to the first identifier, the file that is being detected by the fsck process before the electronic device is restarted can be determined, so that the file is started from the file. detection.
  • the running status of the fsck process may be the first value, such as 0, or it may be set to null.
  • the first value is stored in a preset position of the disk. After the first value is stored, the electronic device is restarted. After the electronic device is restarted, if a full-disk scan needs to be performed, the first value is read from the preset position of the disk. According to the first value, it can be determined that the fsck process is detecting the file system before restarting the electronic device. Therefore, from the file system The first file to start performing a full scan.
  • the running state of the fsck process is stored in a preset location on the disk, where the preset location may be a location separately allocated on the disk for storing the running state of the fsck process, for example, a specified location on the disk A, or the preset location can be any location on the disk.
  • the preset location may be the same disk partition as the file being detected by the fsck process, or may be a preset disk partition.
  • the electronic device includes C drive, D drive and E drive.
  • the running state of the fsck process needs to be saved, no matter which disk partition the fsck process is detecting, the running state is saved in the C drive, that is, the preset location is the preset disk partition.
  • the preset location and the file being detected by the fsck process are located in the same disk partition, the recorded running status information can be simplified, the data reading speed can be improved, and the system running speed can be further improved.
  • the running state of the file system detection process is saved to the disk, and the running state is used to determine the starting position when the file system detection process performs a full-disk scan on the file system after restarting the electronic device. Therefore, after restarting the electronic device, when a full disk scan needs to be performed, the file system detection process can obtain the running state from the disk, and then can perform the full disk scan from the starting position. Since the running state is saved, the file detection results of the file system detection process before the restart of the electronic device are preserved. Therefore, in this solution, after the electronic device is restarted, repeated detection of the files that have been detected before the restart can be avoided, thus shortening the startup time. duration.
  • the fsck process captures the preset signal
  • the running state of the fsck process is saved to the disk.
  • the electronic device receives an instruction instructing to shut down the electronic device, it sends a preset signal to the fsck process, where the preset signal can be captured by the fsck process. After the fsck process captures the preset signal, save the running state of the fsck process to the disk.
  • the preset signal may be a SIGINT signal or a SIGTERM signal, or other signals compiled by the user that can be captured.
  • the fact that the preset signal can be captured by the fsck process means that after the system sends the preset signal, the fsck process will not be terminated directly. After capturing the preset signal, the fsck process can perform corresponding operations, such as recording the running status.
  • the instruction instructing to shut down the electronic device may be input by the user, for example, the user presses a shutdown button or a restart button of the electronic device; the instruction instructing to shut down the electronic device may also be generated by the electronic device when it detects that the file detection duration exceeds a preset duration.
  • the action of determining to turn off the electronic device or restart the electronic device may also be determined by the electronic device autonomously.
  • the fsck process performs a full scan
  • the electronic device detects that the user has long pressed the "shutdown" button
  • the interface shown in Figure 2 is displayed. Operation to send a preset signal to the fsck process.
  • the electronic device displays the interface shown in FIG. 3
  • a preset signal is sent to the fsck process.
  • the electronic device detects that the file detection duration exceeds the preset duration, that is, the electronic device has not entered the system normally within the preset duration, a preset signal is sent to the fsck process.
  • the preset duration may be set to 10 minutes.
  • the preset signal is the SIGINT signal or the SIGTERM signal
  • the process of restarting the electronic device is shown in Figure 4.
  • the system detects whether there is an fsck process. Send a SIGINT signal or SIGTERM signal to the fsck process. After the fsck process captures the SIGINT signal or SIGTERM signal, it saves the running state in the preset position of the disk, and then restarts the electronic device. If the system detects that the fsck process does not exist, it directly restarts the electronic device.
  • the electronic device detects the existence of the fsck process before closing, it sends a preset signal to the fsck process.
  • the preset signal can be captured by the fsck process.
  • the running state of the fsck process is saved. to the disk before turning off the electronics. Therefore, after restarting the electronic device, the running state of the fsck process before the restart can be read from the disk. Since the running status is used to determine the starting position of the fsck process to detect the files in the file system after restarting the electronic device, the electronic device can determine the starting position of the fsck process to detect the files in the file system according to the running status. When a full scan is required, file detection can be performed from the starting position, so that the file detection results of the fsck process before the electronic device is restarted can be retained, repeated detections can be reduced, and the boot time can be shortened.
  • the fsck process may periodically save the running state of the fsck process to the disk according to a preset period. For example, the fsck process saves the current running state of the fsck process to a preset position on the disk every other cycle (for example, 2 seconds) during the full disk scan. For example, in the 1st second, the fsck process scans to the 1st file, the recorded running state is file 1, and saves it to the preset location; in the 3rd second, the fsck process scans to the 20th file, the recorded operation status The state is file 20 and is saved to the preset location.
  • a preset period for example, the fsck process saves the current running state of the fsck process to a preset position on the disk every other cycle (for example, 2 seconds) during the full disk scan. For example, in the 1st second, the fsck process scans to the 1st file, the recorded running state is file 1, and saves it to the preset location;
  • the fsck process can save each moment and the corresponding running state to a preset location; it can also clear the running state saved at the previous moment when saving the running state at the next moment, for example, when saving the running state of the third second
  • the operation state saved in the 1st second is cleared, and when the operation state in the 5th second is saved, the operation state in the 3rd second is cleared. Therefore, in the event of an abnormal shutdown (eg, sudden power failure of an electronic device, blue screen), the operating state before the shutdown can still be saved in the disk.
  • the running status of the fsck process before the restart can be read from the preset position.
  • the starting position can be determined according to the running status, and the file detection can be performed from the starting position to avoid any Duplicate detection of files before the location reduces boot time.
  • a file system detection method provided by another embodiment of the present application includes:
  • the fsck process detects the file system of the disk partition, and if an abnormality of the file system is detected, the entire disk scan of the file system is performed.
  • the startup of the electronic device may be the boot process after the user triggers the restart operation, or the boot process after the system triggers the restart operation, or the electronic device starts the electronic device according to the user's boot operation. If the file system needs a full disk scan, the fsck process reads the running status from a preset location on the disk.
  • S202 Determine the starting position when performing a full-disk scan on the file system according to the running state.
  • the electronic device can determine the file that is being detected by the fsck process before the restart according to the running state, and use the file node corresponding to the file as the starting position of the file detection.
  • the fsck process when the file system needs to scan the entire disk, the fsck process reads the first identifier stored in the disk, and then starts from the first directory entry in the file system, and scans each file system in turn. directory entry.
  • the directory entry is used to identify the storage path corresponding to the file. For example, if the directory entry of the file is AB/mn/12, the file is stored in the path 12, the path 12 is stored in the path mn, and the path mn is stored in the path AB. .
  • the directory entry, node identifier and data block address associated with each file are stored in the disk.
  • the electronic device can read the corresponding node identifier or data block address according to the directory entry, and compare the read node identifier or data block address with the first identifier. By comparison, if there is a node identifier or data block address that is the same as the first identifier, the directory entry associated with the node identifier or data block address is the target directory entry, and the file node corresponding to the target directory entry is used as the file detected.
  • the starting position that is, the file corresponding to the file node and the file after the file node are detected.
  • the fsck process starts from the start position, first detects the files at the start position, and then sequentially detects the files after the start position, and does not detect the files before the start position. If the starting position is the first file, the detection starts from the first file in the file system. If the starting position is not the first file, the detection starts from the file corresponding to the file node in the middle of the file system. For example, if there are 100 files in the file system, each file corresponds to a node ID, and the running status stored in the preset location is the node ID of the 20th file, when performing a full scan, the detection starts from the 20th file. The 20th to 100th files are checked, and the 1st to 19th files are not checked.
  • the fsck process starts from the start position, first detects the files at the start position, and then sequentially detects the files after the start position. If the file at the start position or the files after the start position is detected to be abnormal, then After the files after the start position are detected, the files before the start position are detected again; if the files at the start position or the files after the start position are detected without abnormality, the files before the start position are not detected.
  • the first identifier is a node identifier
  • the process of file system detection is shown in FIG. 6 . Specifically, when the fsck process detects the file system, if the file system is abnormal, it is determined that a full disk scan of the file system is required. If a full-disk scan is required, the pre-stored node identifiers are first read from a preset location, and the node identifiers of each file node are sequentially read from the file node of the first file in the disk partition.
  • the read node ID and the pre-stored node ID have been matched successfully, if not, it is judged whether the read node ID is equal to the pre-stored node ID, if read If the obtained node ID is not equal to the pre-stored node ID, the file corresponding to the current node ID will not be checked for health, and the next node ID will continue to be read; if the read node ID is equal to the pre-stored node ID, the description If the matching is successful, the matching success information will be recorded, and the file corresponding to the current node will be detected, that is, the health check will be performed on the file corresponding to the current node.
  • the node ID of the node has been successfully matched with the pre-stored node ID, and the file corresponding to the current node is detected. For example, there are 100 files in the file system, each file corresponds to a node ID, and the running status stored in the preset location is the node ID of the 20th file. Get the node ID of each file node. Since the node IDs of the 1st to 19th files do not match the node IDs of the 20th file, for the 1st to 19th node IDs, after reading the current node ID, the next node ID is read, and the file is not healthy. Detection, when the 20th node ID is scanned, the match is successful, starting from the 20th file, the health detection is performed on the 20th-100th file.
  • the process of file system detection is shown in FIG. 7 .
  • the pre-stored node identifiers are first read from a preset location, and the node identifiers of each file node are sequentially read from the first file node in the disk partition. Then after each successful reading, it is judged whether the read node ID is equal to the pre-stored node ID. If the read node ID is not equal to the pre-stored node ID, the file corresponding to the current node ID is not detected.
  • the file detection refers to detecting the consistency between the data in the file and the metadata.
  • the specific process of file system detection is shown in Figure 8.
  • the pre-stored node identifier is read from a preset location, and the node identifier is the file corresponding to the file being detected before the electronic device is restarted.
  • Node identifier that is, the breakpoint of the fsck process during file system detection.
  • After reading the pre-stored node identifier check the root node, that is, the root node, and then scan all directory entries in each level of directory. For each level of directory, after scanning one directory entry, scan the next directory entry in turn.
  • Directory entry in the layer directory If the node is not a directory, it is judged whether the node is a file. If the node is a file, the consistency detection is performed on the metadata related to the node data index. After the detection is completed, the next directory entry is scanned. If the node is not a file, continue to scan the next directory entry to check the consistency of the next directory entry.
  • the running state is obtained from the preset position, and the running state is used to represent the file being detected by the fsck process before the electronic device is closed, and the file is determined according to the running state.
  • the start position of the detection, and the files in the file system are detected from the start position by the fsck process, so that the file detection results of the fsck process before the electronic device is closed can be preserved, and repeated detection of the files before the start position can be avoided.
  • the detection speed of the file system thereby shortening the boot time.
  • file system detection needs to be performed on each disk partition in sequence, for example, the C disk, D disk, and E disk are detected in sequence.
  • the fsck process first detects the file system, and performs a full-disk scan of the file system when there is an abnormality in the file system. After the file system of the current disk partition completes a full scan, the same detection is performed on the next disk partition.
  • the running state of the preset location is updated to a first value, for example, 0.
  • a full disk scan of the file system is required. Before the full disk scan, if the operating status obtained from the preset location is: If the value is the first, a full scan starts from the first file in the file system.
  • the corresponding disk partition needs to be mounted (mount).
  • the disk partition is mounted with the preset file system type, the user can access the disk partition.
  • the running state of the preset location is updated to a second value, and the second value may be the same as the first value, for example, both are 0, or can be different.
  • the electronic device needs to perform a full-disk scan after the next startup, if the running state obtained from the preset position is the second value, the full-disk scan will be performed from the first file of the file system, so that the file system can be detected in time. Modify information.
  • the disk partition is forcibly mounted without detecting the file system. After the disk partition is mounted, the running state is updated to the second value. After the next startup of the electronic device, when a full-disk scan needs to be performed, it is determined to perform a full-disk scan from the first file according to the second value, so that it can be detected in time. File system modification information.
  • the sequence of file system detection and mounting is that after the file systems and files of the disk partition are detected, the disk partition is mounted, and then the next disk partition is detected. Therefore, if the fsck process is interrupted during the detection process, when the electronic device is restarted next time, it is necessary to start the detection from the first disk partition to complete the mounting of the disk partition. For example, if the electronic device includes disk C, disk D, and disk E, each time the electronic device is started, the detection starts from the C disk. For each disk partition, the file system is first detected. If the file system is normal, the current disk partition is mounted and the next disk partition is detected; if the file system is abnormal, it is determined that a full disk scan needs to be performed. , according to the running state of the preset position, determine the starting position of the full scan. After the full-disk scan is complete, mount the current disk partition and detect the next disk partition.
  • the sequence of file system detection and mounting may be that after the file systems and files of all disk partitions are detected, each disk partition is mounted in sequence. Therefore, if the fsck process is interrupted during the detection process, when the electronic device is restarted next time, it can be determined that all the disk partitions are not mounted, and therefore, the files of the disk partitions are not modified. Therefore, when the electronic device is restarted next time, the detection can be started from the disk partition where the interrupted file is located, and the files and disk partitions before the interrupted file are not detected.
  • the electronic device includes disk C, disk D, and disk E, and the fsck process is interrupted when the 9th file in the D disk is detected, when the electronic device is restarted, the detection starts from the 9th file in the D disk, and There is no need to detect the C drive, thereby improving the efficiency of file system detection and shortening the boot time.
  • FIG. 9 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1 , Antenna 2, Mobile Communication Module 150, Wireless Communication Module 160, Audio Module 170, Speaker 170A, Receiver 170B, Microphone 170C, Headphone Interface 170D, Sensor Module 180, Key 190, Motor 191, Indicator 192, Camera 193, Display Screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the electronic device 100 .
  • the I2S interface can be used for audio communication.
  • the processor 110 may contain multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 110 with the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 communicates with the camera 193 through a CSI interface, so as to realize the photographing function of the electronic device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the electronic device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the electronic device through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats of image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos of various encoding formats, such as: Moving Picture Experts Group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG Moving Picture Experts Group
  • MPEG2 moving picture experts group
  • MPEG3 MPEG4
  • MPEG4 Moving Picture Experts Group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D can be the USB interface 130, or can be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the motion attitude of the electronic device 100 .
  • the angular velocity of electronic device 100 about three axes ie, x, y, and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shaking angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse motion to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the electronic device 100 emits infrared light to the outside through the light emitting diode.
  • Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 .
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the electronic device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch device”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal.
  • the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the electronic device 100 employs an eSIM, ie: an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the present application realizes all or part of the processes in the methods of the above embodiments, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium.
  • the computer program includes computer program code
  • the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like.
  • the computer-readable medium may include at least: any entity or device capable of carrying the computer program code to the photographing device/electronic device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media.
  • ROM read-only memory
  • RAM random access memory
  • electrical carrier signals telecommunication signals
  • software distribution media For example, U disk, mobile hard disk, disk or CD, etc.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • the disclosed apparatus/network device and method may be implemented in other manners.
  • the apparatus/network device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units. Or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

La présente invention se rapporte au domaine technique du stockage, et concerne un procédé de vérification de système de fichiers, un dispositif électronique et un support de stockage lisible par ordinateur. Le procédé de vérification de système de fichiers comprend les étapes suivantes : vérifier si un processus de vérification de système de fichiers existe dans le dispositif électronique; si le processus de vérification de système de fichiers existe, stocker un état d'exécution du processus de vérification de système de fichiers sur un disque, l'état d'exécution étant utilisé pour déterminer une position de départ lorsque le processus de vérification de système de fichiers effectue un balayage complet sur un système de fichiers après le redémarrage du dispositif électronique. Après le redémarrage du dispositif électronique, lorsque le balayage complet doit être effectué, le processus de vérification de système de fichiers peut commencer à effectuer le balayage complet à partir de la position de départ, de façon à réduire les doubles vérifications dans le processus de vérification de fichiers, ce qui réduit la durée de démarrage.
PCT/CN2021/116730 2020-10-26 2021-09-06 Procédé de vérification de système de fichiers, dispositif électronique et support de stockage lisible par ordinateur WO2022089000A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011156387.1A CN114490174B (zh) 2020-10-26 2020-10-26 文件系统检测方法、电子设备及计算机可读存储介质
CN202011156387.1 2020-10-26

Publications (1)

Publication Number Publication Date
WO2022089000A1 true WO2022089000A1 (fr) 2022-05-05

Family

ID=81383557

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/116730 WO2022089000A1 (fr) 2020-10-26 2021-09-06 Procédé de vérification de système de fichiers, dispositif électronique et support de stockage lisible par ordinateur

Country Status (2)

Country Link
CN (1) CN114490174B (fr)
WO (1) WO2022089000A1 (fr)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115495057A (zh) * 2022-11-16 2022-12-20 江苏智云天工科技有限公司 实现windows和HDFS通信的方法和系统
CN116684728A (zh) * 2022-09-30 2023-09-01 荣耀终端有限公司 对dtof器件的控制方法及装置

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117131497A (zh) * 2023-02-28 2023-11-28 荣耀终端有限公司 一种软件检测方法及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090089628A1 (en) * 2007-10-01 2009-04-02 Day Mark S File system error detection and recovery framework
US9477675B1 (en) * 2013-09-30 2016-10-25 EMC IP Holding Company LLC Managing file system checking in file systems
CN106959909A (zh) * 2017-03-27 2017-07-18 西安电子科技大学 一种Android系统上的应用软件异常恢复方法
CN110532032A (zh) * 2019-07-31 2019-12-03 华为技术有限公司 一种开机文件系统检测方法以及相关设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7069594B1 (en) * 2001-06-15 2006-06-27 Mcafee, Inc. File system level integrity verification and validation
US9223788B2 (en) * 2010-11-09 2015-12-29 Symantec Corporation File system consistency check on part of a file system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090089628A1 (en) * 2007-10-01 2009-04-02 Day Mark S File system error detection and recovery framework
US9477675B1 (en) * 2013-09-30 2016-10-25 EMC IP Holding Company LLC Managing file system checking in file systems
CN106959909A (zh) * 2017-03-27 2017-07-18 西安电子科技大学 一种Android系统上的应用软件异常恢复方法
CN110532032A (zh) * 2019-07-31 2019-12-03 华为技术有限公司 一种开机文件系统检测方法以及相关设备

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116684728A (zh) * 2022-09-30 2023-09-01 荣耀终端有限公司 对dtof器件的控制方法及装置
CN116684728B (zh) * 2022-09-30 2024-03-05 荣耀终端有限公司 对dtof器件的控制方法及装置
CN115495057A (zh) * 2022-11-16 2022-12-20 江苏智云天工科技有限公司 实现windows和HDFS通信的方法和系统
CN115495057B (zh) * 2022-11-16 2023-02-28 江苏智云天工科技有限公司 实现windows和HDFS通信的方法和系统

Also Published As

Publication number Publication date
CN114490174B (zh) 2023-08-22
CN114490174A (zh) 2022-05-13

Similar Documents

Publication Publication Date Title
CN110347269B (zh) 一种空鼠模式实现方法及相关设备
CN112289313A (zh) 一种语音控制方法、电子设备及系统
CN111262975B (zh) 亮屏控制方法、电子设备、计算机可读存储介质和程序产品
CN111369988A (zh) 一种语音唤醒方法及电子设备
WO2022089000A1 (fr) Procédé de vérification de système de fichiers, dispositif électronique et support de stockage lisible par ordinateur
CN110798568A (zh) 具有折叠屏的电子设备的显示控制方法及电子设备
WO2020019355A1 (fr) Procédé de commande tactile pour dispositif vestimentaire, et système et dispositif vestimentaire
CN114880251B (zh) 存储单元的访问方法、访问装置和终端设备
CN111865646A (zh) 终端升级方法及相关装置
CN114422340A (zh) 日志上报方法、电子设备及存储介质
WO2022037725A1 (fr) Procédé et appareil de récupération de service de système, et dispositif électronique
WO2022170856A1 (fr) Procédé d'établissement de connexion et dispositif électronique
CN113973398A (zh) 无线网络连接方法、电子设备及芯片系统
CN111104295A (zh) 一种页面加载过程的测试方法及设备
CN112738794B (zh) 驻网方法、芯片、移动终端及存储介质
CN110806994B (zh) 一种信号传输方法及装置
CN113901485B (zh) 应用程序加载方法、电子设备及存储介质
CN115119336B (zh) 耳机连接系统、方法、耳机、电子设备及可读存储介质
WO2022170854A1 (fr) Procédé d'appel vidéo et dispositif associé
CN111309130B (zh) 一种实现进水保护的移动终端及方法
CN113867520A (zh) 设备控制方法、电子设备和计算机可读存储介质
CN114554012A (zh) 来电接听方法、电子设备及存储介质
CN114125144B (zh) 一种防误触的方法、终端及存储介质
CN116723384B (zh) 进程的控制方法、电子设备及可读存储介质
CN113364067B (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: 21884730

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21884730

Country of ref document: EP

Kind code of ref document: A1