CN107220008B - Storage space reservation method and device - Google Patents
Storage space reservation method and device Download PDFInfo
- Publication number
- CN107220008B CN107220008B CN201710502688.7A CN201710502688A CN107220008B CN 107220008 B CN107220008 B CN 107220008B CN 201710502688 A CN201710502688 A CN 201710502688A CN 107220008 B CN107220008 B CN 107220008B
- Authority
- CN
- China
- Prior art keywords
- space
- reserved
- size
- partition
- determining
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
- G06F3/0607—Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The disclosure relates to a storage space reservation method and a storage space reservation device, which are used for solving the technical problem that some specific processes cannot normally run due to insufficient storage space. The method comprises the following steps: determining a partition of a space to be reserved before mounting and partitioning a storage unit of the electronic equipment; determining the size of a reserved space according to the size of a preset space and the total space size of the subareas; and reserving a storage space in the partition according to the size of the reserved space, wherein the reserved storage space can be used by the process with the specified authority.
Description
Technical Field
The present disclosure relates to the field of information technologies, and in particular, to a storage space reservation method and apparatus.
Background
With the continuous development of scientific technology, electronic technology has also been rapidly developed, and various electronic devices, such as mobile phones, PADs (tablet computers), etc., have become an indispensable part of people's entertainment life, and these electronic devices enrich people's life. Electronic devices are all loaded with operating systems, and the Android (Android) system is one of the mainstream operating systems at present.
In the Android system, some important core processes can normally run to ensure the normal work of the system or the application program. For example, if the storage space is full, the file manager may have an opportunity to clear the storage space only when the file manager can normally work, and the file manager may need to record some core information to normally work, and if the storage space is insufficient, the core process that the file manager can normally work may not run, which may result in the file manager not working, and the storage space may not be cleared.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a method and an apparatus for reserving a storage space, which are used to solve the technical problem that some specific processes cannot normally operate due to insufficient storage space.
According to a first aspect of the embodiments of the present disclosure, there is provided a storage space reservation method applied to an electronic device, including:
determining a partition of a space to be reserved before mounting and partitioning a storage unit of the electronic equipment;
determining the size of a reserved space according to the size of a preset space and the total space size of the subareas;
and reserving a storage space in the partition according to the size of the reserved space, wherein the reserved storage space can be used by the process with the specified authority.
Optionally, determining the size of the reserved space according to the size of the preset space and the total size of the partition, including:
determining a reserved space threshold according to the total space size of the partitions;
when the reserved space threshold is smaller than the preset space size, determining that the value of the reserved space size is the same as the reserved space threshold;
and when the reserved space threshold is larger than or equal to the preset space size, determining that the value of the reserved space size is the same as the value of the preset space size.
Optionally, after determining the partition of the space to be reserved, the method further includes:
and determining the file system used by the partition as an extended file system EXT.
Optionally, the method further includes:
and setting partitions of the space to be reserved and the size of the preset space in a file fstab for recording mount information related to each partition file system.
Optionally, after reserving a storage space in the partition according to the size of the reserved space, the method further includes:
when a target process requests to use a reserved storage space, determining whether the target process has a specified permission;
and when the target process has the specified right, allocating space for the process in the reserved storage space.
According to a second aspect of the embodiments of the present disclosure, there is provided a storage space reservation apparatus applied to an electronic device, including:
the first determination module is configured to determine a partition of a space to be reserved before mounting the partition on a storage unit of the electronic device;
the second determination module is configured to determine the size of the reserved space according to the size of a preset space and the total space size of the partitions;
and the reservation module is configured to reserve a storage space in the partition according to the size of the reserved space, wherein the reserved storage space can be used by the process with the specified authority.
Optionally, the second determining module includes:
a first determining submodule configured to determine a reserved space threshold according to a total space size of the partition;
a second determining submodule configured to determine that the value of the reserved space size is the same as the reserved space threshold when the reserved space threshold is smaller than the preset space size;
a third determining submodule configured to determine that the value of the reserved space size is the same as the value of the preset space size when the reserved space threshold is greater than or equal to the preset space size.
Optionally, the apparatus further comprises:
and the third determining module is configured to determine the file system used by the partition as an extended file system EXT after determining the partition of the space to be reserved.
Optionally, the apparatus further comprises:
and the setting module is configured to set the partition of the space to be reserved and the size of the preset space in a file fstab for recording mount information related to each partition file system.
Optionally, the apparatus further comprises:
a fourth determining module configured to determine whether the target process has a designated right when the target process requests to use the reserved storage space after reserving the storage space in the partition according to the size of the reserved space;
an allocation module configured to allocate space for the process in the reserved memory space when the target process has the specified rights.
According to a third aspect of the embodiments of the present disclosure, there is provided a storage space reservation apparatus, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
determining a partition of a space to be reserved before mounting and partitioning a storage unit of the electronic equipment;
determining the size of a reserved space according to the size of a preset space and the total space size of the subareas;
and reserving a storage space in the partition according to the size of the reserved space, wherein the reserved storage space can be used by the process with the specified authority.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the steps of the storage space reservation method provided by the first aspect of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: certain storage space can be reserved to ensure the normal operation of the process with the appointed authority. The reserved space can be determined according to the total space size of the partition of the space to be reserved and the set preset space size, and then the storage space is reserved in the corresponding partition according to the reserved space size, and the reserved space can be used by the process with the designated permission. Therefore, the normal operation of some specific processes can be well guaranteed, the phenomenon that the system or the application cannot work due to the fact that the specific processes cannot operate is avoided, and the performance of the electronic equipment system and the reliability of the electronic equipment are improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flow chart illustrating a method of reserving storage space according to an example embodiment.
Fig. 2 is a block diagram illustrating a storage space reservation apparatus according to an example embodiment.
Fig. 3 is another block diagram illustrating a storage space reservation apparatus according to an example embodiment.
Fig. 4 is another block diagram illustrating a storage space reservation apparatus according to an example embodiment.
Fig. 5 is another block diagram illustrating a storage space reservation apparatus according to an example embodiment.
Fig. 6 is another block diagram illustrating a storage space reservation apparatus according to an example embodiment.
Fig. 7 is a block diagram illustrating a storage space reservation apparatus according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The electronic device in the embodiment of the present disclosure may be, for example, a different electronic device such as a PC, a PAD, and a mobile phone based on an Android system, which is not limited in the embodiment of the present disclosure.
Fig. 1 is a flowchart illustrating a storage space reservation method according to an exemplary embodiment, which is used in an electronic device, as shown in fig. 1, and includes the following steps.
In step S11, before mounting the partition on the storage unit of the electronic device, the partition of the space to be reserved is determined.
In step S12, the reserved space size is determined according to the preset space size and the total space size of the partition.
In step S13, a memory space is reserved in the partition according to the reserved space size, wherein the reserved memory space can be used by a process having a specified authority.
In the embodiment of the present disclosure, there is no limitation on which processes have the designated permission. For example, it may be a process and a root process which claim the CAP _ SYS _ RESOURCE capability, and the corresponding process may be set to the CAP _ SYS _ RESOURCE capability by calling a similar capset function when the corresponding process is created.
The partition and the preset space size of the space to be reserved can be set through a programming statement, the partition and the preset space size of the space to be reserved can be determined through analysis, then the reserved space size is determined according to the preset space size and the total space size of the partition of the space to be reserved, for example, the finally determined reserved space size is 128M, then a 128M storage space can be reserved in the partition of the space to be reserved, and a process with the designated permission can use the reserved 128M storage space. By the method, the normal operation of some specific processes can be well guaranteed, the phenomenon that the system or the application cannot work due to the fact that the specific processes cannot operate is avoided, and the performance of an electronic equipment system and the reliability of the electronic equipment are improved.
The preset space size may be a space size preset according to a requirement, and the preset space size is not limited in this disclosure, for example, the preset space size may be 128M, 64M, and the like. The size of the reserved space may further be determined together with the total size of the space of the partition of the space to be reserved.
Optionally, for the way of setting the partition of the space to be reserved and the size of the preset space, the embodiment of the present disclosure is not limited, and the partition of the space to be reserved and the size of the preset space may be set in the file fstab used for recording mount information related to each partition file system.
For example, defining a reserved _ size variable parameter to store a preset space size, then parsing the reserved _ size parameter may be supported first in fs _ mgr, and then the reserved _ size may be assigned (set to the preset space size) and the partition of the space to be reserved may be set programmatically in fstab. For example, the userdata partition may be set as the partition to be reserved, and the reserved _ size may be set to 128M (i.e., the preset space size is set to 128M). Therefore, the partition of the space to be reserved and the size of the preset space can be set better, and the size of the reserved space can be further determined.
After the partition of the space to be reserved and the size of the preset space are set, before the partition is mounted on the storage unit, the fstab file can be analyzed when the system is started, and the reserved _ size parameter of the corresponding partition is found, so that the partition can be determined to need the reserved space.
Optionally, after determining the partition to be reserved, it may also be determined that the file system used by the partition is an extended file system EXT.
It may be determined whether the partition to be reserved is an EXT file system (including EXT2, EXT3, EXT4, etc.), and if it is determined to be an EXT file system, the further operation of reserving the space is resumed. In this way, it is ensured that space in the partitions using the EXT file system is reserved, ensuring that processes with specified permissions can use.
Optionally, the reserved space is determined according to the size of the preset space and the total space of the partitions, the reserved space threshold may be determined according to the total space of the partitions, when the reserved space threshold is smaller than the preset space, the reserved space is determined to have the same value as the reserved space threshold, and when the reserved space threshold is larger than or equal to the preset space, the reserved space is determined to have the same value as the preset space.
Since the storage space is usually described by data blocks, the size of the preset space can be converted into how many data blocks to describe. For example, block _ size is obtained from a superblock of a partition in which a space is to be reserved, and then reserved _ size (a parameter that holds a preset space size) is converted into a parameter reserved _ blocks described by how many data blocks, that is, reserved _ blocks ═ reserved _ size/block _ size.
The reserved space threshold may be determined according to the total space size of the partition of the space to be reserved, and the embodiment of the present disclosure is not limited to the manner of determining the reserved space threshold, for example, 2% of the total space size of the partition of the space to be reserved may be the reserved space threshold, and then the reserved space threshold reserved _ threshold is × 0.02.02 of the total partition obtained from the super block, of course, 1%, 0.5%. the total space size of the partition of the space to be reserved may also be the reserved space threshold.
After the reserved space threshold is determined, the reserved space threshold may be compared with a preset space size, and then the reserved space size may be determined according to the comparison result.
After the comparison, if reserved _ threshold < reserved _ blocks, reserved _ blocks may be made to be reserved _ threshold; if the reserved _ threshold is greater than or equal to reserved _ blocks, the value of reserved _ blocks can be set to the reserved _ size after being converted into the data block size.
Through the method, the more proper reserved space size reserved in the partition can be better determined, the reserved space can be favorably used by the process with the appointed authority, and the system performance of the electronic equipment is improved.
After determining the value of reserved _ blocks, that is, the size of the reserved space, the storage space may be reserved in the partition to be reserved according to the size of the reserved space. For example, a sub-process may be initiated to perform operations like the following commands: tune2fs-r reserved _ blocks.
Optionally, after the storage space is reserved, when the target process requests to use the reserved storage space, it may be determined whether the target process has the specified permission, and when the target process has the specified permission, a space may be allocated to the process in the reserved storage space.
The target process may be any process to be run, and if the remaining memory space in the memory unit, except the reserved memory space, is not enough for the target process to run normally, the target process may apply for using the reserved memory space. When determining that the target process has a designated right (for example, to declare a CAP _ SYS _ RESOURCE capability), the target process may be considered to be a process important for system operation, and then an address in a reserved storage space may be allocated to the target process for the target process to operate; otherwise, if the target process does not have the process with the designated authority, the system may not be affected by whether the target process is operated or not, and the address may not be allocated to the target process. Therefore, the normal operation of some specific processes can be well guaranteed, the phenomenon that the system or the application cannot work due to the fact that the specific processes cannot operate is avoided, and the performance of the electronic equipment system and the reliability of the electronic equipment are improved.
Fig. 2 is a block diagram illustrating a storage space reservation apparatus 100 according to an example embodiment. Referring to fig. 2, the apparatus 100 includes a first determining module 121, a second determining module 122, and a reserving module 123.
The first determining module 121 is configured to determine a partition of a space to be reserved before mounting the partition on a storage unit of the electronic device;
the second determining module 122 is configured to determine the size of the reserved space according to the preset space size and the total space size of the partition;
the reservation module 123 is configured to reserve storage space in the partition according to the size of the reserved space, wherein processes with specified permissions can use the reserved storage space.
Optionally, as shown in fig. 3, the second determining module 122 includes:
a first determining submodule 1221 configured to determine a reserved space threshold according to a total space size of the partition;
a second determining submodule 1222 configured to determine that the value of the reserved space size is the same as the reserved space threshold when the reserved space threshold is smaller than the preset space size;
a third determining submodule 1223 configured to determine that the value of the reserved space size is the same as the value of the preset space size when the reserved space threshold is greater than or equal to the preset space size.
Optionally, as shown in fig. 4, the apparatus 100 further includes:
a third determining module 124 configured to determine, after determining the partition of the space to be reserved, the file system used by the partition as an extended file system EXT.
Optionally, as shown in fig. 5, the apparatus 100 further includes:
the setting module 125 is configured to set the partition of the space to be reserved and the size of the preset space in the fstab file for recording mount information related to the file system of each partition.
Optionally, as shown in fig. 6, the apparatus 100 further includes:
a fourth determining module 126 configured to determine whether the target process has the specified right when the target process requests to use the reserved memory space after reserving the memory space in the partition by the reserved space size;
an allocation module 127 configured to allocate space for the process in the reserved memory space when the target process has the specified rights.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The present disclosure also provides a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the steps of the storage space reservation method provided by the present disclosure.
Fig. 7 is a block diagram illustrating a storage space reservation apparatus 700 according to an example embodiment. For example, the apparatus 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 7, apparatus 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the apparatus 700. Examples of such data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power component 706 provides power to the various components of the device 700. The power components 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the apparatus 700.
The multimedia component 708 includes a screen that provides an output interface between the device 700 and a user, in some embodiments, the screen may include a liquid crystal display (L CD) and a Touch Panel (TP). if the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
The audio component 710 is configured to output and/or input audio signals. For example, audio component 710 includes a Microphone (MIC) configured to receive external audio signals when apparatus 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of the apparatus 700. For example, sensor assembly 714 may detect an open/closed state of device 700, the relative positioning of components, such as a display and keypad of device 700, sensor assembly 714 may also detect a change in position of device 700 or a component of device 700, the presence or absence of user contact with device 700, orientation or acceleration/deceleration of device 700, and a change in temperature of device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate wired or wireless communication between the apparatus 700 and other devices. The apparatus 700 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), programmable logic devices (P L D), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the device 700 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
1. A storage space reservation method is applied to electronic equipment and is characterized by comprising the following steps:
determining a partition of a space to be reserved before mounting and partitioning a storage unit of the electronic equipment;
determining the size of a reserved space according to the size of a preset space and the total space size of the subareas;
reserving a storage space in the partition according to the size of the reserved space, wherein a process with a specified authority can use the reserved storage space, and the reserved storage space is used for normal operation of the process with the specified authority;
wherein, the determining the size of the reserved space according to the size of the preset space and the total space size of the partitions includes:
determining a reserved space threshold according to the total space size of the partitions;
when the reserved space threshold is smaller than the preset space size, determining that the value of the reserved space size is the same as the reserved space threshold;
and when the reserved space threshold is larger than or equal to the preset space size, determining that the value of the reserved space size is the same as the value of the preset space size.
2. The method of claim 1, after determining the partition of the space to be reserved, further comprising:
and determining the file system used by the partition as an extended file system EXT.
3. The method of claim 1, further comprising:
and setting partitions of the space to be reserved and the size of the preset space in a file fstab for recording mount information related to each partition file system.
4. The method of claim 1, after reserving storage space in the partition by the reserved space size, further comprising:
when a target process requests to use a reserved storage space, determining whether the target process has a specified permission;
and when the target process has the specified right, allocating space for the process in the reserved storage space.
5. A storage space reservation device applied to electronic equipment is characterized by comprising:
the first determination module is configured to determine a partition of a space to be reserved before mounting the partition on a storage unit of the electronic device;
the second determination module is configured to determine the size of the reserved space according to the size of a preset space and the total space size of the partitions;
the reservation module is configured to reserve a storage space in the partition according to the size of the reserved space, wherein a process with a specified authority can use the reserved storage space, and the reserved storage space is used for normal operation of the process with the specified authority;
the second determining module includes:
a first determining submodule configured to determine a reserved space threshold according to a total space size of the partition;
a second determining submodule configured to determine that the value of the reserved space size is the same as the reserved space threshold when the reserved space threshold is smaller than the preset space size;
a third determining submodule configured to determine that the value of the reserved space size is the same as the value of the preset space size when the reserved space threshold is greater than or equal to the preset space size.
6. The apparatus of claim 5, further comprising:
and the third determining module is configured to determine the file system used by the partition as an extended file system EXT after determining the partition of the space to be reserved.
7. The apparatus of claim 5, further comprising:
and the setting module is configured to set the partition of the space to be reserved and the size of the preset space in a file fstab for recording mount information related to each partition file system.
8. The apparatus of claim 5, further comprising:
a fourth determining module configured to determine whether the target process has a designated right when the target process requests to use the reserved storage space after reserving the storage space in the partition according to the size of the reserved space;
an allocation module configured to allocate space for the process in the reserved memory space when the target process has the specified rights.
9. A storage space reservation apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
determining a partition of a space to be reserved before mounting and partitioning a storage unit of the electronic equipment;
determining the size of a reserved space according to the size of a preset space and the total space size of the subareas;
reserving a storage space in the partition according to the size of the reserved space, wherein a process with a specified authority can use the reserved storage space, and the reserved storage space is used for normal operation of the process with the specified authority;
wherein, the determining the size of the reserved space according to the size of the preset space and the total space size of the partitions includes:
determining a reserved space threshold according to the total space size of the partitions;
when the reserved space threshold is smaller than the preset space size, determining that the value of the reserved space size is the same as the reserved space threshold;
and when the reserved space threshold is larger than or equal to the preset space size, determining that the value of the reserved space size is the same as the value of the preset space size.
10. A computer-readable storage medium, on which computer program instructions are stored, which program instructions, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710502688.7A CN107220008B (en) | 2017-06-27 | 2017-06-27 | Storage space reservation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710502688.7A CN107220008B (en) | 2017-06-27 | 2017-06-27 | Storage space reservation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107220008A CN107220008A (en) | 2017-09-29 |
CN107220008B true CN107220008B (en) | 2020-08-07 |
Family
ID=59951370
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710502688.7A Active CN107220008B (en) | 2017-06-27 | 2017-06-27 | Storage space reservation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107220008B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110222019B (en) * | 2019-05-08 | 2023-12-19 | 安克创新科技股份有限公司 | Method and device for adjusting space occupied by file system |
CN113495869B (en) * | 2020-03-20 | 2024-04-26 | 华为技术有限公司 | File system space adjusting method and device and electronic equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101944378A (en) * | 2006-03-31 | 2011-01-12 | 株式会社日立制作所 | Information recording device and recording method |
CN102339318A (en) * | 2011-10-24 | 2012-02-01 | Tcl集团股份有限公司 | File system management method and system |
CN104239096A (en) * | 2014-09-02 | 2014-12-24 | 艾体威尔电子技术(北京)有限公司 | Method and unit for realizing security data partitions in Android system |
CN104536783A (en) * | 2014-12-23 | 2015-04-22 | 小米科技有限责任公司 | Method and device for setting reserved space |
CN104571955A (en) * | 2014-12-27 | 2015-04-29 | 华为技术有限公司 | Method and device for expanding storage capacity |
EP2965207A1 (en) * | 2013-03-06 | 2016-01-13 | Dell Products, L.P. | System and method for managing storage system snapshots |
CN105843656A (en) * | 2016-04-22 | 2016-08-10 | Tcl集团股份有限公司 | System upgrading method for insufficient disk space, terminal device and server |
-
2017
- 2017-06-27 CN CN201710502688.7A patent/CN107220008B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101944378A (en) * | 2006-03-31 | 2011-01-12 | 株式会社日立制作所 | Information recording device and recording method |
CN102339318A (en) * | 2011-10-24 | 2012-02-01 | Tcl集团股份有限公司 | File system management method and system |
EP2965207A1 (en) * | 2013-03-06 | 2016-01-13 | Dell Products, L.P. | System and method for managing storage system snapshots |
CN104239096A (en) * | 2014-09-02 | 2014-12-24 | 艾体威尔电子技术(北京)有限公司 | Method and unit for realizing security data partitions in Android system |
CN104536783A (en) * | 2014-12-23 | 2015-04-22 | 小米科技有限责任公司 | Method and device for setting reserved space |
CN104571955A (en) * | 2014-12-27 | 2015-04-29 | 华为技术有限公司 | Method and device for expanding storage capacity |
CN105843656A (en) * | 2016-04-22 | 2016-08-10 | Tcl集团股份有限公司 | System upgrading method for insufficient disk space, terminal device and server |
Also Published As
Publication number | Publication date |
---|---|
CN107220008A (en) | 2017-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106020943B (en) | Application program double-opening method and device | |
CN105955765B (en) | Application preloading method and device | |
CN107291626B (en) | Data storage method and device | |
CN106033397B (en) | Memory buffer area adjusting method, device and terminal | |
CN107436782B (en) | Application silent installation method and device | |
CN111258952B (en) | Data storage control method, device and storage medium | |
CN107632835B (en) | Application installation method and device | |
CN107220008B (en) | Storage space reservation method and device | |
CN110166564B (en) | Information communication method, terminal and storage medium | |
CN109062625B (en) | Application program loading method and device and readable storage medium | |
CN107506496B (en) | Defragmentation method, defragmentation device and computer-readable storage medium | |
CN110968523A (en) | Memory defragmentation method and device | |
EP2985697A1 (en) | Method and device for controlling router plug-in | |
CN109471714B (en) | Platform deployment method, device, equipment and storage medium | |
CN111625329A (en) | Task allocation method and device, electronic equipment, server and storage medium | |
CN111090463A (en) | Resource identification method and device and computer storage medium | |
CN110888822B (en) | Memory processing method, device and storage medium | |
CN116360979A (en) | Memory allocation method and device, electronic equipment and readable storage medium | |
CN112291799B (en) | Method and device for determining download network speed, user equipment and storage medium | |
CN113448642B (en) | System file access method and device and electronic equipment | |
CN111142939B (en) | Application program processing method and device | |
CN107402784B (en) | Application management method and application management device | |
CN114528037A (en) | Application starting method and device, electronic equipment and storage medium | |
CN107291394B (en) | Storage space reservation method and device | |
CN113805978A (en) | Authority display method, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |