CN116578241A - Storage volume creation method, system, storage medium and electronic equipment - Google Patents

Storage volume creation method, system, storage medium and electronic equipment Download PDF

Info

Publication number
CN116578241A
CN116578241A CN202310576176.0A CN202310576176A CN116578241A CN 116578241 A CN116578241 A CN 116578241A CN 202310576176 A CN202310576176 A CN 202310576176A CN 116578241 A CN116578241 A CN 116578241A
Authority
CN
China
Prior art keywords
state
storage
volume
storage unit
filling
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.)
Pending
Application number
CN202310576176.0A
Other languages
Chinese (zh)
Inventor
王跃宗
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202310576176.0A priority Critical patent/CN116578241A/en
Publication of CN116578241A publication Critical patent/CN116578241A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0665Virtualisation aspects at area level, e.g. provisioning of virtual or logical volumes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a method for creating a storage volume, which comprises the following steps: receiving a creation instruction; creating a storage volume according to the creation instruction, and configuring the state marks of all storage units in the storage volume as unused states; and starting to fill the storage unit in the unused state, and modifying the state mark of the corresponding storage unit into the filled state after filling. The method and the device can ensure that the volume operation of the user and the data filling operation of the thick reserve volume are not interfered with each other and synchronously performed, the user can use the volume without waiting for the completion of filling, the instant use of the thick reserve volume is realized, and the efficiency of creating the thick reserve volume and the use experience of the user are greatly improved. The application also provides a storage volume creation system, a storage medium and electronic equipment, which have the beneficial effects.

Description

Storage volume creation method, system, storage medium and electronic equipment
Technical Field
The present application relates to the field of data storage, and in particular, to a method and system for creating a storage volume, a storage medium, and an electronic device.
Background
Currently, in distributed storage systems, block storage devices (Rados Block Device, RBD) are used in a large number of applications. Wherein, the volume is taken as a basic unit of the block storage device and bears the main function realization and service output. Volumes are mainly divided into a thin volume, which can be quickly created and maximally utilize the storage space of the device, and a thick preparation volume, which is slightly superior in terms of read-write performance.
The creation process of the thick provisioning volume can be divided into two steps: creating volumes and filling volumes. The process of creating a volume is consistent with the process of creating a simplified volume, so that quick creation can be realized, but the process of filling a volume needs to perform write data filling operation on a quota space, and a great deal of time is consumed. Moreover, the thick provisioning volume cannot be provided for users in the process, otherwise a series of problems such as coverage of user data, inconsistent data and the like can be caused. Therefore, the creation efficiency and the user experience of the thick provisioning volume are greatly reduced, and most of the current scenes discard the thick provisioning volume matching application. Therefore, how to optimize the creation and use flow of thick provisioning volumes is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a method, a system, a storage medium and electronic equipment for creating a storage volume, which ensure that the volume operation and the data filling operation of a user are not interfered with each other by adding a state mark, can be synchronously performed, and improve the creation efficiency of the storage volume, particularly a thick preparation volume.
In order to solve the above technical problems, the present application provides a method for creating a storage volume, including:
receiving a creation instruction;
creating a storage volume according to the creation instruction, and configuring the state marks of all storage units in the storage volume as unused states;
and starting to fill the storage unit in the unused state, and modifying the state mark of the corresponding storage unit into the filled state after filling.
Wherein, still include:
when a user executes writing operation on the storage volume, the state mark of the storage unit corresponding to the writing operation is modified to be in a used state.
Wherein after the storage volume is created according to the creation instruction, the method further comprises:
determining the number of the storage units according to the volume size of the storage volume and the unit size of the storage units;
creating a state array according to the number; the state array is used to record the state flags of all storage units in the storage volume.
Wherein configuring the state flags of all storage units in the storage volume as unused state comprises:
and configuring the state marks of all storage units in the storage volume corresponding state array to be in an unused state.
Starting to fill the storage unit in the unused state, and modifying the state mark of the corresponding storage unit to the filled state after filling comprises the following steps:
starting a background filling thread;
the background filling thread is used for judging the state mark of the storage unit in the storage volume;
if the state of the storage unit is marked as an unused state, filling the storage unit;
and if the state mark of the storage unit is not the unused state, skipping the corresponding storage unit and executing the state mark judgment of the next storage unit.
If the state flag of the memory cell is not the unused state, skipping the corresponding memory cell and performing the state flag determination on the next memory cell includes:
and if the state mark of the storage unit is the written state, confirming that the target storage unit in the written state is in data writing or the data writing is completed, disregarding the target storage unit, and acquiring the state mark of the next storage unit.
Wherein filling the memory cells in the unused state comprises:
and performing write data filling operation on the memory cells in the unused state.
The application also provides a system for creating the storage volume, which comprises:
the instruction receiving module is used for receiving the creation instruction;
the state mark configuration module is used for creating a storage volume according to the creation instruction and configuring the state marks of all storage units in the storage volume to be unused;
and the filling module is used for starting to fill the storage unit in the unused state, and modifying the state mark of the corresponding storage unit into a filled state after filling.
Wherein, still include:
and the writing operation marking module is used for modifying the state mark of the storage unit corresponding to the writing operation into a used state when a user executes the writing operation on the storage volume.
Wherein, still include:
an array creation module for determining the number of the storage units according to the volume size of the storage volume and the unit size of the storage units; creating a state array according to the number; the state array is used to record the state flags of all storage units in the storage volume.
Wherein the status flag configuration module comprises:
and the configuration unit is used for configuring the state marks of all the storage units in the storage volume corresponding state array to be in an unused state.
Wherein, the filling module includes:
a filling thread unit for starting a background filling thread; the background filling thread is used for judging the state mark of the storage unit in the storage volume; if the state of the storage unit is marked as an unused state, filling the storage unit; and if the state mark of the storage unit is not the unused state, skipping the corresponding storage unit and executing the state mark judgment of the next storage unit.
Wherein the filling thread unit comprises:
and the filling skip subunit is used for confirming that the target storage unit in the written state is in data writing or the data writing is completed if the state mark of the storage unit is in the written state, disregarding the target storage unit and acquiring the state mark of the next storage unit.
Wherein, the filling module includes:
and the filling unit is used for performing write data filling operation on the memory cells in the unused state.
The application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the steps of the method as described above.
The application also provides an electronic device comprising a memory in which a computer program is stored and a processor which when calling the computer program in the memory implements the steps of the method as described above.
The application provides a method for creating a storage volume, which comprises the following steps: receiving a creation instruction; creating a storage volume according to the creation instruction, and configuring the state marks of all storage units in the storage volume as unused states; and starting to fill the storage unit in the unused state, and modifying the state mark of the corresponding storage unit into the filled state after filling.
When the storage volume is created, the state marks are added to all the storage units in the storage volume to mark the use state of the storage units, the storage units can be filled when the storage units are not used, and if the storage units are used, for example, a user can perform writing operation on the storage units, the filling of the storage units can be not performed any more. The method and the device ensure that the volume operation of the user and the data filling operation of the thick preparation volume are not interfered with each other and synchronously performed, the user can use the volume without waiting until the filling is completed, the instant use of the thick preparation volume is realized, and the efficiency of creating the thick preparation volume and the use experience of the user are greatly improved.
The application also provides a system for creating the storage volume, a storage medium and an electronic device, which have the beneficial effects and are not repeated here.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for creating a storage volume according to an embodiment of the present application;
FIG. 2 is a flowchart of another method for creating a storage volume according to an embodiment of the present application;
FIG. 3 is a timing diagram illustrating a storage volume creation process according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a system for creating a storage volume according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The core of the application is to provide a method for creating the storage volume, which can be mainly applied to the thick preparation volume in the storage volume, ensures that the volume operation of a user and the data filling operation of the thick preparation volume are not interfered with each other and are synchronously carried out through the state description of the newly added storage unit, and the user can not use the volume until the filling is completed, thereby realizing the instant use of the thick preparation volume and greatly improving the efficiency of creating the thick preparation volume and the experience of the user.
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Currently, the creation process of thick reserve volumes can be divided into two steps: creating volumes and filling volumes. The process of creating a volume is consistent with the process of creating a simplified volume, so that quick creation can be realized, but the process of filling a volume needs to perform write data filling operation on a quota space, and a great deal of time is consumed. Moreover, the thick provisioning volume cannot be provided for users in the process, otherwise a series of problems such as coverage of user data, inconsistent data and the like can be caused. Therefore, the creation efficiency and the user experience of the thick provisioning volume are greatly reduced, and most of the current scenes discard the thick provisioning volume matching application.
In order to solve the above-mentioned technical drawbacks, please refer to fig. 1, fig. 1 is a flowchart of a method for creating a storage volume according to an embodiment of the present application, the method includes:
s101: receiving a creation instruction;
s102: creating a storage volume according to the creation instruction, and configuring the state marks of all storage units in the storage volume as unused states;
s103: filling the memory cells in the unused state, and modifying the state marks of the corresponding memory cells to the filled state after filling.
There is no limitation on how the creation instructions are received, nor on the specific instruction form and instruction content of the creation instructions, it is readily understood that the creation instructions are used to create a storage volume, i.e., any instructions that can be used to create a storage volume can be considered a creation instruction in embodiments of the present application. The creation instruction may be actively acquired or passively received, for example, the creation instruction required in this embodiment may be obtained according to a real-time instruction of a user or a storage volume configuration instruction preset in the storage system.
After receiving the creation instruction, the storage volume may be created according to the creation instruction. The creation information that may be included in the creation instruction is not described here with emphasis, such as the creation position of the storage volume, etc., but with emphasis on the creation process of the storage volume. Specifically, for any newly built storage volume, a corresponding status flag is set. The status flag is used to record and feedback the application status of each storage unit in the storage volume. Of course, the type of status flag is not limited herein, and can be classified into an unused state, a written state, and a filled state, generally according to an application state. Of course, those skilled in the art may set other types of flags for the status flags based on the present embodiment, which is not limited herein.
After the storage volume is created, the state of all storage units in the storage volume needs to be configured first to be marked as an unused state, i.e. the initial state of the newly created storage volume is the unused state.
Thereafter, a filling operation may be performed, specifically filling the memory cells in an unused state, while marking the state of the filled memory cells as a filled state. It should be noted that this procedure only fills the memory cells that are in the unused state, and does not fill the memory cells that are already in the used state.
The usage state generally refers to an occupied state, and when a user performs a write operation on the storage volume, for example, a state flag of a storage unit corresponding to the write operation is changed to a used state. Of course, the user performs other operations on the created storage volume that occupy the storage unit, such as updating data after writing, etc., and the state flag of the storage unit is still in the used state. This is to distinguish the memory cells from other memory cells that are in an unused state. Of course, in practical application, different state marks may be set for the memory cells in different use states, which is not limited herein by way of example.
After the filling operation is performed, it can be ensured that enough memory units can be used when the memory units are subsequently called, i.e. the memory units in the used state cannot be called. Simply by performing a fill operation, it is ensured that the corresponding memory location is not preempted by other tasks or operations.
In a specific filling process, a background filling thread can be started, and the background filling thread is used for judging the state mark of a storage unit in the storage volume;
if the state of the storage unit is marked as an unused state, filling the storage unit;
and if the state mark of the storage unit is not the unused state, skipping the corresponding storage unit and executing the state mark judgment of the next storage unit.
I.e. during the filling process, reference is also made to the state flags of the memory cells, avoiding that an invalid filling operation is performed for memory cells that are not in an unused state. If the state mark of the storage unit is the written state, confirming that the target storage unit in the written state is in data writing or the data writing is completed, disregarding the target storage unit, and acquiring the state mark of the next storage unit. There is no limitation on how the padding operation is performed, and write data padding may be performed on a memory cell in an unused state to ensure that the memory cell is not occupied by other operations.
In the storage volume creation method provided by the embodiment of the application, when the storage volume is created, the state marks are added to all the storage units in the storage volume to mark the use state of the storage units, and when the storage units are not used, the storage units can be filled, and if the storage units are used, for example, a user can execute writing operation on the storage units, the filling of the storage units can be no longer executed. The method and the device ensure that the volume operation of the user and the data filling operation of the thick preparation volume are not interfered with each other and synchronously performed, the user can use the volume without waiting until the filling is completed, the instant use of the thick preparation volume is realized, and the efficiency of creating the thick preparation volume and the use experience of the user are greatly improved.
In a possible implementation manner, after the storage volume is created according to the creation instruction, the method may include the following steps:
determining the number of the storage units according to the volume size of the storage volume and the unit size of the storage units;
creating a state array according to the number; the state array is used to record the state flags of all storage units in the storage volume.
At this time, the corresponding complete execution process may refer to fig. 2, and fig. 2 is a flowchart of another method for creating a storage volume according to an embodiment of the present application, which specifically includes the following steps:
s201: receiving a creation instruction;
s202: creating a storage volume according to the creation instruction, determining the number of the storage units according to the volume size of the storage volume and the unit size of the storage units, and creating a state array according to the number;
s203: configuring state marks of all storage units in the storage volume corresponding state array to be unused states;
s204: and starting to fill the storage unit in the unused state, and modifying the state mark of the corresponding storage unit into the filled state after filling.
In this embodiment, the state marks of the storage units in the storage volume are recorded by using the state array. Specifically, after the storage volume is created, the number of storage units included in the storage volume is determined according to the volume size of the created storage volume and the unit size of each storage unit, so as to create a state array according to the number of storage units. It will be readily appreciated that the state array may be used to store a number of state markers that is not less than the number of storage units in the storage volume.
The specific structure of the state array is not limited herein, and may adopt data structures such as an array, a linked list, and the like.
In other embodiments, the state array may be created prior to creating the storage volume, requiring that the number of data units in the state array be as large as possible to meet the storage unit requirements in the storage volume.
After the state array is created, all the state marks of the storage units are unused state when the storage volume is just created. The state flags of all the corresponding storage units in the state array may be marked as unused, i.e., the state flags of all the storage units in the state array corresponding to the configuration storage volume are all unused. Meanwhile, in a specific application process, corresponding state values may be set for the "unused state", "used state", and "filled state", for example, "0", "1", and "2" may be used to represent the above three states, respectively, so that the corresponding state values are filled in the state array according to the actual state of the memory cell.
For example, if a memory cell in an unused state is filled, the state flag of the memory cell in the state array may be modified from the unused state to the filled state.
If a user writing instruction is received, writing is carried out on a certain storage unit, and the storage unit is indicated to be occupied by a certain operation of a user, and then the state mark of the storage unit in the state array is changed from an unused state to a used state.
When the storage volume is filled later, the storage volume is filled according to the state marks in the state array, namely, only the storage units with the states marked as unused states are filled, and the storage units in the used states are not filled any more.
Referring to fig. 3, fig. 3 is a timing chart of a storage volume creation process provided by an embodiment of the present application, and fig. 3 illustrates an example of a thick preparation volume, a user may issue a creation instruction to create the thick preparation volume, and an RBD thread, that is, a thread in a block storage device, creates the thick preparation volume according to the creation instruction, creates a background filling thread after the creation of the thick preparation volume is completed, and then feeds back information of success of creating the background filling thread to the RBD thread, where the RBD thread may feed back a creation success message of the background filling thread and the thick preparation volume to a front end where the user is located.
If the user performs read-write operation on the thick standby roll, the read-write operation is still realized through the RBD thread, but at the same time, the background filling thread can also perform filling operation on the thick standby roll, and the two operations are not mutually influenced. Except that the background fill thread only fills memory cells that are in an unused state and no longer performs fill operations for memory cells that have been used by the user. The read-write operation of the user can be normally performed.
As can be seen from the foregoing, the present embodiment focuses on adding a state description of the memory cell, and recording the usage state of the memory cell in the form of a state flag. The main distinction can be made between an unused state, a filled state and a used state. After the storage volume is built, setting the states of all storage units to be unused states, changing the corresponding storage units from the unused states to filled states after filling, changing the storage units corresponding to the writing operation from the unused states to the used states if the writing operation is received, and distinguishing the use states of the storage units by using different state marks.
The following is a specific application procedure of the present application:
1) State description of newly added block memory cells: unused, filled and written. The unused state is used for marking that the block storage unit is not filled and writing data, the filled state is used for marking that the block storage unit is being filled or is filled, and the written state is used for marking that the block storage unit is writing data or has been writing data by a user;
(2) After creating the volume, all storage units are set to "unused state". First, the number N of block storage units of a volume is calculated from the volume size and the individual block storage unit size. Then, a block storage unit state description array Status (N) is created for the volume to describe each block storage unit state and set the initial state value to "unused";
(3) And starting a background task of the filling volume to finish creation. The specific flow of the fill volume background task is to determine the block storage unit Status (i).
If the state is the unused state, setting the state of the memory cell to be the filled state and starting filling operation;
if the state is the written state, the memory cell is indicated to be used by the user, and the judgment of the next memory cell is directly skipped.
(4) The user adds a state description when writing to the volume. When a user performs a write operation on a block memory cell, the state of the memory cell is first set to "written state", and then a data write operation is started on the block memory cell.
In this embodiment, the storage volume may be used by a user when created, and the volume operation of the user and the data filling operation of the thick provisioning volume do not interfere with each other and are performed synchronously. The user does not need to wait for a long filling process, the user experience is greatly improved, and the method can be integrated into the existing block storage system and has higher compatibility.
The following describes a system for creating a storage volume according to an embodiment of the present application, where the system for creating a storage volume described below and the method for creating a storage volume described above may be referred to correspondingly to each other.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a storage volume creation system according to an embodiment of the present application, and the present application further provides a storage volume creation system, including:
the instruction receiving module is used for receiving the creation instruction;
the state mark configuration module is used for creating a storage volume according to the creation instruction and configuring the state marks of all storage units in the storage volume to be unused;
and the filling module is used for starting to fill the storage unit in the unused state, and modifying the state mark of the corresponding storage unit into a filled state after filling.
The storage volume creation system provided by the application firstly utilizes the instruction receiving module to receive the creation instruction, and then utilizes the state mark configuration module to create the storage volume. When creating a storage volume, a status flag is added to all storage units in the storage volume to mark the use status of the storage unit, when the storage unit is not used, the storage unit can be filled, and if the storage unit is used, for example, a user has performed a write operation on the storage unit, the filling of the storage unit can no longer be performed. The method and the device ensure that the volume operation of the user and the data filling operation of the thick preparation volume are not interfered with each other and synchronously performed, the user can use the volume without waiting until the filling is completed, the instant use of the thick preparation volume is realized, and the efficiency of creating the thick preparation volume and the use experience of the user are greatly improved.
Based on the above embodiment, as a preferred embodiment, further comprising:
and the writing operation marking module is used for modifying the state mark of the storage unit corresponding to the writing operation into a used state when a user executes the writing operation on the storage volume.
In the embodiment, the writing operation marking module is used for modifying the state marking of the storage unit, so that the user can execute the reading and writing operation and the background filling operation without mutual influence and mutual interference.
Based on the above embodiment, as a preferred embodiment, further comprising:
an array creation module for determining the number of the storage units according to the volume size of the storage volume and the unit size of the storage units; creating a state array according to the number; the state array is used to record the state flags of all storage units in the storage volume.
Based on the above embodiments, as a preferred embodiment, the status flag configuration module includes:
and the configuration unit is used for configuring the state marks of all the storage units in the storage volume corresponding state array to be in an unused state.
Based on the above embodiments, as a preferred embodiment, the filling module includes:
a filling thread unit for starting a background filling thread; the background filling thread is used for judging the state mark of the storage unit in the storage volume; if the state of the storage unit is marked as an unused state, filling the storage unit; and if the state mark of the storage unit is not the unused state, skipping the corresponding storage unit and executing the state mark judgment of the next storage unit.
Based on the above embodiments, as a preferred embodiment, the filling thread unit includes:
and the filling skip subunit is used for confirming that the target storage unit in the written state is in data writing or the data writing is completed if the state mark of the storage unit is in the written state, disregarding the target storage unit and acquiring the state mark of the next storage unit.
Based on the above embodiments, as a preferred embodiment, the filling module includes:
and the filling unit is used for performing write data filling operation on the memory cells in the unused state.
The application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps described in the method for creating a storage volume according to the method embodiment described above.
It will be appreciated that the methods of the above embodiments, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored on a computer readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium for performing all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes. The present application provides a computer-readable storage medium, which when executed by a processor, implements the steps of the storage volume creation method. When creating a storage volume, a status flag is added to all storage units in the storage volume to mark the use status of the storage unit, when the storage unit is not used, the storage unit can be filled, and if the storage unit is used, for example, a user has performed a write operation on the storage unit, the filling of the storage unit can no longer be performed. The method and the device ensure that the volume operation of the user and the data filling operation of the thick preparation volume are not interfered with each other and synchronously performed, the user can use the volume without waiting until the filling is completed, the instant use of the thick preparation volume is realized, and the efficiency of creating the thick preparation volume and the use experience of the user are greatly improved.
The present application also provides an electronic device, referring to fig. 5, and as shown in fig. 5, a block diagram of an electronic device provided in an embodiment of the present application may include a processor 1410 and a memory 1420.
Processor 1410 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc., among others. The processor 1410 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 1410 may also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1410 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 1410 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 1420 may include one or more computer-readable storage media, which may be non-transitory. Memory 1420 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 1420 is used at least to store a computer program 1421, where the computer program, when loaded and executed by the processor 1410, can implement relevant steps in the method for creating a storage volume executed by the electronic device side as disclosed in any of the foregoing embodiments. In addition, the resources stored by memory 1420 may include an operating system 1422, data 1423, and the like, and the storage may be transient storage or permanent storage. The operating system 1422 may include Windows, linux, android, among other things.
In some embodiments, the electronic device may further include a display 1430, an input-output interface 1440, a communication interface 1450, a sensor 1460, a power supply 1470, and a communication bus 1480.
Of course, the structure of the electronic device shown in fig. 5 is not limited to the electronic device in the embodiment of the present application, and the electronic device may include more or fewer components than those shown in fig. 5 or may combine some components in practical applications.
The electronic equipment provided by the embodiment of the application comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the storage volume creation method when calling the computer program in the memory. When creating a storage volume, a status flag is added to all storage units in the storage volume to mark the use status of the storage unit, when the storage unit is not used, the storage unit can be filled, and if the storage unit is used, for example, a user has performed a write operation on the storage unit, the filling of the storage unit can no longer be performed. The method and the device ensure that the volume operation of the user and the data filling operation of the thick preparation volume are not interfered with each other and synchronously performed, the user can use the volume without waiting until the filling is completed, the instant use of the thick preparation volume is realized, and the efficiency of creating the thick preparation volume and the use experience of the user are greatly improved.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. The system provided by the embodiment is relatively simple to describe as it corresponds to the method provided by the embodiment, and the relevant points are referred to in the description of the method section.
The principles and embodiments of the present application have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present application and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the application can be made without departing from the principles of the application and these modifications and adaptations are intended to be within the scope of the application as defined in the following claims.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A method of creating a storage volume, comprising:
receiving a creation instruction;
creating a storage volume according to the creation instruction, and configuring the state marks of all storage units in the storage volume as unused states;
and starting to fill the storage unit in the unused state, and modifying the state mark of the corresponding storage unit into the filled state after filling.
2. The creation method according to claim 1, characterized by further comprising:
when a user executes writing operation on the storage volume, the state mark of the storage unit corresponding to the writing operation is modified to be in a used state.
3. The creation method according to claim 1, further comprising, after creating a storage volume according to the creation instruction:
determining the number of the storage units according to the volume size of the storage volume and the unit size of the storage units;
creating a state array according to the number; the state array is used to record the state flags of all storage units in the storage volume.
4. The creation method of claim 3, wherein configuring the status flags of all storage units in the storage volume as unused state comprises:
and configuring the state marks of all storage units in the storage volume corresponding state array to be in an unused state.
5. The creation method according to claim 1 or 2, wherein initiating filling of the memory cells in the unused state, modifying the state flags of the corresponding memory cells to the filled state after filling comprises:
starting a background filling thread;
the background filling thread is used for judging the state mark of the storage unit in the storage volume;
if the state of the storage unit is marked as an unused state, filling the storage unit;
and if the state mark of the storage unit is not the unused state, skipping the corresponding storage unit and executing the state mark judgment of the next storage unit.
6. The creating method as claimed in claim 5, wherein if the status flag of the memory cell is not the unused state, skipping the corresponding memory cell and performing the status flag judgment of the next memory cell comprises:
and if the state mark of the storage unit is the written state, confirming that the target storage unit in the written state is in data writing or the data writing is completed, disregarding the target storage unit, and acquiring the state mark of the next storage unit.
7. The creation method of claim 1, wherein filling the memory cells in the unused state comprises:
and performing write data filling operation on the memory cells in the unused state.
8. A system for creating a storage volume, comprising:
the instruction receiving module is used for receiving the creation instruction;
the state mark configuration module is used for creating a storage volume according to the creation instruction and configuring the state marks of all storage units in the storage volume to be unused;
and the filling module is used for starting to fill the storage unit in the unused state, and modifying the state mark of the corresponding storage unit into a filled state after filling.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of creating a storage volume according to any of claims 1-7.
10. An electronic device comprising a memory in which a computer program is stored and a processor which, when calling the computer program in the memory, implements the steps of the method of creating a storage volume according to any of claims 1-7.
CN202310576176.0A 2023-05-19 2023-05-19 Storage volume creation method, system, storage medium and electronic equipment Pending CN116578241A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310576176.0A CN116578241A (en) 2023-05-19 2023-05-19 Storage volume creation method, system, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310576176.0A CN116578241A (en) 2023-05-19 2023-05-19 Storage volume creation method, system, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116578241A true CN116578241A (en) 2023-08-11

Family

ID=87537346

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310576176.0A Pending CN116578241A (en) 2023-05-19 2023-05-19 Storage volume creation method, system, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116578241A (en)

Similar Documents

Publication Publication Date Title
CN110286896B (en) Visual editing method, device, equipment and storage medium
MX2014009068A (en) Electronic book file processing method, terminal, and electronic device.
CN110674052A (en) Memory management method, server and readable storage medium
CN114880259A (en) Data processing method, device, system, electronic equipment and storage medium
CN106095417B (en) A kind of prospect Application Program Interface refresh synchronization method and system
CN113918249B (en) Method and device for realizing background fuzzy control
CN115080016A (en) Extended function implementation method, device, equipment and medium based on UE editor
CN113342330A (en) Front-end engineering generation method and device
CN113282239A (en) Data migration method, memory and controller
CN106874010A (en) A kind of method of the quick paging loadings of ListView in android system
CN116578241A (en) Storage volume creation method, system, storage medium and electronic equipment
CN109408405B (en) Memory page exchange method, device, terminal and storage medium
CN114995770B (en) Data processing method, device, equipment, system and readable storage medium
CN110045929B (en) Mounting point management method and related device
CN113134234B (en) Information display method, device, terminal and storage medium
CN115712394A (en) Data reading and writing method and device, computer equipment and readable storage medium
CN114625997A (en) Page rendering method and device, electronic equipment and computer readable medium
CN115169294A (en) Data conversion method, device and medium
CN111562983B (en) Memory optimization method and device, electronic equipment and storage medium
CN103294606A (en) Methods and devices for allocating memories and detecting overflow thereof
CN106095338A (en) The erasable implementation method of a kind of memory chip and realize system
CN111176571A (en) Method, device, equipment and medium for managing local object
CN108959499A (en) Distributed file system performance analysis method, device, equipment and storage medium
CN117093345B (en) Task linked list execution method and device, terminal equipment and storage medium
CN107862095B (en) Data processing 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