WO2020223862A1 - Mounting processing method and apparatus, electronic device, and computer readable storage medium - Google Patents
Mounting processing method and apparatus, electronic device, and computer readable storage medium Download PDFInfo
- Publication number
- WO2020223862A1 WO2020223862A1 PCT/CN2019/085568 CN2019085568W WO2020223862A1 WO 2020223862 A1 WO2020223862 A1 WO 2020223862A1 CN 2019085568 W CN2019085568 W CN 2019085568W WO 2020223862 A1 WO2020223862 A1 WO 2020223862A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- storage device
- external storage
- detection
- mounting
- management module
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
Definitions
- This application relates to the field of storage technology, and more specifically, to a mounting processing method, device, electronic equipment, and computer readable storage medium.
- External storage devices such as SD cards or U disks can be inserted into terminal devices via card slots or OTG, such as mobile phones, digital cameras, portable computers and other terminal devices, to provide users with additional storage services.
- the terminal device When an external storage device is inserted into a terminal device, the terminal device will mount the external storage device based on the interaction between the external storage device management module (Volume Daemon, Vold) and the storage management service module (Storage Manager Service). In the process of interaction, if a link is stuck, it will cause the subsequent commands to be unable to process, making the interaction time-consuming, and it is easy to cause system abnormalities such as unresponsive system or stuck screen for a long time.
- the external storage device management module Volumemon, Vold
- Storage Manager Service Storage Manager Service
- This application proposes a mounting processing method, device, electronic equipment, and computer readable storage medium to improve the above-mentioned defects.
- an embodiment of the present application provides a mounting processing method, the method includes: a storage management service module sends a first call instruction to an external storage device management module; the external storage device management module responds to the first call instruction, Perform the detection operation, and set the detection status flag of the external storage device as the detection status flag, and return the detection status flag, where the detection operation is to detect whether the file system of the external storage device is abnormal, and the detection flag is used to indicate the external storage of the storage management module
- the device management module is performing the detection operation and the detection is not completed; when the detection operation is completed, the external storage device management module sends a detection completion instruction to the storage management service module; the storage management service module informs the external storage device management module of the external storage device management module based on the detection completion instruction
- the storage device is mounted.
- an embodiment of the present application also provides a mount processing device, the device includes: a first calling module, configured to send a first calling instruction to an external storage device management module by a storage management service module; a first return module , Used for the external storage device management module to execute the detection operation in response to the first call instruction, and set the detection status flag of the external storage device as the detection flag, and return the detection status flag, where the detection operation is to detect the file of the external storage device Whether the system is abnormal, the detection mark is used to indicate that the storage management module is performing the detection operation and the detection is not completed by the external storage device management module; the detection completion module is used for the external storage device management module to report to the storage management service module when the detection operation is completed Send a detection completion instruction; the mounting notification module is used for the storage management service module to notify the external storage device management module to mount the external storage device based on the detection completion instruction.
- an embodiment of the present application also provides an electronic device, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory And is configured to be executed by the one or more processors, and the one or more programs are configured to execute the foregoing method.
- the embodiments of the present application also provide a computer-readable storage medium, and the computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the foregoing method.
- the mounting processing method, device, electronic equipment, and computer readable storage medium provided by this application send the first call instruction to the external storage device management module through the storage management service module, and then the external storage device management module responds to the first call instruction , Execute the detection operation, and set the detection status flag of the external storage device as the detection status flag, and return the detection status flag, where the detection operation is to detect whether the file system of the external storage device is abnormal, and the detection flag is used to indicate the external storage management module
- the storage device management module is performing the detection operation and the detection is not completed.
- the external storage device management module sends a detection completion instruction to the storage management service module, and finally the storage management service module notifies the external storage device based on the detection completion instruction
- the management module mounts the external storage device. Therefore, when an external storage device needs to be mounted, the external storage device management module will return the detection status indicator before the detection operation is completed, and mount it after the detection operation is completed, so that the system will not be abnormal due to the file system of the external storage device It causes the system to become unresponsive, and prevents the system from being stuck or freezes due to the insertion of external storage devices, thereby improving system stability.
- FIG. 1 shows a method flowchart of a mounting processing method provided by an embodiment of the present application
- FIG. 2 shows a method flowchart of a mounting processing method provided by another embodiment of the present application
- FIG. 3 shows a method flowchart of a mounting processing method provided by still another embodiment of the present application
- FIG. 4 shows a method flowchart of a mounting processing method provided by another embodiment of the present application.
- FIG. 5 shows a method flowchart of a mounting processing method provided by still another embodiment of the present application.
- FIG. 6 shows a method flowchart of a mounting processing method provided by still another embodiment of the present application.
- FIG. 7 shows a method flowchart of a mounting processing method provided by still another embodiment of the present application.
- FIG. 8 shows a method flowchart of a mount processing method provided by still another embodiment of the present application.
- FIG. 9 shows a method flowchart of a mounting processing method provided by yet another embodiment of the present application.
- Fig. 10 shows a flowchart of a method for triggering a first call instruction provided by an embodiment of the present application.
- FIG. 11 shows a block diagram of a module of a mounting processing apparatus provided by an embodiment of the present application.
- Figure 12 shows a structural block diagram of an electronic device provided by an embodiment of the present application.
- FIG. 13 shows a storage unit for storing or carrying program code for implementing the mounting processing method according to the embodiment of the present application.
- Socket (Socket) communication is an Inter-Process Communication (IPC) mechanism.
- IPC Inter-Process Communication
- Socket API Application Programming Interface
- the application program can use the network socket through the socket interface for data exchange. Based on the socket address, the operating system can decide that the data should be delivered to a specific process or thread.
- HTTP provides a specific form of encapsulating or displaying data
- Socket provides the capability of network communication.
- Binder communication is similar to Socket communication. It is an efficient inter-process communication mechanism that can send data from process A to process B.
- terminal devices include external storage device management modules (Volume Daemon, Vold) and storage management service modules (Storage Manager Service).
- Storage Manager Service Storage Manager Service
- terminal equipment includes but is not limited to mobile phones, digital cameras, portable computers and other terminal equipment.
- the inventor found in the research that the external storage device management module and the storage management service module based on the Binder communication in the process of mounting the external storage device, if they get stuck during the Binder call, it may trigger the watchdog in the system
- the program causes the system to become unresponsive, and abnormal situations such as system stuck or fixed screen appear.
- an embodiment of the present application provides a mounting processing method, as shown in FIG. 1, specifically, the method includes: S101 to S104.
- the storage management service module sends a first call instruction to the external storage device management module.
- the terminal device includes an external storage device module and a storage management service module.
- the external storage device management module is the management and control center of the external storage system in the operating system platform, and is the backend that manages and controls the external storage device of the operating system platform. process. Its functions mainly include: external storage device plug-in event detection, external storage device mounting, unmounting, formatting, etc.
- the storage management service module is a module that communicates between the system framework layer of the operating system and the external storage device management module. At the same time, the storage management service module is also a module that provides application programs with storage device access interfaces and storage device mounting message broadcasting. It should be noted that the external storage device management module and the storage management service module are based on inter-process communication. If the communication process between the two is stuck, the system may become unresponsive.
- the terminal device needs to mount the external storage device, and after the mounting is successful, the application on the terminal device can access the external storage device.
- the storage management service module when the terminal device needs to mount the external storage device, the storage management service module sends the first call instruction to the external storage device management module.
- the external storage device management module executes a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
- the detection operation is to detect whether the file system of the external storage device is abnormal.
- the detection flag is used to indicate that the storage management module external storage device management module is performing a detection operation and the detection is not completed, so that when the external storage device management module returns the detection status flag, the storage management module is the detection flag based on the detection status flag , You can know that the external storage device is being detected and not completed. Specifically, after the terminal device detects the insertion event of the external storage device, the external storage device management module creates the external storage device and correspondingly stores the device information of the external storage device, where the device information includes the detection status identifier.
- the detection time length includes the time consumed for detecting whether the file system is abnormal and the time consumed by the external storage device management module to repair when the file system is abnormal. For example, the file system of the external storage device is damaged too much, which may cause the external storage device management module to try to repair the file system of the external storage device for a long time, and the long repair time will cause the system to get stuck.
- the external storage device management module in response to the first call instruction, performs detection operations respectively, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag, so that the external storage device management module and The interaction process based on the first call instruction of the storage management service module can end without waiting for the detection operation to complete, which avoids the interaction process based on the first call instruction being stuck due to the detection time being too long, causing the system to become unresponsive.
- the system Unresponsiveness includes system abnormalities such as system stuck or fixed screen (the screen is stuck for a long time, also called frozen screen or hang), which can prevent abnormal external storage devices from being inserted and cause the system to become unresponsive and improve system stability .
- the external storage device management module may set the detection status flag of the external storage device to the detection flag such as "checking”. After the external storage device management module returns "checking", the storage management The service module can know that the external storage device is being checked according to the storage status of the external storage device as "checking".
- the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
- the external storage device management module when the detection operation is completed, sends a detection completion instruction to the storage management service module to notify the storage management service module that the detection operation of the external storage device has been completed, so that the storage management service module can perform Next step.
- the detection operation is ended. At this time, the detection operation is completed, and the external storage device management module sends a detection completion instruction to the storage management service module.
- the external storage device management module attempts to repair the file system. If the repair time is too long and the detection time before the repair is successful has exceeded the specified time, Then, when the detection operation is completed, the file system of the external storage device is still abnormal. That is, when the detection operation is completed, the file system of the external storage device may be abnormal or non-abnormal.
- the non-abnormal situation includes a situation where the file system was normal before detection, and a situation where the external storage device was abnormal when it was first inserted, but was restored to normal after the external storage device management module was repaired within a specified time.
- the detection operation if the detection time of the detection operation exceeds the specified time, the detection operation is not considered to be completed, that is, if the detection time is too long and the detection operation is not completed within the specified time, the detection operation is considered to be incomplete, and the storage is not
- the management service module sends a detection completion instruction, so that the storage management service module cannot perform the next operation on the external storage device. Specifically, because the file system of the external storage device is damaged too much, the external storage device management module cannot complete the repair of the damaged file system within the specified time.
- the external storage device management module has completed a return in response to the first call instruction, that is, the current calling thread has ended, and the detection operation performed by the external storage device management module on the external storage device is not based on The thread of cross-process communication between storage management service modules is based on the internal process of the external storage device management module. Therefore, even if the detection time is too long, the system process will not be stuck, and the system will not be unresponsive. Thereby, it can prevent the system from jamming or freezing the screen caused by the abnormal external storage device inserted into the terminal device, and improve the system stability.
- the storage management service module notifies the external storage device management module to mount the external storage device based on the detection completion instruction.
- the storage management service module can learn that the detection operation has been completed based on the detection completion instruction, and at this time notify the external storage device management module to mount the external storage device.
- this embodiment separates the execution of the detection operation from the mounting operation, so that the external storage device management module Before the detection operation is completed, return the detection status flag to end the cross-process communication thread with the storage management service module, and mount it after the detection operation is completed. Therefore, it can prevent the detection time of the external storage device from being long If it is too long, the thread will get stuck and the system will become unresponsive, which can prevent abnormal situations such as system stuck or fixed screen caused by abnormal external storage device insertion, and improve system stability.
- FIG. 2 shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S201 to S207.
- the storage management service module sends a first calling instruction to the external storage device management module.
- the first call instruction includes a detection instruction.
- the detection instruction may be a function Check used to detect whether the file system is abnormal and whether there is an error, or may be another interface used to detect whether the file system is abnormal. Function, this embodiment does not limit this. Based on the detection instruction, operations such as setting or updating the detection status flag can also be performed.
- the storage management service module sends the detection instruction to the external storage device management module through the Binder call. Specifically, the storage management service module calls the function Check to the external storage device management module based on Binder communication, so that the external storage device management module can execute the function Check.
- Binder communication cross-process calling functions can be easily realized.
- the detection instruction may be pre-loaded, that is, the first call instruction does not include the detection instruction.
- the storage management service module sends the first call instruction to the external storage device management module to enable the external storage device management
- the module can execute pre-loaded detection instructions, reduce the amount of communication data between processes, reduce function loading time, improve communication efficiency, improve detection efficiency, and thus help improve the efficiency of mounting external storage devices.
- the external storage device management module In response to the first calling instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
- the detection status flag can be a flag bit corresponding to the external storage device used to reflect the current detection status.
- the current detection status can be known. For example, if the flag bit is a flag during detection such as "Checking", you can Indicates that the external storage device management module is performing a detection operation on the external storage device and the detection is not completed.
- the storage management service module can learn that the current detection status is the detection operation being performed and the detection is not completed by receiving the detection status identifier returned by the external storage device management module carry out.
- the external storage device management module may perform the detection operation and set the detection status flag of the external storage device based on two different threads, and return the detection status flag. Specifically, in response to the first call instruction, the external storage device management module sets the detection status flag of the external storage device as the detecting flag based on the first thread, and returns the detection status flag, so that the first thread will receive the first call instruction The execution is returned immediately, and the external storage device management module responds to the first call instruction to execute the detection operation based on the second thread.
- the first thread is a cross-process thread based on the Binder call, that is, the main thread, and the second thread is a thread within the process of the external storage device management module. Therefore, in this embodiment, the first thread is used to receive the first call.
- the first process is performed before the second process.
- the external storage device management module first sets the detection status flag as the detection status flag based on the first thread, and returns the detection status flag At this time, the second thread is started, and the detection operation is performed based on the second thread.
- the first process and the second process are performed at the same time.
- the external storage device management module responds to the first call instruction to simultaneously set the detection status flag and start the second thread and perform the detection operation based on the second thread ,
- the detection status identification can be returned immediately before the detection operation is completed, and because the second thread and the first thread are performed at the same time, the external storage device management module responds to the first call instruction, and on the basis of ending the Binder call in time,
- the detection operation can be performed faster and the detection efficiency can be improved.
- the higher detection efficiency is also conducive to improving the mounting efficiency of the external storage device.
- the detection operation is to detect whether the file system of the external storage device is abnormal, and to repair the abnormal file system. It should be noted that the detection operation includes the operation of repairing the abnormal file system when an abnormality is detected. Therefore, in this embodiment, the detection duration includes the repair duration. Specifically, if the file system is damaged, it is abnormal, and if there is no damage, it is normal, and the external storage device management module will try to repair the abnormal file system when it is abnormal. Further, if the repair is completed, the file system is not damaged at this time, and it can be considered that it is normal without exception.
- the external storage device management module determines that the detection operation is completed, and if the file system is abnormal and the repair is not completed, the file system is still in an abnormal state, and the external storage The device management module determines that the detection operation is not completed. among them:
- the external storage device management module determines that the detection operation is completed; if the file system is abnormal and cannot be repaired, the external storage device management module determines that the detection operation is not completed. Therefore, there is no time limit for the detection operation, and when the file system is abnormal, it is determined that the detection operation is not completed. Therefore, when the repair is completed, it can be determined in time that the detection operation has been completed for the next step.
- the detection operation of the external storage device management module is correspondingly set with a preset duration, and when the file system is abnormal and the repair is not completed within the preset duration, that is, when the detection duration exceeds the preset duration, it is determined that the detection operation is not successful. carry out.
- the external storage device management module determines that the detection operation has been completed; if the file system is detected to be abnormal but the repair is completed within the preset time period, the external storage device management module determines the detection operation Completed; if the detection time exceeds the preset time but the repair is still not completed, the external storage device management module detects an abnormal file system at this time, but the file system damaged within the preset time has not been repaired, it is determined that the detection operation is not completed . In this way, the execution time of the detection operation can be controlled, and a response can be made in time for the next operation, so as to ensure the detection efficiency while avoiding the detection timeout and no response, and improving the system availability.
- the detection operation of the external storage device management module is correspondingly set with a preset duration, and when the file system is abnormal and the repair is not completed within the preset duration, that is, when the detection duration exceeds the preset duration, the detection is still determined
- the operation is complete. Specifically, if the file system is normal or the file system is abnormal and the repair is completed, the external storage device management module determines that the detection operation has been completed, and if the file system is abnormal and the repair is not completed within the preset time period, the file system is still in an abnormal state, At this time, the external storage device management module still determines that the detection operation is complete.
- the detection operation can be performed for a preset duration at most, and when the preset duration is reached, it is determined that the detection operation has been completed.
- the file system may be normal or abnormal.
- the execution time of the detection operation can be controlled, and the detection operation is determined to be completed when the file system is not repaired, and a timely response can be made to proceed with the next operation, thereby ensuring the detection efficiency while avoiding detection timeout and unresponsiveness, improving System availability.
- the external storage device management module may terminate the detection operation or not.
- the specific implementation manner is as follows:
- the external storage device management module can terminate the detection operation, save resources, and improve system availability.
- the external storage device management module may not terminate the detection operation, so that the detection operation can continue.
- the external storage device management module requires It takes a long time to complete the repair of all abnormal file systems, and the required time may exceed the preset time.
- the external storage device management module is enabled by not interrupting the detection operation when the detection time exceeds the preset time. The repair can be continued. Therefore, there is a possibility of completing the repair before the mounting operation is performed. At this time, the external storage device whose detection operation is not completed still has the possibility of being successfully mounted.
- S204 when the detection duration exceeds the preset duration, S204 may be executed; when the detection duration does not exceed the preset duration, S203 may be executed.
- the detection status identifier also includes a detection abnormality identifier, which can be used to indicate that the storage management service module currently detects an abnormality, that is, the detection time exceeds a preset time and the repair is not completed, and the file system of the external storage device is still abnormal.
- the external storage device management module sets the detection status flag as the detection abnormality flag.
- the detection abnormality identifier may be a string of numbers, letters, words, etc., such as "0", "uncheckable”, etc., used to indicate that the file system is still abnormal after the detection operation, and may be preset by the system. Yes, it can also be customized, so that the abnormality of the file system can be learned through the abnormality detection identifier. In addition, this embodiment does not make other restrictions on the naming form of the abnormality detection identifier.
- the external storage device is difficult to mount successfully when the file system is abnormal, when the file system is abnormal and the repair is not completed within the preset time, by setting the abnormal detection flag, the external storage device can be ignored when the abnormal detection flag is detected. Mount it to reduce unnecessary resource consumption and improve response efficiency. Specific implementation manners can be seen in the following embodiments, which are not repeated here.
- the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
- the file system of the external storage device may be normal or abnormal, and the normal includes the normal condition itself and the abnormal but the repair completed condition.
- the external storage device management module sends to the storage management service module
- the detection completion instruction allows the storage management service module to learn that the current external storage device has completed the detection operation by receiving the detection completion instruction and can be mounted.
- the file system of the external storage device may be abnormal or non-abnormal.
- the external storage device management module sends to the storage management service module
- the detection completion instruction enables the storage management service module to learn that the current external storage device is normal and can be mounted by receiving the detection completion instruction.
- the file system of the external storage device is non-abnormal, that is, when the file system of the external storage device is still abnormal, the detection completion command is not sent.
- the storage management service module notifies the external storage device management module to mount the external storage device based on the detection completion instruction.
- the storage management service module can determine that the current external storage device has completed the detection operation and can be mounted, and then notifies the external storage device management module to mount the external storage device. Therefore, the detection operation and the mounting operation are performed in different threads separately, and the file system of the external storage device is determined to be normal through the detection operation, and the mounting is performed, which can improve the success rate and efficiency of the mounting.
- the external storage device management device management module mounts the external storage device
- determining whether the detection abnormality flag can be found specifically, for example, based on the flag bit that characterizes the detection state, it is determined whether the detection status flag on the flag bit is the detection abnormality flag; for example, it can directly search for the corresponding external storage device Whether to store the detection abnormality identifier.
- the file system is abnormal and the repair is not completed within the preset time, that is, when the detection time exceeds the preset time, it is determined that the detection operation is not completed, and S206 to S207 are not executed after S205. At this time, the external The file system of the storage device is non-abnormal, so there is no need to find and detect the abnormal identifier.
- S207 can be executed; if not, the mounting operation can be continued.
- the external storage device management module determines that the file system of the external storage device is abnormal. By stopping the mounting of the external storage device, the consumption of operating resources can be reduced, the efficiency of system operation can be improved, and it is beneficial. Improve mounting efficiency.
- the mounting processing method provided in this embodiment separates the detection operation and the mounting operation in different threads for execution, and the external storage device management module returns immediately after receiving the first call instruction so that the thread called by the Binder can be End in time, and start the second thread to perform the actual detection operation, so that the actual detection time, and the repair time included therein does not affect the main thread, that is, the detection operation that may cause the Binder call to be stuck based on the second thread execution, avoids
- the system does not respond due to the long detection time, which prevents abnormal situations such as system jam or fixed screen caused by abnormal external storage device insertion, and greatly improves the stability of the system.
- the external storage device management device can continue to mount when the file system of the external storage device is non-abnormal, which can also improve the success rate and efficiency of the mount.
- the management module does not mount when the file system is abnormal, which can also reduce unnecessary resource consumption and improve system operating efficiency.
- the method includes: S301 to S303.
- the storage management service module sends a first call instruction to the external storage device management module.
- the external storage device management module executes a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
- the external storage device management module sets the detection status flag as a detection abnormality flag.
- the method ends, so that when the file system is abnormal and the repair is not completed within the preset time, the storage management service module is not notified to end the method, which can greatly Reduce the consumption of operating resources and improve system operating efficiency.
- S303 may be executed first, and then this method is ended.
- the external storage device management module sets the detection status flag as the abnormal detection flag, so that when the storage management service module obtains the detection status flag of the external storage device, it can learn that the file system of the external storage device is in an abnormal state, so that the user can timely Try to mount again.
- S303 may not be executed, and this method is ended.
- the storage management service module considers that the external storage device is always being detected and is still performing a detection operation. Specifically, the corresponding detection status of the external storage device is always "Checking".
- the storage management service module notifies the external storage device management module to mount the external storage device based on the detection completion instruction.
- the mounting processing method provided in this embodiment terminates this method when the detection time exceeds the preset time, which can greatly reduce the consumption of operating resources, improve operating efficiency, and allow users to pass Re-insert the external storage device or other measures and try to mount again to improve the user's mounting experience.
- FIG. 4 shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S401 to S404.
- the storage management service module sends a first calling instruction to the external storage device management module.
- the external storage device management module executes a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
- the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
- the storage management service module sends a second call instruction to the external storage device management module in response to the detection completion instruction.
- the second calling instruction is used to notify the external storage device management module to mount the external storage device.
- the storage management service module sends the mount instruction to the external storage device management module via the Binder call in response to the detection completion instruction, where the second call instruction includes the mount instruction, for example, the mount instruction may be used
- the function Mount for mounting an external storage device can also be other interface functions for mounting an external storage device, which is not limited in this embodiment.
- the storage management service module calls the function Mount to the external storage device management module based on Binder communication, so that the external storage device management module can execute the function Mount and perform the mounting operation.
- the mount instruction may be pre-loaded, that is, the second call instruction does not include the mount instruction.
- the storage management service module sends the second call instruction to the external storage device management module to enable the external storage
- the device management module can execute the pre-loaded mount instruction, reduce the amount of communication data between processes, reduce the function loading time, and improve the communication efficiency while improving the mounting efficiency.
- FIG. 5 shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S501 to S507.
- the storage management service module sends a first call instruction to the external storage device management module.
- the external storage device management module In response to the first call instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
- the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
- the storage management service module In response to the detection completion instruction, the storage management service module sends a second call instruction to the external storage device management module.
- the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier.
- the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier corresponding to the external storage device in response to the second call instruction. Specifically, if the current detection status identifier is a detection abnormality identifier, the file system of the external storage device is abnormal, otherwise it is not abnormal, that is, the file system is normal.
- S506 can be executed; if it is abnormal, S508 can be executed.
- the external storage device management module detects that the file system of the external storage device is not abnormal at this time, and the external storage device management module performs a mounting operation on the external storage device and obtains the mounting result.
- the external storage device management module is based on a mounting instruction, such as a function Mount for mounting, and by executing the function Mount, a mounting operation is performed on the external storage device to obtain a mounting result.
- the mounting result includes mounting success and mounting failure.
- the external storage device management module sets a mounting status flag according to the mounting result.
- the mounting status flag may be a flag bit used to characterize the mounting status. For example, if the mounting status flag is "unmountable”, it means that the external storage device cannot be mounted; if the mounting status flag is "mounted”, Indicates that the external storage device has been mounted. It should be noted that, as long as the mounting state identifier can be used to represent the mounting state, this embodiment does not make other restrictions on the naming form of the mounting state identifier.
- the storage management service module can obtain the corresponding mounting result by obtaining the mounting status identifier.
- the external storage device management module detects that the file system of the external storage device is abnormal. At this time, the mounting status flag of the external storage device is set as the unmountable flag, so that the external storage device management module cannot mount the external storage device. Load.
- the file system is abnormal, the possibility of successfully mounting the external storage device is low. Therefore, by judging whether the file system of the external storage device is abnormal, the possibility of the successful mounting can be judged, so as to make a prediction before the actual mounting operation. , And stop mounting when the file system is abnormal, which can save resources and improve mounting efficiency.
- this method can be ended after S508, that is, the method can be ended after setting the mounting status flag, so that the storage management service module can obtain the mounting status flag, thereby knowing that the currently inserted external storage device cannot be mounted This allows the user to take measures to remount the external storage device, such as reinserting it, to improve the user experience of mounting the external storage device.
- this method can be ended before S508, that is, if the external storage device management module determines that the file system of the external storage device is abnormal, S508 is not executed, and this method is ended. It further saves the running resources required for mounting. Since it is difficult to successfully mount the external storage device when the file system is abnormal, this embodiment does not perform the actual mounting operation, such as not performing the function, when the file system is abnormal. Operations such as Mount, and ending this method can reduce unnecessary operating resources.
- the unmountable indicator may be sent to the storage management service module, so that the storage management service module can learn the current mounting status of the external storage device.
- the storage management service module can learn the current mounting status of the external storage device.
- this embodiment determines whether the file system of the external storage device is abnormal. , Can judge the possibility of successful mounting, so as to make a pre-judgment before actually performing the mounting operation, and do not perform the mounting operation when the file system is abnormal, which can save resources and improve the mounting efficiency.
- the external storage device management module determines that the file system of the external storage device is abnormal and sets the mounting status flag of the external storage device as the unmountable flag, the mounting operation may not be performed, but the unmountable flag is sent to the storage
- the management service module allows the storage management service module to broadcast the corresponding mounting results.
- FIG. 6, shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S601 to S610.
- the storage management service module sends a first call instruction to the external storage device management module.
- the external storage device management module In response to the first calling instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
- the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
- the storage management service module In response to the detection completion instruction, the storage management service module sends a second call instruction to the external storage device management module.
- the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier.
- S606 can be executed; if it is abnormal, S608 can be executed.
- the external storage device management module sets a mounting state flag according to the mounting result.
- the external storage device management module determines that the file system of the external storage device is abnormal, it sets the mounting status flag of the external storage device as the unmountable flag.
- the external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed.
- the mounting completion instruction when the current mounting is completed, the mounting completion instruction is sent to the storage management service module, where the mounting completion instruction includes the mounting status identifier, so that when the storage management service module receives the mounting completion instruction, You can get the mount status identifier of the external storage device.
- the mounting result can be obtained.
- the external storage device management module determines that the file system of the external storage device is abnormal, set the external storage The mounting status flag of the device is the unmountable flag, and the current mounting has been completed at this time; if it is not abnormal, the mounting result is obtained, and the mounting status flag is set according to the mounting result. At this time, the current mounting is also completed.
- the external storage device management module still sends the unmountable flag to the storage management service module, so that the storage management service module can broadcast the corresponding mounting result every time the external storage device is mounted. Even when the file system is abnormal and the mounting operation is not performed, the corresponding mounting failure will be broadcast, so that other applications can learn the mounting status of the inserted external storage device in time.
- the storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
- the storage management service module broadcasts the mount failure; if the mount status identifier is the mounted identifier, the storage management service module broadcasts the mount successfully, so that the The application can access the successfully mounted external storage device.
- the storage management service module broadcasts the mounting result to the system, and the application can perform corresponding operations after listening to the broadcast.
- an application for file management can monitor the successful mounting broadcast in the application’s The interface displays the external storage device, and when the broadcast of the mounting failure is monitored, the external storage device is abnormal in the interface of the application.
- the mounting processing method provided in this embodiment is based on the foregoing embodiments.
- the external storage device management module detects an abnormality in the file system of the external storage device, it does not perform the mounting operation, reducing unnecessary resource consumption, and passing Send the unmountable flag to the storage management service module, so that the storage management service module still broadcasts the mounting result corresponding to the detected abnormal flag, so that other applications can learn the current mounting result in time, improve response efficiency, and facilitate users in the failure of the mount Take timely measures to improve user experience.
- the external storage device management module determines that the file system of the external storage device is abnormal and sets the mounting status flag of the external storage device as the unmountable flag, the mounting operation can still be performed.
- the mounting processing method provided by an embodiment of the present application is presented. Specifically, the method includes: S701 to S710.
- the storage management service module sends a first call instruction to the external storage device management module.
- the external storage device management module In response to the first call instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
- the external storage device management module may also not interrupt the detection operation, so that the detection operation continues, and continues to repair the damaged file system. Specifically, when the file system is damaged too much, the external storage device management module needs to complete the repair of all abnormal file systems. The required time is longer, and the required time may exceed the preset time. At this time, the detection time When the preset time is exceeded, the detection operation is still not interrupted, so that the external storage device management module can continue to repair the damaged file system in the external storage device. Therefore, there is a possibility of completing the repair before the mounting operation is performed. The external storage device whose detection operation is not completed still has the possibility of being successfully mounted.
- the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
- the storage management service module sends a second call instruction to the external storage device management module in response to the detection completion instruction
- the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier.
- the external storage device management module determines that the file system of the external storage device is abnormal, and sets the mounting status flag of the external storage device as an unmountable flag, the mounting operation can still be performed, and S707 is continued.
- the external storage device management module completes the repair of the file system of the external storage device, so that the file system is restored to normal.
- the repair is not completed within the preset time.
- the detection status flag is set to the external storage device with the abnormal detection flag.
- the external storage device management module updates the mounting status identifier according to the mounting result.
- the external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed.
- the storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
- the mount processing method provided in this embodiment continues to repair the damaged file system by not interrupting the detection operation when the detection duration exceeds the preset duration, and the time before the mount operation is executed and the mount result is obtained The repair is completed, so that the file system of the external storage device is restored to normal. Therefore, the external storage device management module uses the external storage device management module to set the mounting status flag as unmountable according to the detected abnormality flag, and the mounting operation can still be performed, so that the external storage device The device can be mounted in time when the file system returns to normal, improving mounting efficiency.
- FIG. 8 shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S801 to S810.
- the storage management service module sends a first calling instruction to the external storage device management module.
- the external storage device management module In response to the first calling instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
- the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
- the storage management service module In response to the detection completion instruction, the storage management service module sends a second call instruction to the external storage device management module.
- the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier.
- the method ends, so that the external storage device management module detects the file system of the external storage device When the system is abnormal, the mount operation is not performed, and the mount result is not broadcast, which saves resources.
- the external storage device management module updates the mounting status identifier according to the mounting result.
- the external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed.
- the storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
- the external storage device management module determines that the file system of the external storage device is abnormal, and after setting the mounting status flag of the external storage device as the unmountable flag, the method ends, so that the external storage
- the device management module detects that the file system of the external storage device is abnormal, it does not perform the mounting operation and does not broadcast the mounting result, thereby saving resources and improving system operation efficiency on the basis of the foregoing embodiment.
- the mounting status flag may not be set, and the external storage device is mounted in response to the second call instruction.
- Figure 9 Shows a mounting processing method provided by an embodiment of the present application. Specifically, the method includes: S901 to S908.
- the storage management service module sends a first call instruction to the external storage device management module.
- the external storage device management module executes a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag.
- the external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed.
- the storage management service module sends a second call instruction to the external storage device management module in response to the detection completion instruction.
- the external storage device management module responds to the second call instruction to mount the external storage device, which may specifically include S905 to S906.
- the external storage device management module sets the mounting status flag according to the mounting result
- the external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed.
- the mounting completion instruction includes the mounting status identifier of the external storage device.
- the storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
- the hanging processing method provided in this embodiment implements the detection operation and the mounting operation based on different call instructions respectively, to prevent the time-consuming detection operation from jamming the main process during the execution process, making the system unresponsive, stuck or stuck System abnormalities such as fixed screens have improved system stability.
- After performing the mounting operation on the external storage device it broadcasts the mounting result, so that the application on the system can learn the mounting result of the external storage device, and access the external storage device when the mounting is successful, which improves the response efficiency of the system. And it improves the user experience.
- FIG. 10 shows a flowchart of a method for triggering a first call instruction provided by an embodiment of the present application.
- the method describes that a terminal device is inserted into an external storage device, and the storage management service module sends the external storage device to the external storage device.
- the process before the management module sends the first call instruction, specifically, the method includes: S1001 to S1003.
- the system bottom layer driver reports the insertion time of the external storage device to the external storage device management module, so that the external storage device management module learns the insertion event of the external storage device and creates an external The storage path and device information of the storage device, and the device information of the inserted external storage device is forwarded to the storage management service module.
- the device information may include information such as device ID, storage capacity, and file system type.
- the external storage device management module may send device information to the storage management service module based on the Binder call.
- the storage management service module creates a storage access interface of the external storage device according to the device information, so that the external storage device can be accessed.
- the storage management service module creates a storage access interface of the external storage device according to the received device information of the external storage device, so that upper-layer applications can access the corresponding external storage device through the storage access interface.
- the storage management service module adds an external storage device to the current storage device list, and sends a first call instruction to the external storage device management module.
- the storage management service module creates the storage access interface of the external storage device
- the external storage device is added to the pre-configured current storage device list.
- the storage management service module sends the first call instruction to the external storage device management module based on the Binder call.
- the mounting processing apparatus 1100 may include: a first calling module 1110, a first return module 1120, and a detection completion module 1130 And mount notification module 1140.
- the first calling module 1110 is used for the storage management service module to send the first calling instruction to the external storage device management module.
- the first return module 1120 is used for the external storage device management module to perform a detection operation in response to the first call instruction, and set the detection status flag of the external storage device as the detection status flag, and return the detection status flag.
- the detection completion module 1130 is used for the external storage device management module to send a detection completion instruction to the storage management service module when the detection operation is completed.
- the mounting notification module 1140 is used for the storage management service module to notify the external storage device management module to mount the external storage device based on the detection completion instruction.
- the first return module 1120 includes: a first thread unit and a second thread unit, where:
- the first thread unit is used for the external storage device management module to set the detection status flag of the external storage device as the detection status flag based on the first thread in response to the first call instruction, and return the detection status flag;
- the second thread unit is used for the external storage device management module to perform a detection operation based on the second thread in response to the first call instruction.
- the first thread and the second thread are performed simultaneously.
- the detection operation is to detect whether the file system of the external storage device is abnormal, and repair the abnormal file system. If the file system is normal or the file system is abnormal and the repair is completed, the external storage device management module determines the detection operation completed.
- the mounting processing device 1100 further includes: a detection timeout abnormality module, a detection abnormality determination module, a detection timeout end module, and a mounting stop module, wherein:
- the detection timeout abnormality module is used to set the detection status flag to the detection abnormality flag by the external storage device management module when the detection time period exceeds the preset time period.
- the detection abnormality determination module is used for determining whether the detection abnormality identification can be found when the external storage device management module mounts the external storage device.
- the mount stop module is used to stop mounting the external storage device if it can.
- the external storage device management module responds to the first call instruction and after performing the detection operation, further includes: a detection timeout end unit, wherein:
- the detection timeout end unit is used to end this method when the detection time length exceeds the preset time length.
- the first calling instruction is a detection instruction.
- the first calling module 1110 includes: a first calling unit, wherein:
- the first calling unit is used for the storage management service module to send the detection instruction to the external storage device management module through Binder calling.
- the mount notification module 1140 includes: a mount notification unit for the storage management service module to send a second call instruction to the external storage device management module in response to the detection completion instruction, and the second call instruction is used to notify the external storage device management The module mounts external storage devices.
- the mounting processing device 1100 further includes: an abnormality judgment module and an abnormal mounting identification setting module.
- the abnormality determination unit is used for the external storage device management module to determine whether the file system of the external storage device is abnormal in response to the second call instruction and according to the detection status identifier.
- the abnormal mounting flag setting module is used to set the mounting status flag of the external storage device as an unmountable flag if abnormal, so that the storage management service module cannot mount the external storage device.
- the mounting processing apparatus 1100 further includes: an abnormal end module, wherein:
- Abnormal end module used to end this method if abnormal.
- the mounting processing apparatus 1100 further includes: a mounting result acquisition module and a mounting identification setting module ,among them:
- the mounting result obtaining module is used to obtain the mounting result by the external storage device management module if it is not abnormal.
- the mounting flag setting module is used for the external storage device management module to set the mounting status flag according to the mounting result.
- the mounting identification setting module includes: a success setting unit and a failure setting unit, wherein:
- the successful setting unit is used to set the mounting status flag as the mounted flag if the mounting is successful.
- the failure setting unit is used to set the mounting status flag to the flag that cannot be mounted if the mounting fails.
- the mounting processing apparatus 1100 further includes: a second calling module, a mounting completion module, and a mounting broadcast module, where :
- the second calling module is used for the external storage device management module to mount the external storage device in response to the second calling instruction.
- the mounting completion module is used for the external storage device management module to send a mounting completion instruction to the storage management service module when the current mounting is completed, and the mounting completion instruction includes the mounting status identifier of the external storage device.
- the mounting broadcast module is used for the storage management service module to broadcast the mounting result corresponding to the mounting status identifier according to the mounting status identifier.
- the second calling module includes: a mounting result obtaining unit and a mounting flag setting unit, wherein:
- the mounting result obtaining unit is used for the external storage device management module to obtain the mounting result.
- the mounting identifier setting unit is used for the external storage device management module to set the mounting status identifier of the external storage device according to the mounting result.
- the mounting flag setting unit includes a successful setting subunit and a failed setting subunit, wherein:
- the subunit is successfully set, which is used to set the mounting status flag as the mounted flag if the mounting is successful.
- the failure setting subunit is used to set the mounting status flag to the flag unable to be mounted if the mounting fails.
- the mounting broadcast module includes: a mounting failure broadcast unit and a mounting success broadcast unit.
- the mounting failure broadcasting unit is used to broadcast the mounting failure of the storage management service module if the mounting status is marked as unmountable;
- the successful mounting broadcast unit is used for broadcasting the successful mounting of the storage management service module if the mounting status identifier is the mounted identifier.
- the mounting processing apparatus 1100 further includes: a device information sending module, an access interface creation module, and a storage device adding module, where:
- the device information sending module is used to send the device information of the external storage device to the storage management service module when the external storage device management module detects the insertion event of the external storage device.
- the access interface creation module is used for the storage management service module to create a storage access interface of the external storage device according to the device information, so that the external storage device can be accessed.
- the storage device adding module is used for the storage management service module to add an external storage device to the current storage device list and send the first call instruction to the external storage device management module.
- the mounting processing apparatus provided in the embodiment of the present application is used to implement the corresponding mounting processing method in the foregoing method embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
- the coupling between the modules may be electrical, mechanical or other forms of coupling.
- each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
- the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
- the electronic device 1200 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, or an e-book.
- the electronic device 1200 in this application may include one or more of the following components: a processor 1210, a memory 1220, and one or more application programs, where one or more application programs may be stored in the memory 1220 and configured to One or more processors 1210 execute, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
- the processor 1210 may include one or more processing cores.
- the processor 1210 uses various interfaces and lines to connect various parts of the entire electronic device 1200, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1220, and calling data stored in the memory 1220.
- the processor 1210 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
- DSP Digital Signal Processing
- FPGA Field-Programmable Gate Array
- PLA Programmable Logic Array
- the processor 1210 can be integrated with one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like.
- the CPU mainly processes the operating system, user interface, and application programs;
- the GPU is used for rendering and drawing of display content;
- the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 1210, but may be implemented by a communication chip alone.
- the processor 1210 further includes: an external storage device management module 1211 and a storage management service module 1212.
- the external storage device management module 1211 may be the management and control center of the external storage system in the Android platform, and is a background process for managing and controlling the external storage device of the Android platform. Its functions mainly include: external storage device plug-in event detection, external storage device mounting, unloading, formatting, etc.; storage management service module 1212 is a module for the Android system framework layer to communicate with the external storage device management module 1211.
- the storage management service module 1212 is also a module that provides storage access interfaces and storage mounting message broadcasting to applications. Further, in one embodiment, the external storage device management module 1211 and the storage management service module 1212 may communicate based on the Binder communication mechanism.
- the memory 1220 may include random access memory (RAM) or read-only memory (Read-Only Memory).
- the memory 1220 may be used to store instructions, programs, codes, code sets or instruction sets.
- the memory 1220 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions for implementing the following method embodiments, etc.
- the storage data area can also store data (such as phone book, audio and video data, chat record data) created by the electronic device 1200 during use.
- each unit in the mount processing device shown in FIG. 11 is used as a function module such as a program package, each unit in the mount processing device is stored in the memory 1220 and can be called by the processor and execute the corresponding function. .
- FIG. 13 shows a structural block diagram of a computer readable storage medium provided by an embodiment of the present application.
- the computer readable storage medium 1300 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
- the computer readable storage medium 1300 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
- the computer-readable storage medium 1300 includes a non-transitory computer-readable storage medium.
- the computer readable storage medium 1300 has storage space for the program code 1310 for executing any method steps in the above-mentioned methods. These program codes can be read out from or written into one or more computer program products.
- the program code 1310 may be compressed in an appropriate form, for example.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Studio Devices (AREA)
Abstract
Description
Claims (20)
- 一种挂载处理方法,其特征在于,所述方法包括:A mounting processing method, characterized in that the method includes:存储管理服务模块向外部存储设备管理模块发送第一调用指令;The storage management service module sends the first call instruction to the external storage device management module;所述外部存储设备管理模块响应于所述第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回所述检测状态标识,其中,所述检测操作为检测所述外部存储设备的文件系统是否异常,所述检测中标识用于指示所述存储管理模块所述外部存储设备管理模块正在执行所述检测操作且未检测完成;In response to the first call instruction, the external storage device management module performs a detection operation, and sets the detection status flag of the external storage device as the detection status flag, and returns the detection status flag, wherein the detection operation is detection Whether the file system of the external storage device is abnormal, and the detection identifier is used to indicate that the storage management module and the external storage device management module are performing the detection operation and the detection is not completed;所述外部存储设备管理模块在所述检测操作已完成时,向所述存储管理服务模块发送检测完成指令;The external storage device management module sends a detection completion instruction to the storage management service module when the detection operation is completed;所述存储管理服务模块基于所述检测完成指令通知所述外部存储设备管理模块对所述外部存储设备进行挂载。The storage management service module notifies the external storage device management module to mount the external storage device based on the detection completion instruction.
- 根据权利要求1所述的方法,其特征在于,所述外部存储设备管理模块响应于所述第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回所述检测状态标识,包括:The method according to claim 1, wherein the external storage device management module performs a detection operation in response to the first call instruction, and sets the detection status flag of the external storage device as the detection flag, and returns the The detection status identification includes:所述外部存储设备管理模块响应于所述第一调用指令,基于第一线程设置所述外部存储设备的检测状态标识为检测中标识,并返回所述检测状态标识;In response to the first call instruction, the external storage device management module sets the detection status flag of the external storage device as the detection status flag based on the first thread, and returns the detection status flag;所述外部存储设备管理模块响应于所述第一调用指令,基于第二线程执行检测操作。In response to the first call instruction, the external storage device management module performs a detection operation based on the second thread.
- 根据权利要求2所述的方法,其特征在于,所述第一线程与所述第二线程同时进行。The method of claim 2, wherein the first thread and the second thread are performed simultaneously.
- 根据权利要求1-3任一所述的方法,其特征在于,所述检测操作为检测所述外部存储设备的文件系统是否异常,并针对异常的文件系统进行修复,若所述文件系统正常或者所述文件系统异常且修复完成,则所述外部存储设备管理模块判定所述检测操作已完成。The method according to any one of claims 1-3, wherein the detection operation is to detect whether the file system of the external storage device is abnormal, and repair the abnormal file system, if the file system is normal or If the file system is abnormal and the repair is completed, the external storage device management module determines that the detection operation is completed.
- 根据权利要求2-4任一所述的方法,其特征在于,所述外部存储设备管理模块响应于所述第一调用指令,执行检测操作之后,还包括:The method according to any one of claims 2-4, wherein after the external storage device management module responds to the first call instruction, after performing a detection operation, the method further comprises:当检测时长超过预设时长时,所述外部存储设备管理模块设置所述检测状态标识为检测异常标识;When the detection time length exceeds the preset time length, the external storage device management module sets the detection status flag as a detection abnormality flag;所述外部存储设备管理模块对所述外部存储设备进行挂载时,确定是否能够查找到检测异常标识;When the external storage device management module mounts the external storage device, it determines whether the detection abnormality identifier can be found;若能够,则停止对所述外部存储设备进行挂载。If so, stop mounting the external storage device.
- 根据权利要求2-4任一所述的方法,其特征在于,所述外部存储设备管理模块响应于所述第一调用指令,执行检测操作之后,还包括:The method according to any one of claims 2-4, wherein after the external storage device management module responds to the first call instruction, after performing a detection operation, the method further comprises:当检测时长超过预设时长时,结束本次方法。When the detection time exceeds the preset time, the method ends.
- 根据权利要求1-4任一所述的方法,其特征在于,所述第一调用指令包括检测指令,所述存储管理服务模块向外部存储设备管理模块发送第一调用指令,包括:The method according to any one of claims 1 to 4, wherein the first call instruction includes a detection instruction, and the storage management service module sends the first call instruction to an external storage device management module, including:所述存储管理服务模块通过Binder调用将所述检测指令发送至所述外部存储设备管理模块。The storage management service module sends the detection instruction to the external storage device management module through Binder call.
- 根据权利要求1所述的方法,其特征在于,所述存储管理服务模块基于所述检测完成指令通知所述外部存储设备管理模块对所述外部存储设备进行挂载,包括:The method according to claim 1, wherein the storage management service module notifies the external storage device management module to mount the external storage device based on the detection completion instruction, comprising:所述存储管理服务模块响应于所述检测完成指令,向所述外部存储设备管理模块发送第二调用指令,所述第二调用指令用于通知所述外部存储设备管理模块对所述外部存储设备进行挂载。In response to the detection completion instruction, the storage management service module sends a second call instruction to the external storage device management module, where the second call instruction is used to notify the external storage device management module of the external storage device Mount it.
- 根据权利要求8所述的方法,其特征在于,所述存储管理服务模块响应于所述检测完成指令,向所述外部存储设备管理模块发送第二调用指令之后,还包括:The method according to claim 8, wherein after the storage management service module sends a second call instruction to the external storage device management module in response to the detection completion instruction, the method further comprises:所述外部存储设备管理模块响应于所述第二调用指令,根据所述检测状态标识,判断所述外部存储设备的文件系统是否异常;In response to the second call instruction, the external storage device management module determines whether the file system of the external storage device is abnormal according to the detection status identifier;若异常,设置所述外部存储设备的挂载状态标识为无法挂载标识,以使所述外部存储设备管理模块无法对所述外部存储设备进行挂载。If it is abnormal, the mounting status flag of the external storage device is set as an unmountable flag, so that the external storage device management module cannot mount the external storage device.
- 根据权利要求9所述的方法,其特征在于,所述外部存储设备管理模块响应于所述第二调用指令,根据所述检测状态标识,判断所述外部存储设备的文件系统是否异常之后,还包括:The method according to claim 9, wherein the external storage device management module determines whether the file system of the external storage device is abnormal based on the detection status identifier in response to the second call instruction, and then include:若异常,结束本次方法。If abnormal, end this method.
- 根据权利要求9所述的方法,其特征在于,所述若非异常,所述外部存储设备管理模块响应于所述第二调用指令,根据所述检测状态标识,判断所述外部存储设备的文件系统是否异常之后,还包括:The method according to claim 9, wherein, if it is not abnormal, the external storage device management module determines the file system of the external storage device in response to the second call instruction according to the detection status identifier After whether it is abnormal, it also includes:若非异常,所述外部存储设备管理模块获取挂载结果;If it is not abnormal, the external storage device management module obtains the mounting result;所述外部存储设备管理模块根据所述挂载结果,设置所述挂载状态标识。The external storage device management module sets the mounting state flag according to the mounting result.
- 根据权利要求11所述的方法,其特征在于,所述外部存储设备管理模块根据所述挂载结果,设置所述挂载状态标识,包括:The method according to claim 11, wherein the external storage device management module setting the mounting status flag according to the mounting result comprises:若挂载成功,设置所述挂载状态标识为已挂载标识;If the mounting is successful, set the mounting status flag as the mounted flag;若挂载失败,设置所述挂载状态标识为无法挂载标识。If the mounting fails, the mounting status flag is set as an unmountable flag.
- 根据权利要求8-12所述的方法,其特征在于,所述存储管理服务模块响应于所述检测完成指令,向所述外部存储设备管理模块发送第二调用指令之后,还包括:The method according to claims 8-12, wherein after the storage management service module sends a second call instruction to the external storage device management module in response to the detection completion instruction, the method further comprises:所述外部存储设备管理模块响应于所述第二调用指令,对所述外部存储设备进行挂载;The external storage device management module responds to the second call instruction to mount the external storage device;所述外部存储设备管理模块在当前挂载已完成时,向所述存储管理服务模块发送挂载完成指令,所述挂载完成指令包括所述外部存储设备的挂载状态标识;The external storage device management module sends a mounting completion instruction to the storage management service module when the current mounting is completed, where the mounting completion instruction includes the mounting status identifier of the external storage device;所述存储管理服务模块根据所述挂载状态标识,广播与所述挂载状态标识对应的挂载结果。The storage management service module broadcasts the mounting result corresponding to the mounting state identifier according to the mounting state identifier.
- 根据权利要求13所述的方法,其特征在于,所述外部存储设备管理模块响应于所述第二调用指令,对所述外部存储设备进行挂载,包括:The method according to claim 13, wherein the external storage device management module responds to the second call instruction to mount the external storage device, comprising:所述外部存储设备管理模块获取挂载结果;The external storage device management module obtains the mounting result;所述外部存储设备管理模块根据所述挂载结果,设置所述外部存储设备的挂载状态标识。The external storage device management module sets the mounting status flag of the external storage device according to the mounting result.
- 根据权利要求14所述的方法,其特征在于,所述外部存储设备管理模块根据所述挂载结果,设置挂载状态标识,包括:The method according to claim 14, wherein the external storage device management module sets a mounting status flag according to the mounting result, comprising:若挂载成功,设置所述挂载状态标识为已挂载标识;If the mounting is successful, set the mounting status flag as the mounted flag;若挂载失败,设置所述挂载状态标识为无法挂载标识。If the mounting fails, the mounting status flag is set as an unmountable flag.
- 根据权利要求13-15任一所述的方法,其特征在于,所述存储管理服务模块根据所述挂载状态标识,广播与所述挂载状态标识对应的挂载结果,包括:The method according to any one of claims 13-15, wherein the storage management service module broadcasts the mounting result corresponding to the mounting status identifier according to the mounting status identifier, comprising:若所述挂载状态标识为无法挂载标识,所述存储管理服务模块广播挂载失败;If the mount status identifier is an unmountable identifier, the storage management service module broadcasts that the mount fails;若所述挂载状态标识为已挂载标识,所述存储管理服务模块广播挂载成功。If the mounting status identifier is a mounted identifier, the storage management service module broadcasts that the mounting is successful.
- 根据权利要求1-16任一所述的方法,其特征在于,还包括:The method according to any one of claims 1-16, further comprising:所述外部存储设备管理模块在检测到所述外部存储设备的插入事件时,向所述存储管理服务模块发送所述外部存储设备的设备信息;When the external storage device management module detects the insertion event of the external storage device, sending the device information of the external storage device to the storage management service module;所述存储管理服务模块根据所述设备信息,创建所述外部存储设备的存储访问接口,以使所述外部存储设备被访问;The storage management service module creates a storage access interface of the external storage device according to the device information, so that the external storage device can be accessed;所述存储管理服务模块在当前存储设备列表上添加所述外部存储设备,并向所述外部存储设备管理模块发送所述第一调用指令。The storage management service module adds the external storage device to the current storage device list, and sends the first call instruction to the external storage device management module.
- 一种挂载处理装置,其特征在于,所述装置包括:A mounting processing device, characterized in that the device includes:第一调用模块,用于存储管理服务模块向外部存储设备管理模块发送第一调用指令;The first calling module is used for the storage management service module to send the first calling instruction to the external storage device management module;第一返回模块,用于所述外部存储设备管理模块响应于所述第一调用指令,执行检测操作,且设置外部存储设备的检测状态标识为检测中标识,并返回所述检测状态标识,其中,所述检测操作为检测所述外部存储设备的文件系统是否异常,所述检测中标识用于指示所述存储管理模块所述外部存储设备管理模块正在执行所述检测操作且未检测完成;The first return module is used for the external storage device management module to perform a detection operation in response to the first call instruction, and set the detection status flag of the external storage device as the detection status flag, and return the detection status flag, where The detection operation is to detect whether the file system of the external storage device is abnormal, and the detection identifier is used to indicate that the storage management module and the external storage device management module are performing the detection operation and the detection is not completed;检测完成模块,用于所述外部存储设备管理模块在所述检测操作已完成时,向所述存储管理服务模块发送检测完成指令;The detection completion module is used for the external storage device management module to send a detection completion instruction to the storage management service module when the detection operation is completed;挂载通知模块,用于所述存储管理服务模块基于所述检测完成指令通知所述外部存储设备管理模块对所述外部存储设备进行挂载。The mounting notification module is used for the storage management service module to notify the external storage device management module to mount the external storage device based on the detection completion instruction.
- 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:一个或多个处理器;One or more processors;存储器;Memory一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行如权利要求1-17任一项所述的方法。One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute such as The method of any one of claims 1-17.
- 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-17任一项所述的方法。A computer readable storage medium, wherein the computer readable storage medium stores program code, and the program code can be called by a processor to execute the method according to any one of claims 1-17 .
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201980091202.2A CN113412480B (en) | 2019-05-05 | 2019-05-05 | Mounting processing method, mounting processing device, electronic equipment and computer readable storage medium |
PCT/CN2019/085568 WO2020223862A1 (en) | 2019-05-05 | 2019-05-05 | Mounting processing method and apparatus, electronic device, and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2019/085568 WO2020223862A1 (en) | 2019-05-05 | 2019-05-05 | Mounting processing method and apparatus, electronic device, and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020223862A1 true WO2020223862A1 (en) | 2020-11-12 |
Family
ID=73050671
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/085568 WO2020223862A1 (en) | 2019-05-05 | 2019-05-05 | Mounting processing method and apparatus, electronic device, and computer readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113412480B (en) |
WO (1) | WO2020223862A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113377627A (en) * | 2021-06-10 | 2021-09-10 | 广州朗国电子科技有限公司 | Method, system, equipment and storage medium for detecting abnormity of service server |
CN115086828A (en) * | 2022-08-23 | 2022-09-20 | 荣耀终端有限公司 | Earphone control method and related device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001232069A (en) * | 2000-02-21 | 2001-08-28 | Namco Ltd | Game device, data communication method and computer readable recording medium having program for game recorded thereon |
CN107423157A (en) * | 2017-07-31 | 2017-12-01 | 北京雷石天地电子技术有限公司 | A kind of hard disk hanging method, module and operating system |
CN109086079A (en) * | 2018-06-11 | 2018-12-25 | 青岛海信移动通信技术股份有限公司 | A kind of storage equipment carry management method and device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7743283B1 (en) * | 2007-04-27 | 2010-06-22 | Netapp, Inc. | Dynamically modifying parameters for servicing of storage devices |
CN102664929A (en) * | 2012-04-05 | 2012-09-12 | 福兴达科技实业(深圳)有限公司 | Mobile terminal and method for managing mass storage device |
-
2019
- 2019-05-05 CN CN201980091202.2A patent/CN113412480B/en active Active
- 2019-05-05 WO PCT/CN2019/085568 patent/WO2020223862A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001232069A (en) * | 2000-02-21 | 2001-08-28 | Namco Ltd | Game device, data communication method and computer readable recording medium having program for game recorded thereon |
CN107423157A (en) * | 2017-07-31 | 2017-12-01 | 北京雷石天地电子技术有限公司 | A kind of hard disk hanging method, module and operating system |
CN109086079A (en) * | 2018-06-11 | 2018-12-25 | 青岛海信移动通信技术股份有限公司 | A kind of storage equipment carry management method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113377627A (en) * | 2021-06-10 | 2021-09-10 | 广州朗国电子科技有限公司 | Method, system, equipment and storage medium for detecting abnormity of service server |
CN113377627B (en) * | 2021-06-10 | 2023-12-05 | 广州朗国电子科技股份有限公司 | Business server abnormality detection method, system, equipment and storage medium |
CN115086828A (en) * | 2022-08-23 | 2022-09-20 | 荣耀终端有限公司 | Earphone control method and related device |
CN115086828B (en) * | 2022-08-23 | 2022-12-27 | 荣耀终端有限公司 | Earphone control method and related device |
Also Published As
Publication number | Publication date |
---|---|
CN113412480B (en) | 2023-05-16 |
CN113412480A (en) | 2021-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10437631B2 (en) | Operating system hot-switching method and apparatus and mobile terminal | |
CN103838648A (en) | Terminal and data backup method | |
US20140019496A1 (en) | Data transfer method | |
WO2020223862A1 (en) | Mounting processing method and apparatus, electronic device, and computer readable storage medium | |
WO2024007510A1 (en) | Server management method, apparatus and system, and electronic device and readable storage medium | |
WO2024078218A1 (en) | System booting method and electronic device | |
CN112860322B (en) | Operating system switching method, device, equipment and storage medium | |
CN114327606B (en) | Configuration management method and device, electronic equipment and computer readable storage medium | |
CN114064234B (en) | Method and device for repairing WMI service | |
CN108845772B (en) | Hard disk fault processing method, system, equipment and computer storage medium | |
CN110753040A (en) | Request processing method and device | |
WO2020102940A1 (en) | Abnormality processing method, terminal device and storage medium | |
CN111538536B (en) | Method for formatting intelligent terminal, intelligent terminal and storage medium | |
WO2020119608A1 (en) | Spark shuffle-based remote direct memory access system and method | |
CN110365839B (en) | Shutdown method, shutdown device, shutdown medium and electronic equipment | |
WO2020210955A1 (en) | Application program starting method and apparatus, and electronic device and storage medium | |
CN109634782B (en) | Method and device for detecting system robustness, storage medium and terminal | |
CN114281389A (en) | Method and device for upgrading SOC (system on chip) and automatic driving vehicle | |
CN106326049A (en) | Fault locating method and terminal | |
CN113254274A (en) | Message processing method, device, storage medium and server | |
CN107480004B (en) | Fault recovery method and device and computer equipment | |
CN112416641A (en) | Controlled end node restart detection method in master-slave architecture and master control end node | |
CN111813574A (en) | Picture compression method and device, storage medium and electronic equipment | |
WO2021097626A1 (en) | Touch screen firmware loading method and apparatus, electronic device, and storage medium | |
CN105791732A (en) | Processing method and apparatus for MHL (Mobile High-Definition Link) driver |
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: 19927660 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: 19927660 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19927660 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC DATED 18.05.2022 (EPO FORM 1205A) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19927660 Country of ref document: EP Kind code of ref document: A1 |