CN111258952A - Data storage control method, device and storage medium - Google Patents
Data storage control method, device and storage medium Download PDFInfo
- Publication number
- CN111258952A CN111258952A CN202010019133.9A CN202010019133A CN111258952A CN 111258952 A CN111258952 A CN 111258952A CN 202010019133 A CN202010019133 A CN 202010019133A CN 111258952 A CN111258952 A CN 111258952A
- Authority
- CN
- China
- Prior art keywords
- storage
- amount
- total
- file
- quota
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/11—File system administration, e.g. details of archiving or snapshots
- G06F16/113—Details of archiving
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a data storage control method, a data storage control device, communication equipment and a storage medium. The method comprises the following steps: acquiring the total storage quota and the total usage amount of a shared storage space corresponding to a plurality of file directories; and controlling the storage operation of the file directories based on the total storage quota amount and the total usage amount.
Description
Technical Field
The present invention relates to computer application technologies, and in particular, to a data storage control method, apparatus, and storage medium.
Background
A Quota (Quota) mechanism is adopted in the file system to manage the usage amount of the storage space, and the Quota mechanism can prevent the storage space from being excessively used by a single user or a job in a multi-tenant environment.
In a file system, quota setting and management are usually implemented based on file directories, that is, a quota is set independently for each file directory, and the data volume of each file directory is limited by the respective quota.
Disclosure of Invention
The invention provides a data storage control method, a data storage control device and a storage medium.
According to a first aspect of the embodiments of the present invention, there is provided a data storage control method, including:
acquiring the total storage quota and the total usage amount of a shared storage space corresponding to a plurality of file directories;
and controlling the storage operation of the file directories based on the total storage quota amount and the total usage amount.
In one embodiment, the controlling the storage operation of the plurality of file directories based on the total amount of the storage quota and the total amount of the usage includes:
determining a write data amount for a write operation to any of the plurality of file directories;
when the write data amount is less than or equal to a remaining total amount, allowing the write operation to be executed, wherein the remaining total amount is: a difference between the total amount of storage quota and the total amount of usage;
when the write data amount is greater than the remaining total amount, inhibiting execution of the write operation.
In one embodiment, the method further comprises:
and updating the total usage amount according to the storage change value of any one of the file directories.
In an embodiment, the obtaining of the total storage quota and the total usage amount of the shared storage space corresponding to the plurality of file directories includes:
and acquiring the total storage quota and the total usage amount recorded in the index node of the first file directory in the plurality of file directories.
In an embodiment, the obtaining of the total storage quota and the total usage amount of the shared storage space corresponding to the plurality of file directories includes:
acquiring a first identifier recorded in an index node of a second file directory in a plurality of file directories, wherein the first identifier is used for indicating the index node of the first file directory;
the first file directory is different from the second file directory.
According to a second aspect of the embodiments of the present invention, there is provided a data storage control apparatus including: an acquisition module and a control module, wherein,
the acquisition module is used for acquiring the total storage quota and the total usage amount of the shared storage space corresponding to the file directories;
the control module is configured to control storage operations of the plurality of file directories based on the total storage quota amount and the total usage amount.
In one embodiment, the control module includes:
a determining submodule, configured to determine a write data amount of a write operation for any of the plurality of file directories;
a first control submodule, configured to allow execution of the write operation when the write data amount is less than or equal to a remaining total amount, where the remaining total amount is: a difference between the total amount of storage quota and the total amount of usage;
a second control submodule for inhibiting execution of the write operation when the amount of write data is greater than the remaining total amount.
In one embodiment, the apparatus further comprises:
and the updating module is used for updating the total usage amount according to the storage change value of any one of the file directories.
In one embodiment, the obtaining module includes:
and the first obtaining submodule is used for obtaining the total storage quota and the total usage amount recorded in the index node of the first file directory in the plurality of file directories.
In one embodiment, the apparatus further comprises:
a second obtaining sub-module, configured to obtain a first identifier recorded in an index node of a second file directory in the plurality of file directories, where the first identifier is used to indicate the index node of the first file directory;
the first file directory is different from the second file directory.
According to a third aspect of the embodiments of the present invention, there is provided a data storage control apparatus, including a processor, a memory, and an executable program stored on the memory and capable of being executed by the processor, wherein the processor executes the steps of the data storage control method according to the first aspect when executing the executable program.
According to a fourth aspect of embodiments of the present invention, there is provided a storage medium having stored thereon an executable program which, when executed by a processor, implements the steps of the data storage control method according to the first aspect.
The embodiment of the invention discloses a data storage control method, a data storage control device and a storage medium; acquiring the total storage quota and the total usage amount of a shared storage space corresponding to a plurality of file directories; and controlling the storage operation of the file directories based on the total storage quota amount and the total usage amount. Therefore, on one hand, one storage quota total amount is set for a plurality of file directories, and a storage quota does not need to be set for each file directory, so that the management and operation and maintenance workload can be reduced, and the management and operation and maintenance cost is reduced; on the other hand, the storage operations of the file directories are controlled based on the total storage quota and the total usage amount, the storage operations of the file directories are not controlled based on the storage quota and the usage amount of each file directory any more, the condition that the storage space of each file directory is not fully utilized due to unbalanced storage quota is reduced, the storage space can be fully utilized, and the resource utilization rate is 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 invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a diagram illustrating a file directory architecture in an inode in accordance with an illustrative embodiment;
FIG. 2 is a schematic diagram illustrating a single file directory quota based configuration, according to an example embodiment;
FIG. 3 is a flow diagram illustrating a data storage control method according to an exemplary embodiment;
FIG. 4 is a schematic flow diagram illustrating a file directory storage operation in accordance with an illustrative embodiment;
FIG. 5 is a schematic diagram illustrating a configuration for storing quota amounts based on file directories in accordance with an illustrative embodiment;
FIG. 6 is a block diagram illustrating a data storage control device in accordance with an exemplary embodiment;
FIG. 7 is a block diagram illustrating an apparatus for data storage control in accordance with an exemplary 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 following exemplary embodiments do not represent all implementations consistent with embodiments of the invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of embodiments of the invention, as detailed in the following claims.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used to describe various information in embodiments of the present invention, the information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of embodiments of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The execution subject that this disclosed embodiment relates to includes but not limited to: terminals and computers with large data processing capacity.
An application scenario of the embodiment of the present disclosure is that, in actual use of a big data System, data for a same type of service may be written into different File directories according to different service accounts, for example, in a Hadoop Distributed File System (HDFS), a service account a may write original data into a user/a File directory with the service account a, and simultaneously write a report generated by the original data through hive into a hive/a File directory with the hive account, although data under the user/a and/hive/a is for the same service, quotas need to be set for two File directories, namely the user/a and/hive/a. Therefore, on one hand, the management and operation and maintenance costs are higher due to the fact that quota needs to be set for a plurality of file directories; on the other hand, the resources are not effectively utilized, for example: the system can allocate 100G quota to the service a, initially set 50G quotas for each of the user/a and the hive/a, and after the actual operation is performed for a period of time, it is likely that the user/a uses 50G space, while the hive/a uses only 20G space, in this case, although the service a has 30G available space, the user cannot write data to the file directory of the user/a, and thus resource utilization is insufficient.
In a file system, each file directory entry or file entry may be represented by an inode (inode), and the parent file directory contains references to child file directories or files, and such references constitute a tree structure of the file system namespace as shown in FIG. 1.
As shown in fig. 2, a Quota (quote) of a file directory and a current usage amount may be recorded in an inode of the file directory. In the process of modifying the data in the file directory, the file system checks the quota, compares whether the data increment caused by modification plus the current usage amount is larger than the set quota, refuses the modification operation if the data increment caused by modification plus the current usage amount is larger than the set quota, and allows the modification operation if the data increment caused by modification plus the current usage amount is not larger than the set quota. And updating the current usage amount after the modification operation is completed.
FIG. 3 is a flow chart illustrating a data storage control method according to an exemplary embodiment, as shown in FIG. 3, the method comprising the following specific steps:
step 301: acquiring the total storage quota and the total usage amount of a shared storage space corresponding to a plurality of file directories;
step 302: and controlling the storage operation of the plurality of file directories based on the total storage quota and the total usage.
Here, the plurality of file directories may be file directories in a big data file system, for example: the plurality of file directories may be file directories in an HDFS file system. The file directories can belong to the same service, and also can belong to the same service account in the HDFS file system. The plurality of file directories may be file directories at the same file directory hierarchy.
The file system may set a shared storage space for multiple file directories. The total storage amount of the shared storage space is the total storage quota amount. Storage operations for multiple file directories may be performed on a basis that does not exceed a total amount of storage quotas. Here, the file system may no longer set a storage quota for each file directory.
The total amount of storage quota and the space currently occupied by the plurality of file directories in the shared storage space can be recorded by recording files, namely the total amount of usage. The record file may be provided in a data processing system in which the file system is located, or the like.
Here, the storage operations of the plurality of file directories may be controlled based on the total amount of storage quota and the total amount of usage; the storage operation of each file directory is not controlled based on the storage quota and usage of each file directory. For example, if a write operation is performed on one of a plurality of file directories, when the amount of data to be written is large, the shared storage space can be fully utilized for storage until the total storage amount reaches the total storage quota amount because there is no limit on the storage quota of the file directory.
Therefore, on one hand, one storage quota total amount is set for a plurality of file directories, and a storage quota does not need to be set for each file directory, so that the management and operation and maintenance workload can be reduced, and the management and operation and maintenance cost is reduced; on the other hand, the storage operations of the file directories are controlled based on the total storage quota and the total usage amount, the storage operations of the file directories are not controlled based on the storage quota and the usage amount of each file directory any more, the condition that the storage space of each file directory is not fully utilized due to unbalanced storage quota is reduced, the storage space can be fully utilized, and the resource utilization rate is improved.
In one embodiment, as shown in FIG. 4, step 302 may comprise:
step 3021: determining a write data amount of a write operation for any of a plurality of file directories;
step 3022: when the write data amount is less than or equal to the remaining total amount, allowing the execution of the write operation, wherein the remaining total amount is: a difference between the total amount of storage quota and the total amount of usage;
step 3023: when the amount of write data is larger than the remaining total amount, the execution of the write operation is prohibited.
For a write operation to any of the plurality of file directories, the amount of write data may first be determined. For example, when a file is copied from another file system, the data amount of the copied file may be acquired from the other file system.
After the amount of write data is obtained, the remaining total amount of shared storage space available for storage may be determined. The total amount of usage may be subtracted from the total amount of recorded storage quota to obtain a remaining total amount.
When the amount of write data is less than or equal to the remaining total amount, it may be determined that the remaining space of the shared storage space may store data written by the write operation, and at this time, the write operation may be allowed to be performed.
When the amount of write data is greater than the remaining total amount, it may be determined that there is sufficient space in the shared memory space to store the data written by the write operation, and at this time, the write operation may not be allowed to be performed.
When the write operation is not allowed to be performed, the file system may determine whether the shared storage space has a releasable storage space, e.g., whether the shared storage space has an invalid temporary file, etc. When there is releasable storage space, the file system may calculate the sum of the total releasable amount and the remaining total amount. If the sum of the total amount releasable and the remaining total amount is greater than the amount of write data, the storage space may be released and the write operation may continue.
When the write operation is not allowed to be executed, the file system can also evaluate the storage space of the whole file system, and if the available remaining space of the storage space of the whole file system is larger than a preset space threshold, the total amount of the storage quota can be applied to be increased, namely the shared storage space of a plurality of file directories is expanded. And when more storage quotas are applied, performing write operation. In this manner, overflow of data may be reduced.
In one embodiment, the data storage control method further comprises:
and updating the total use amount according to the change value stored in any file directory of the file directories.
The storage operation for the file directory may include: write operations, delete operations, etc. After the file directory is stored, the storage space occupied by the file directory in the shared storage space changes, and here, the total usage amount can be updated according to the change value of the occupied storage space, that is, the file directory storage change value.
For example, when a write operation is performed on the file directory, the total amount of usage before the write operation may be added to the amount of write data as the updated total amount of usage.
When a deletion operation is performed on a file directory, the total amount of use before the deletion operation minus the deletion data amount may be used as the updated total amount of use.
When the file directory is modified, the total usage amount may be updated according to a change in the data amount after the modification operation. If the data amount increases after the modification operation, the data increment is added to the total usage amount before the modification operation as the updated total usage amount. If the amount of data decreases after the modification operation, the total amount of use before the modification operation minus the decreased amount of data may be used as the updated total amount of use.
In one embodiment, step 301 may comprise: and acquiring the total amount of the storage quota and the total amount of the use recorded in the index node of the first file directory in the plurality of file directories.
Here, any file directory, that is, a first file directory, may be selected from the plurality of file directories, and an inode of the first file directory may be used to record the total storage quota amount and the total usage amount. Here, the selection of the first file directory may be a random selection, or may be a selection of a file directory having the highest access frequency, a file directory having the largest data amount among a plurality of file directories, or the like.
When the storage operation is performed on any one of the file directories, the file system acquires the total storage quota and the total usage amount from the index node of the first file directory, adds the total usage amount recorded by the index node of the first file directory to the write data amount caused by the storage operation, compares the sum with the total storage quota amount, allows the storage operation if the sum is smaller than the total storage quota amount, and rejects the storage operation if the sum is not smaller than the total storage quota amount.
If a store operation is allowed, the total amount of usage may be updated after the store operation is completed.
On one hand, the existing index nodes of the file directory are adopted for recording, new recording files are not added, the change of a file system is reduced, the workload of management and operation and maintenance can be reduced, and the cost of management and operation and maintenance is further reduced; on the other hand, the total storage quota amount and the total use amount are recorded by the index nodes for recording the storage quota of each file directory, so that iterative update of the file system is facilitated, and the workload of iterative update is reduced.
In one embodiment, step 301 may comprise: acquiring a first identifier recorded in an index node of a second file directory in a plurality of file directories, wherein the first identifier is used for indicating the index node of the first file directory; the first file directory is different from the second file directory.
Here, the second file directory may be any one of the plurality of file directories other than the first file directory.
When the second file directory is subjected to storage operation, the file system reads the index node of the second file directory and determines quota setting of the second file directory, wherein the index node of the second file directory does not set the storage quota any more. The file system can find the index node of the first file directory through the first identification recorded in the index node at the head of the second file directory, acquire the total storage quota and the total usage amount from the index node of the first file directory, add the write data volume of the storage operation performed on the second file directory to the total usage amount recorded by the index node of the first file directory, compare the sum with the total storage quota, allow the storage operation if the sum is smaller than the total storage quota, otherwise refuse the storage operation on the second file directory. The first file directory may be referred to as a master file directory, and the second file directory may be referred to as a slave file directory.
If a store operation is allowed, the total amount of usage may be updated after the store operation is completed.
One specific example is provided below in connection with any of the embodiments described above:
as shown in fig. 5, in an HDFS file system, a plurality of file directories include: user file directory, Hive file directory, etc. The file system may select one file directory, i.e., a user file directory, as a main quota file directory, and an index node (inode) of the user file directory records a total amount of storage quotas and a total amount of usage for a plurality of file directories. In fig. 5, the total storage Quota is expressed by a Quota (quote) and the total Usage is expressed by a Usage (Usage). The index node of other file directories, such as the Hive file directory, records the index node number of the user file directory. In fig. 5, the index node number of the user file directory is represented by a Quota index node (quote Inode).
When the Hive file directory is stored, the file system finds the index node of the user file directory through the index node number of the user file directory recorded in the index node of the Hive file directory, adds the write-in data volume generated by the storage operation and the total usage volume, compares the sum with the total storage quota volume, allows the storage operation if the sum is smaller than the total storage quota volume, and refuses the storage operation if the sum is not smaller than the total storage quota volume. And updating the total usage amount after the storage operation is completed.
Fig. 6 is a schematic structural diagram of a data storage control apparatus 100 according to an embodiment of the present invention; as shown in fig. 6, the apparatus 100 includes: an acquisition module 110 and a control module 120, wherein,
an obtaining module 110, configured to obtain a total amount of storage quotas and a total amount of usage of a shared storage space corresponding to a plurality of file directories;
and a control module 120, configured to control storage operations of the multiple file directories based on the total storage quota and the total usage.
In one embodiment, the control module 120 includes:
a determining submodule 121 configured to determine a write data amount of a write operation for any of the plurality of file directories;
a first control sub-module 122, configured to allow the execution of the write operation when the amount of write data is less than or equal to a remaining total amount: a difference between the total amount of storage quota and the total amount of usage;
a second control sub-module 123 for inhibiting the execution of the write operation when the amount of write data is greater than the remaining total amount.
In one embodiment, the apparatus 100 further comprises:
the updating module 130 is configured to update the total usage amount according to a change value stored in any one of the plurality of file directories.
In one embodiment, the obtaining module 110 includes:
the first obtaining sub-module 111 is configured to obtain a total storage quota and a total usage amount recorded in an inode of a first file directory in the multiple file directories.
In one embodiment, the apparatus 100 further comprises:
a second obtaining sub-module 112, configured to obtain a first identifier recorded in an inode of a second file directory in the multiple file directories, where the first identifier is used to indicate the inode of the first file directory;
the first file directory is different from the second file directory.
In an exemplary embodiment, the obtaining module 110, the control module 120, the updating module 130, and the like may be implemented by one or more Central Processing Units (CPUs), Graphics Processing Units (GPUs), Baseband Processors (BPs), Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors (GPUs), controllers, Micro Controllers (MCUs), microprocessors (microprocessors), or other electronic elements, for performing the foregoing methods.
FIG. 7 is a block diagram illustrating an apparatus 3000 for data storage control in accordance with an exemplary embodiment. For example, the apparatus 3000 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, the apparatus 3000 may include one or more of the following components: processing component 3002, memory 3004, power component 3006, multimedia component 3008, audio component 3010, input/output (I/O) interface 3012, sensor component 3014, and communications component 3016.
The processing component 3002 generally controls the overall operation of the device 3000, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 3002 may include one or more processors 3020 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 3002 may include one or more modules that facilitate interaction between the processing component 3002 and other components. For example, the processing component 3002 may include a multimedia module to facilitate interaction between the multimedia component 3008 and the processing component 3002.
The memory 3004 is configured to store various types of data to support operations at the device 3000. Examples of such data include instructions for any application or method operating on device 3000, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 3004 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 supply component 3006 provides power to the various components of the device 3000. The power components 3006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 3000.
The multimedia component 3008 includes a screen that provides an output interface between the device 3000 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, multimedia component 3008 includes a front facing camera and/or a rear facing camera. The front-facing camera and/or the rear-facing camera may receive external multimedia data when the device 3000 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 3010 is configured to output and/or input an audio signal. For example, the audio component 3010 may include a Microphone (MIC) configured to receive external audio signals when the apparatus 3000 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 3004 or transmitted via the communication component 3016. In some embodiments, the audio component 3010 further includes a speaker for outputting audio signals.
I/O interface 3012 provides an interface between processing component 3002 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 component 3014 includes one or more sensors for providing status assessment of various aspects to the device 3000. For example, the sensor component 3014 can detect the open/closed status of the device 3000, the relative positioning of components, such as a display and keypad of the apparatus 3000, the sensor component 3014 can also detect a change in the position of the apparatus 3000 or a component of the apparatus 3000, the presence or absence of user contact with the apparatus 3000, orientation or acceleration/deceleration of the apparatus 3000, and a change in the temperature of the apparatus 3000. The sensor assembly 3014 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 3014 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 3014 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 3016 is configured to facilitate wired or wireless communication between the apparatus 3000 and other devices. Device 3000 may access a wireless network based on a communication standard, such as Wi-Fi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 3016 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 3016 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 3000 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, 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 3004 comprising instructions, executable by the processor 3020 of the apparatus 3000 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 invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the embodiments of the invention following, in general, the principles of the embodiments of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the embodiments of the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of embodiments of the invention being indicated by the following claims.
It is to be understood that the embodiments of the present invention are 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 embodiments of the invention is limited only by the appended claims.
Claims (12)
1. A data storage control method, comprising:
acquiring the total storage quota and the total usage amount of a shared storage space corresponding to a plurality of file directories;
and controlling the storage operation of the file directories based on the total storage quota amount and the total usage amount.
2. The method of claim 1, wherein the controlling storage operations of the plurality of file directories based on the total amount of storage quotas and the total amount of usage comprises:
determining a write data amount for a write operation to any of the plurality of file directories;
when the write data amount is less than or equal to a remaining total amount, allowing the write operation to be executed, wherein the remaining total amount is: a difference between the total amount of storage quota and the total amount of usage;
when the write data amount is greater than the remaining total amount, inhibiting execution of the write operation.
3. The method of claim 1, further comprising:
and updating the total usage amount according to the storage change value of any one of the file directories.
4. The method according to any one of claims 1 to 3, wherein the obtaining of the total amount of storage quotas and the total amount of usage of the shared storage space corresponding to the plurality of file directories comprises:
and acquiring the total storage quota and the total usage amount recorded in the index node of the first file directory in the plurality of file directories.
5. The method according to claim 4, wherein the obtaining of the total amount of storage quota and the total amount of usage of the shared storage space corresponding to the plurality of file directories comprises:
acquiring a first identifier recorded in an index node of a second file directory in a plurality of file directories, wherein the first identifier is used for indicating the index node of the first file directory;
the first file directory is different from the second file directory.
6. A data storage control apparatus, comprising: an acquisition module and a control module, wherein,
the acquisition module is used for acquiring the total storage quota and the total usage amount of the shared storage space corresponding to the file directories;
the control module is configured to control storage operations of the plurality of file directories based on the total storage quota amount and the total usage amount.
7. The apparatus of claim 6, wherein the control module comprises:
a determining submodule, configured to determine a write data amount of a write operation for any of the plurality of file directories;
a first control submodule, configured to allow execution of the write operation when the write data amount is less than or equal to a remaining total amount, where the remaining total amount is: a difference between the total amount of storage quota and the total amount of usage;
a second control submodule for inhibiting execution of the write operation when the amount of write data is greater than the remaining total amount.
8. The apparatus of claim 6, further comprising:
and the updating module is used for updating the total usage amount according to the storage change value of any one of the file directories.
9. The apparatus according to any one of claims 6 to 8, wherein the obtaining module comprises:
and the first obtaining submodule is used for obtaining the total storage quota and the total usage amount recorded in the index node of the first file directory in the plurality of file directories.
10. The apparatus of claim 9, wherein the obtaining module comprises: a second obtaining sub-module, configured to obtain a first identifier recorded in an index node of a second file directory in the plurality of file directories, where the first identifier is used to indicate the index node of the first file directory;
the first file directory is different from the second file directory.
11. A data storage control apparatus comprising a processor, a memory and an executable program stored on the memory and capable of being run by the processor, wherein the processor, when running the executable program, performs the steps of the data storage control method according to any one of claims 1 to 5.
12. A storage medium on which an executable program is stored, the executable program when executed by a processor implementing the steps of the data storage control method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010019133.9A CN111258952B (en) | 2020-01-08 | 2020-01-08 | Data storage control method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010019133.9A CN111258952B (en) | 2020-01-08 | 2020-01-08 | Data storage control method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111258952A true CN111258952A (en) | 2020-06-09 |
CN111258952B CN111258952B (en) | 2023-10-13 |
Family
ID=70953912
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010019133.9A Active CN111258952B (en) | 2020-01-08 | 2020-01-08 | Data storage control method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111258952B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113449876A (en) * | 2021-06-11 | 2021-09-28 | 北京四维图新科技股份有限公司 | Processing method, system and storage medium for deep learning training data |
CN113626404A (en) * | 2021-06-30 | 2021-11-09 | 济南浪潮数据技术有限公司 | Method, device and medium for controlling nested directory quota of distributed file system |
CN114115726A (en) * | 2021-10-25 | 2022-03-01 | 浙江大华技术股份有限公司 | File storage method, terminal device and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110040810A1 (en) * | 2009-08-12 | 2011-02-17 | International Business Machines Corporation | Scalable file management for a shared file system |
CN106383856A (en) * | 2016-08-31 | 2017-02-08 | 北京小米移动软件有限公司 | Method and device for managing file system quota |
CN108073723A (en) * | 2018-01-03 | 2018-05-25 | 郑州云海信息技术有限公司 | A kind of file in distributed type assemblies storage is from compressing method and equipment |
US20180165321A1 (en) * | 2016-12-09 | 2018-06-14 | Qumulo, Inc. | Managing storage quotas in a shared storage system |
-
2020
- 2020-01-08 CN CN202010019133.9A patent/CN111258952B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110040810A1 (en) * | 2009-08-12 | 2011-02-17 | International Business Machines Corporation | Scalable file management for a shared file system |
CN106383856A (en) * | 2016-08-31 | 2017-02-08 | 北京小米移动软件有限公司 | Method and device for managing file system quota |
US20180165321A1 (en) * | 2016-12-09 | 2018-06-14 | Qumulo, Inc. | Managing storage quotas in a shared storage system |
CN108073723A (en) * | 2018-01-03 | 2018-05-25 | 郑州云海信息技术有限公司 | A kind of file in distributed type assemblies storage is from compressing method and equipment |
Non-Patent Citations (1)
Title |
---|
谭子军;何连跃;: "分布式存储系统中用户磁盘空间分配策略" * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113449876A (en) * | 2021-06-11 | 2021-09-28 | 北京四维图新科技股份有限公司 | Processing method, system and storage medium for deep learning training data |
CN113626404A (en) * | 2021-06-30 | 2021-11-09 | 济南浪潮数据技术有限公司 | Method, device and medium for controlling nested directory quota of distributed file system |
CN113626404B (en) * | 2021-06-30 | 2024-02-13 | 济南浪潮数据技术有限公司 | Control method, device and medium for nested directory quota of distributed file system |
CN114115726A (en) * | 2021-10-25 | 2022-03-01 | 浙江大华技术股份有限公司 | File storage method, terminal device and computer readable storage medium |
CN114115726B (en) * | 2021-10-25 | 2024-04-19 | 浙江大华技术股份有限公司 | File storage method, terminal device and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111258952B (en) | 2023-10-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105955765B (en) | Application preloading method and device | |
CN105338409B (en) | Network video preloading method and device | |
US20160381629A1 (en) | Virtual sim card for accessing operator network | |
CN107291626B (en) | Data storage method and device | |
CN107370772B (en) | account login method and device and computer readable storage medium | |
CN111258952B (en) | Data storage control method, device and storage medium | |
CN106534562B (en) | File deletion method and device | |
CN107040591B (en) | Method and device for controlling client | |
RU2645282C2 (en) | Method and device for calling via cloud-cards | |
CN106339260B (en) | Task allocation method and device based on Jenkins platform | |
CN109634762B (en) | Data recovery method and device, electronic equipment and storage medium | |
CN114428589A (en) | Data processing method and device, electronic equipment and storage medium | |
CN112883073A (en) | Data screening method, device, equipment, readable storage medium and product | |
CN107220008B (en) | Storage space reservation method and device | |
CN107894909B (en) | Method, device and storage medium for limiting Activity starting | |
CN106528197B (en) | Shooting method and device | |
CN115016944A (en) | Process access method and device and electronic equipment | |
CN114528037A (en) | Application starting method and device, electronic equipment and storage medium | |
CN103927224B (en) | Bead performs method and apparatus | |
CN113360708A (en) | Video playing method and device, electronic equipment and storage medium | |
CN110990357A (en) | Data processing method, device and system, electronic equipment and storage medium | |
CN110716985B (en) | Node information processing method, device and medium | |
CN107665125B (en) | Method and device for executing operation instruction | |
CN111241097A (en) | Method of processing object, apparatus for processing object, and storage medium | |
CN108205452B (en) | Software execution control method and device |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 100085 unit C, building C, lin66, Zhufang Road, Qinghe, Haidian District, Beijing Applicant after: Beijing Xiaomi pinecone Electronic Co.,Ltd. Address before: 100085 unit C, building C, lin66, Zhufang Road, Qinghe, Haidian District, Beijing Applicant before: BEIJING PINECONE ELECTRONICS Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant |