CN114625321A - Data writing method and device - Google Patents

Data writing method and device Download PDF

Info

Publication number
CN114625321A
CN114625321A CN202210301689.6A CN202210301689A CN114625321A CN 114625321 A CN114625321 A CN 114625321A CN 202210301689 A CN202210301689 A CN 202210301689A CN 114625321 A CN114625321 A CN 114625321A
Authority
CN
China
Prior art keywords
data
partition
operation type
target
written
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
CN202210301689.6A
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.)
Alibaba China Co Ltd
Original Assignee
Alibaba China 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 Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202210301689.6A priority Critical patent/CN114625321A/en
Publication of CN114625321A publication Critical patent/CN114625321A/en
Pending legal-status Critical Current

Links

Images

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/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • 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/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • 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/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket

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

An embodiment of the present specification provides a data writing method and a device, wherein the data writing method includes: receiving a data writing request, wherein the data writing request carries data to be written and data attributes of the data to be written and related to the operation type of the medium; determining a corresponding target medium operation type according to the data attribute of the data to be written; searching a corresponding target partition naming space from a partition naming space of a storage device according to the target medium operation type, wherein the partition naming space is provided with a corresponding medium operation type; and writing the data to be written into the target partition namespace according to the write-in working mode corresponding to the target medium operation type. Therefore, the partition naming space can provide different service qualities, the distributed partition naming space is matched with the requirement of the data to be written on the service quality, the data writing performance is improved, and therefore better cost benefits are provided for the service of the storage device.

Description

Data writing method and device
Technical Field
The embodiment of the specification relates to the technical field of storage, in particular to a data writing method. One or more embodiments of the present specification also relate to a data writing apparatus, a computing device, and a computer-readable storage medium.
Background
With the rapid development of computer technology and internet technology, the data storage demand is increased rapidly, and a storage engine supporting a ZNS (zone namespace) partition namespace can select an individual storage position according to different data types so as to classify user data according to the data types, thereby reducing write amplification caused by garbage recovery, reducing flash memory wear, and providing visibility and flexibility for the storage engine by the ZNS. However, different data have different requirements for quality of service, and storing data in different partition namespaces according to type classification may result in mismatching between the allocated partition namespaces and the requirements for quality of service for writing data, thereby reducing data writing performance.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a data writing method. One or more embodiments of the present disclosure are also directed to a data writing apparatus, a computing device, and a computer-readable storage medium, which solve the technical problems of the prior art.
According to a first aspect of embodiments herein, there is provided a data writing method including:
receiving a data writing request, wherein the data writing request carries data to be written and data attributes of the data to be written related to the operation type of the medium;
determining a corresponding target medium operation type according to the data attribute of the data to be written;
searching a corresponding target partition naming space from a partition naming space of a storage device according to the target medium operation type, wherein the partition naming space is provided with a corresponding medium operation type, and different medium operation types correspond to different writing working modes;
and writing the data to be written into the target partition namespace according to the write-in working mode corresponding to the target medium operation type.
Optionally, the partition description information of the partition namespace includes a media operation type;
according to the operation type of the target medium, searching a corresponding target partition namespace from the partition namespaces of the storage device, and the method comprises the following steps:
traversing the partition description information of the partition naming space, determining a candidate partition naming space with the medium operation type as the target medium operation type in the partition naming space, and taking the candidate partition naming space as the target partition naming space.
Optionally, the data writing request further carries a data type of data to be written;
taking the candidate partition namespace as a target partition namespace, comprising:
and under the condition that the number of the candidate partition namespaces is at least two, taking the candidate partition namespaces corresponding to the data types in the at least two candidate partition namespaces as target partition namespaces.
Optionally, before traversing the partition description information of the partition namespace, the method further includes:
sending an area opening command to the partition name space in the initial state, wherein the area opening command is used for indicating that the partition name space in the initial state is converted into the open state, and the area opening command carries a first media operation type;
a first media operation type is added to partition description information of an open-state partition namespace.
Optionally, after searching a corresponding target partition namespace from the partition namespaces of the storage device according to the target media operation type, the method further includes:
determining the storage capacity of a target partition namespace according to the operation type of a target medium;
determining the current occupied capacity of the target partition naming space, and determining the capacity difference value between the current occupied capacity and the storage capacity;
and under the condition that the size of the data to be written is smaller than the capacity difference value, executing a writing working mode corresponding to the operation type of the target medium, and writing the data to be written into the target partition namespace.
Optionally, after determining the capacity difference between the current occupied capacity and the storage capacity, the method further includes:
under the condition that the capacity difference value is smaller than the capacity threshold value, converting the state of the target partition namespace from an open state to a full storage state;
and sending an erasing command to the target partition name space under the condition that the data written in the target partition name space is invalid, wherein the erasing command is used for erasing the data written in the target partition name space and converting the target partition name space into an initial state.
Optionally, after sending the erase command to the target partition namespace, the method further includes:
and sending an area opening command to the target partition name space in the initial state, wherein the area opening command carries an updating medium operation type, and the updating medium operation type is different from the target medium operation type.
Optionally, after sending the region open command to the target partition namespace in the initial state, the method further includes:
and determining the life cycle of the target partition namespace by combining the target medium operation type and the update medium operation type.
Optionally, the media operation types include single-tier storage, double-tier storage, three-tier storage, and four-tier storage, the single-tier storage having a better quality of service than the double-tier storage, the double-tier storage having a better quality of service than the three-tier storage, and the three-tier storage having a better quality of service than the four-tier storage.
According to a second aspect of embodiments of the present specification, there is provided a data writing apparatus including:
the data writing module is configured to receive a data writing request, wherein the data writing request carries data to be written and data attributes of the data to be written and related to the media operation type;
the determining module is configured to determine a corresponding target medium operation type according to the data attribute of the data to be written;
the searching module is configured to search a corresponding target partition name space from the partition name spaces of the storage device according to the target medium operation type, wherein the partition name spaces are provided with corresponding medium operation types, and different medium operation types correspond to different writing working modes;
and the writing module is configured to write the data to be written into the target partition namespace according to the writing working mode corresponding to the target medium operation type.
According to a third aspect of embodiments herein, there is provided a computing device comprising:
a memory and a processor;
the memory is used for storing computer executable instructions, and the processor is used for executing the computer executable instructions to realize the following method:
receiving a data writing request, wherein the data writing request carries data to be written and data attributes of the data to be written and related to the operation type of the medium;
determining a corresponding target medium operation type according to the data attribute of the data to be written;
searching a corresponding target partition name space from the partition name spaces of the storage device according to the target medium operation type, wherein the partition name spaces are provided with corresponding medium operation types, and different medium operation types correspond to different writing working modes;
and writing the data to be written into the target partition namespace according to the write-in working mode corresponding to the target medium operation type.
According to a fourth aspect of embodiments herein, there is provided a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of any one of the data writing methods.
One embodiment of the present specification provides a data writing method, which receives a data writing request, where the data writing request carries data to be written and data attributes of the data to be written, which are related to a media operation type; determining a corresponding target medium operation type according to the data attribute of the data to be written; searching a corresponding target partition naming space from a partition naming space of a storage device according to the target medium operation type, wherein the partition naming space is provided with a corresponding medium operation type, and different medium operation types correspond to different writing working modes; and writing the data to be written into the target partition namespace according to the write-in working mode corresponding to the target medium operation type. In this case, corresponding media operation types may be set for the partition namespace, different media operation types correspond to different write operation modes, when data is written in different write operation modes, corresponding service qualities are different, a data attribute in the data write request is related to the media operation type, the media operation type may indicate the service quality, that is, a data attribute of the data to be written may indicate a requirement for the service quality. Therefore, the partition naming space can provide different service qualities, when data is written in, the partition naming space capable of meeting the service quality requirement can be selected according to the service quality requirement of the data to be written in for data writing, the distributed partition naming space is matched with the requirement of the data to be written in on the service quality, the data writing performance is improved, and therefore better cost benefits are provided for the service of the storage device.
Drawings
FIG. 1 is a flow chart of a data writing method provided in one embodiment of the present specification;
FIG. 2 is a diagram illustrating partition description information provided in one embodiment of the present specification;
FIG. 3 is a state machine diagram for partitioning a namespace provided in one embodiment of the present specification;
fig. 4 is a schematic structural diagram of a data writing device according to an embodiment of the present disclosure;
fig. 5 is a block diagram of a computing device according to an embodiment of the present disclosure.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present description. This description may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, as those skilled in the art will be able to make and use the present disclosure without departing from the spirit and scope of the present disclosure.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in this specification 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 in one or more embodiments of the present specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can be termed a second and, similarly, a second can be termed a first without departing from the scope of one or more embodiments of the present description. The word "if," as used herein, may be interpreted as "at … …" or "when … …" or "in response to a determination," depending on the context.
First, the noun terms to which one or more embodiments of the present specification relate are explained.
SSD (Solid State Disk): the computer storage device mainly takes a Flash memory (NAND Flash) as a permanent memory. The solid state disk is composed of a control unit and a storage unit (a FLASH chip and a DRAM chip), and is widely applied to the fields of industrial control, video monitoring, network terminals, navigation equipment and the like. Compared with a mechanical hard disk, the solid state disk has higher read-write speed, but the cost is also higher.
NVMe: the method is a standard interface protocol, removes various limitations of the old standard on the SSD, supports all common operating systems, has good expansibility, and has the advantages of low delay, low energy consumption, high performance and the like.
Partition namespace (ZNS): the method and the device are beneficial to being placed in certain areas of the storage device according to the use frequency of data, so that the rewriting and rearrangement of the stored data are reduced, and the performance and the service life of the whole hard disk are improved. ZNS can allow flexible and dynamic SSD configuration, which will enable dynamic capacity management and mixed-mode NAND operation, improving "granularity of SSD access" and overall control over storage.
Single Level Cell (SLC): the principle is to store 1bit data in 1 memory storage unit (cell), the SLC technology is characterized in that the oxide film in the floating gate and the source is thinner, when writing data, the stored charge can be eliminated by applying voltage to the charge of the floating gate and then the source, through the way, 1 information unit can be stored, the technology can provide fast program programming and reading.
Two-layer storage (Multi Level Cell, MLC): the MLC principle is to store two bits of information into a Floating Gate (a part of a flash memory cell storing charges), and then use the charges of different potentials (levels) to control accurate reading and writing through the voltage of the memory cell. The MLC uses a large number of voltage levels, each unit stores two-bit data, the data density is large, the MLC structure can have good storage density, a common MLC structure flash memory can store 2 bits per cell, and the capacity is 2 times of that of an equivalent SLC.
Triple-Level Cell, TLC): TLC is an extension of SLC and MLC technologies, and represents that 1 memory cell (cell) can store 3 bits, which further reduces the cost greatly. TLC flash memory is the cheaper specification in flash memory production, and its storage has reached 3 bits, and although high storage density has realized cheaper large capacity format, its life cycle of reading and writing is shortened greatly, and the erasing life-span only is short 500 ~ 1000 times, and the speed of reading and writing is relatively poor simultaneously.
Four-tier storage (Quad-Level Cell, QLC): QLC can store 4bit data per memory cell (cell), and compared with TLC, the storage density of QLC is improved by 33%. The QLC can not only endure 1000 programming or erasing cycles, but also has improved capacity and lower cost.
Quality of service (Quality of service, QoS): the method can provide better service capability by utilizing various basic technologies, is a safety mechanism, can be used for solving the problems of network delay, network congestion and the like, and ensures the QoS (quality of service) which is very important for a storage space with limited capacity.
It should be noted that NAND flash memory is a better storage device than a conventional hard disk drive, and it uses a non-volatile storage technology, i.e., a storage device that can still store data after power is turned off. NAND flash memory is made up of a plurality of cells in bits (bits) that are turned on and off by charge, and the naming of NAND flash memory is also determined by how the switch cells are organized to store data on the SSD, such as single level memory (SLC) flash memory, which contains 1bit per cell. Due to the fact that the specifications of the SSD circuit board have industry standard sizes, under the same unit physical space, the capacity of double-layer storage (MLC) can be doubled, the capacity of three-layer storage (TLC) can be more tripled, and the capacity of four-layer storage (QLC) can be more quadrupled.
In addition, the hard disk partition is usually on the file system level, and due to the existence of the middle layer of the FTL flash memory mapping table, the logical partition and the actual flash memory address are not in a fixed corresponding relation, so that the function of storing data in a classified manner cannot be achieved, and different data can be stored together in a mixed manner. And the solid state disk supporting the ZNS partition name space can select an independent storage position according to different data types, so that the write-in amplification caused by garbage recovery is reduced (the wear to a flash memory is reduced). In addition, a Zone area of the ZNS may be defined as the size of one or more Block flash blocks (one Block is usually 16MB), and only sequential writing (but random reading) is supported in the Zone area, so as to achieve the purpose of reducing write amplification.
The ZNS standard is published with nvme2.0 and is already supported by the Linux kernel, providing visibility and flexibility for the storage engine, which can manage SSD storage media on a Zone area basis, and can place user data into different areas in order to classify the user data according to data type and its attributes. By sorting different types of data into different regions, data with similar retention periods will be put together, and the storage engine may benefit from write amplification, thereby reducing garbage collection. However, different data have different requirements on the service quality, and storing the data into different partition namespaces according to the type classification may result in that the allocated partition namespaces do not match the requirements of the written data on the service quality, thereby reducing the data writing performance.
Thus, in embodiments of the present description, different data should have different quality of service requirements for classified data, and in order to provide a hierarchical quality of service, a method of formatting partition namespaces to specific media operation types (SLC/MLC/TLC/QLC) is provided, so that different partition namespaces can provide different levels of quality of service.
In the present specification, a data writing method is provided, and the present specification relates to a data writing apparatus, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.
Fig. 1 shows a flowchart of a data writing method provided according to an embodiment of the present specification, including steps 102 to 108.
Step 102: and receiving a data writing request, wherein the data writing request carries data to be written and data attributes of the data to be written related to the operation type of the medium.
Specifically, the data write request is a request for writing data into a partition namespace of a storage device, which may be a solid state disk supporting a ZNS partition namespace (e.g., an SSD, which is a computer storage device mainly using a NAND flash memory as a permanent memory, and may support the ZNS partition namespace). The media operation types, namely solid state disk particle types, are used to indicate write operation modes of partition namespaces, the NAND flash media can be accessed (erased/programmed/read) under different media operation types, different media operation types can provide different media attributes, and the media operation types of the NAND flash media can be classified into four types according to storage principles, namely single-level Storage (SLC), double-level storage (MLC), three-level storage (TLC) and four-level storage (QLC).
In an alternative embodiment of this embodiment, the media operation types include single-tier storage, double-tier storage, three-tier storage, and four-tier storage, where the single-tier storage has better quality of service than the double-tier storage, the double-tier storage has better quality of service than the three-tier storage, and the three-tier storage has better quality of service than the four-tier storage.
In which single level Storage (SLC) stores 1bit of data in 1 memory cell (cell), in this mode the NAND medium provides a small capacity, the QoS (quality of service) is higher, the program delay is about 400us, the erase delay is about 1000us, the read delay is about 40us, which depends to a large extent on the NAND supplier, and the SLC also has a higher PEC (program/erase cycle, representing the age of the medium) (30k to 40 k).
The dual-layer storage is to store 2-bit data in 1 memory storage unit (cell), in this mode, the capacity of the NAND medium is 2 times that of SLC, and the QoS (quality of service) is lower than that of SLC, its program delay is about 800us, erase delay is about 2000us, read delay is about 60us, and PEC of MLC is usually between 7k and 12 k.
Three-layer storage, namely 3bit data stored in 1 memory storage unit (cell), in this mode, the capacity of NAND medium is 3 times that of SLC, and QoS is lower than MLC, its program delay is about 1200us, erasing delay is about 3000us, reading delay is about 80us, and PEC of TLC is between 3k and 7 k.
Four-tier storage, i.e., storing 4-bit data in 1 memory cell (cell), in this mode, the capacity of the NAND medium is 4 times that of SLC, and the QoS is lower than TLC, its program delay is about 1500us, erase delay is about 4000us, read delay is about 150us, and PEC of QLC is between 1 thousand and 3 thousand.
It should be noted that the data attribute of the data to be written refers to an attribute related to the media operation type, that is, an attribute capable of indicating the media operation type required by the data to be written, such as information about data operation frequency, workload, size, and the like. In addition, since the data attribute of the data to be written is related to the media operation type, and the service quality corresponding to different media operation types is different, the data attribute of the data to be written may indicate the service quality requirement of the data to be written.
In practical application, the storage device is divided into at least two partition namespaces, in order to indicate the partition namespace into which the data to be written is to be written, the data write request can carry data attributes of the data to be written and related to the types of the operating media, the corresponding target operating media type can be determined according to the data attributes, then the corresponding target partition namespace is selected from the at least two partition namespaces for data writing, and the distributed partition namespaces are matched with the requirements of the data to be written on the service quality.
For example, taking a data attribute of the data to be written related to the media operation type as a workload, the data to be written is data with a short period of time, such as log record and cache, and the data attribute of the data to be written related to the media operation type may be hot write data; the data to be written is read cache, page file and the like, and the data attribute of the data to be written related to the medium operation type can be hot read data; the data to be written is data which is updated rarely, and the data attribute of the data to be written, which is related to the operation type of the medium, can be cold write data.
In this embodiment of the present specification, the media operation types may include four types, which are single-layer storage, double-layer storage, three-layer storage, and four-layer storage, respectively, different media operation types perform data writing in different writing working modes to provide different quality of service, the quality of service of single-layer storage is better than that of double-layer storage than that of three-layer storage, the data writing request may carry data attributes of data to be written and related to the media operation types, indicating, by the data attributes, quality of service requirements for the data to be written, thereby facilitating subsequent matching of the corresponding target partition namespace based on the quality of service requirements, the target partition namespace can provide corresponding service quality, the service quality requirement of the data to be written is met, and the distributed partition namespace is matched with the requirement of the data to be written on the service quality.
Step 104: and determining the corresponding target medium operation type according to the data attribute of the data to be written.
It should be noted that the data attribute is an attribute of the data to be written, which is related to the media operation type, and therefore, the corresponding target media operation type can be determined based on the data attribute.
In practical application, the corresponding relationship between the data attribute and the media operation type may be stored in advance, when a data write request is received, the data write request is analyzed to obtain the data to be written and the data attribute of the data to be written and the media operation type, and according to the data attribute of the data to be written and the media operation type, the corresponding target media operation type is searched in the corresponding relationship between the data attribute and the media operation type which are stored in advance.
As an example, for different workloads, the storage engine may choose different media operation types, providing superior cost-effectiveness for the service, may place hot-write data (data with shorter tenure of logging, caching, etc.) and hot-read data (read cache, page file, etc.) into the SLC's partition namespace, SLC may provide higher QoS and better aging, and from the perspective of DWPD (data written daily), the storage engine has better DWPD than MLC/TLC/QLC even though SLC capacity is lower. For cold write data, the storage engine may place the data in the QLC partition namespace, which provides high capacity, since it is rarely updated.
Assuming that the data attribute of the data to be written and the data attribute related to the media operation type are hot write data, determining that the corresponding target media operation type is single-layer Storage (SLC) based on a preset corresponding relationship; assuming that the data attribute of the data to be written and the data attribute related to the media operation type are heat data, determining that the corresponding target media operation type is single-layer Storage (SLC) based on a preset corresponding relationship; assuming that the data attribute of the data to be written and the media operation type is cold write data, at this time, the corresponding target media operation type may be determined to be four-layer storage (QLC) based on the preset correspondence.
In this embodiment of the present specification, a data attribute of data to be written may indicate a service quality requirement of the data to be written, and different media operation types may provide different service qualities, so that a corresponding target media operation type may be determined according to the data attribute of the data to be written, where the target media operation type is a media operation type that may provide the service quality required by the data to be written, and a partition namespace of the target media operation type may be subsequently selected for data writing operation, so that the allocated partition namespace matches the requirement of the data to be written on the service quality, and the data writing performance is improved, thereby providing a better cost benefit for the service of the storage device.
Step 106: and searching a corresponding target partition name space from the partition name space of the storage device according to the target medium operation type, wherein the partition name space is provided with a corresponding medium operation type, and different medium operation types correspond to different writing working modes.
Wherein, the partition namespaces can be at least two. The write-in working mode refers to a mode in which a partition namespace performs data write-in according to a corresponding medium operation type, the medium operation type comprises single-layer storage, double-layer storage, three-layer storage and four-layer storage, the write-in working mode of the single-layer storage is to write 1bit of data in 1 memory storage unit (cell), the write-in working mode of the double-layer storage is to write 2bit of data in 1 memory storage unit (cell), the write-in working mode of the three-layer storage is to write 3bit of data in 1 memory storage unit (cell), and the write-in working mode of the four-layer storage is to write 4bit of data in 1 memory storage unit (cell).
It should be noted that the storage device may be divided into at least two partition namespaces, each partition namespace is provided with a corresponding media operation type, different media operation types correspond to different write operation modes, and when data is written in different write operation modes, corresponding service qualities are different. That is, the media operation type may represent the service quality that can be provided, and the target media operation type is determined based on the service quality requirement of the data to be written, so that the corresponding target partition name space may be searched from at least two partition name spaces of the storage device according to the target media operation type, and the media operation type of the searched target partition name space is the target media operation type, which may provide the service quality required by the data to be written, complete data writing, ensure that the allocated target partition name space matches with the requirement of the data to be written on the service quality, improve the data writing performance, and thereby provide better cost benefit for the service of the storage device.
In an optional implementation manner of this embodiment, a record field of a medium operation type may be added to partition description information of a partition namespace, so that a target partition namespace corresponding to a target medium operation type is found based on the partition description information of the partition namespace, that is, the partition description information of the partition namespace includes the medium operation type, at this time, according to the target medium operation type, a corresponding target partition namespace is found from the partition namespace of the storage device, and a specific implementation process may be as follows:
traversing the partition description information of the partition naming space, determining a candidate partition naming space with the medium operation type as the target medium operation type in the partition naming space, and taking the candidate partition naming space as the target partition naming space.
It should be noted that the partition description information is used to record attribute information of the partition namespace, the partition description information may be provided with a plurality of fields, each field records corresponding attribute information, for example, a zt (zone type) field may be included in the partition description information, the field may define an access type of the partition namespace, and 0x2 indicates that the partition namespace needs to be written in sequence, which is also referred to as append only.
In practical application, in the ZNS standard, each partition namespace is described by partition description information, a record field of a media operation type may be added to the partition description information, and a corresponding media operation type may be recorded through the record field. When the target medium type is determined, the partition description information of the partition naming space can be traversed, the candidate partition naming space with the medium operation type as the target medium operation type is found, and the medium operation type of the screened candidate partition naming space is the target medium operation type. That is, the candidate partition namespace may provide the quality of service required for the data to be written.
For example, fig. 2 is a schematic diagram of partition description information provided in an embodiment of this specification, and as shown in fig. 2, the partition description information includes an attribute field and a description field, the attribute field is used to record attribute information of a partition namespace, the description field is used to describe a corresponding meaning of the attribute field, and as shown in fig. 2, the attribute field includes a zt (zone type) field and a recording field of a media operation type. The ZT field can define the access type of the partition namespace, the ZT field is 0x2 which indicates that the partition namespace needs to be written in sequence, and the description field corresponding to the ZT field is as follows: defining rules for writing and reading of a partition namespace; the record field of the medium operation type is used for recording the corresponding medium operation type, the medium operation type is SLC and indicates that 1bit (bit) of data is written in 1 memory storage unit (cell), and the description field corresponding to the record field of the medium operation type is: a write mode of operation for the partition namespace is defined.
In the embodiment of the present specification, each partition namespace is described by partition description information, a record field of a medium operation type may be added in the partition description information, a corresponding medium operation type may be recorded by the record field, after a corresponding target medium operation type is determined according to a data attribute of data to be written, the partition description information of the partition namespaces may be traversed, a target partition namespace of the target medium operation type may be screened out therefrom, a target partition namespace that may provide quality of service required by the data to be written may be screened out by simply searching the partition description information, the search process is simple and convenient to operate, and efficiency of determining the target partition namespace is ensured.
In an optional implementation manner of this embodiment, when there are at least two candidate partition namespaces, the data types may be classified and stored, that is, the data write request also carries the data type of the data to be written, and at this time, the candidate partition namespace is used as the target partition namespace, and a specific implementation process may be as follows:
and under the condition that the number of the candidate partition namespaces is at least two, taking the candidate partition namespaces corresponding to the data types in the at least two candidate partition namespaces as target partition namespaces.
It should be noted that the storage device is divided into at least two partition namespaces, and the media operation types may be divided into four types, so that there may be multiple partition namespaces in the at least two partition namespaces corresponding to the same media operation type, that is, traversing the partition description information of the at least two partition namespaces, and there may be more than one determined candidate partition namespaces, so that in the case that there are at least two candidate partition namespaces, further division may be performed based on the data type of the data to be written.
In this embodiment of the present specification, the data write request may further carry a data type of data to be written, and when there are at least two candidate partition namespaces, a candidate partition namespace corresponding to the data type in the at least two candidate partition namespaces is used as a target partition namespace. That is, when a plurality of partition namespaces correspond to the same media operation type, the plurality of partition namespaces correspond to different data types, so that the data to be written with the same service quality requirement can be classified and stored, and the data with similar retention periods in the data with the same service quality requirement can be stored together, thereby reducing garbage collection and benefiting from write amplification.
In an optional implementation manner of this embodiment, the state machine of the partition namespace may include multiple states, and the partition namespace may be in an open state and may only work normally to write data, so before traversing the partition description information of the partition namespace, the method may further include:
sending an area opening command to the partition name space in the initial state, wherein the area opening command is used for indicating that the partition name space in the initial state is converted into the open state, and the area opening command carries a first media operation type;
a first media operation type is added to partition description information of an open-state partition namespace.
It should be noted that, at least two partition namespaces of the storage device may be initially in an initial state, and then a region opening command may be sent to the partition namespace in the initial state, where the region opening command may instruct the partition namespace in the initial state to transition to an open state, and the partition namespace in the open state may work normally to write data. In a specific implementation, a media operation type field (SLC/MLC/TLC or QLC) may be newly added in the area open command to indicate a write operation mode of the partition namespace in an open state.
In this embodiment of this specification, when a partition namespace receives an area open command, the partition namespace enters an open state, the area open command specifies a media operation type of the partition namespace, and the media operation type may be recorded in partition description information of the partition namespace to indicate a mode in which the partition namespace is to write data. Therefore, when the partition naming space is converted into an open state, the medium operation type of the partition naming space can be designated, so that the information of the medium operation type is added to each partition naming space, and when data is written in, the corresponding target partition naming space can be selected from each partition naming space based on the service quality requirement of the data to be written in, so that the allocated partition naming space is matched with the requirement of the data to be written in on the service quality.
Step 108: and writing the data to be written into the target partition namespace according to the write-in working mode corresponding to the target medium operation type.
It should be noted that different media operation types correspond to different write-in working modes, and after the target media operation type is determined, the data to be written may be written into the target partition namespace according to the write-in working mode corresponding to the target media operation type.
For example, the operation type of the target medium is SLC, and the corresponding write operation mode is to write 1bit of data in 1 memory storage unit (cell), at this time, 1bit of data may be written in 1 memory storage unit (cell) in the target partition namespace until the data to be written is written in the target partition namespace.
In an optional implementation manner of this embodiment, in different media operation types, the actual available capacities of the partition namespaces are different, so that whether the capacity of the target partition namespace is full may be tracked based on the media operation types, that is, after searching for the corresponding target partition namespace from the partition namespaces of the storage device according to the target media operation types, the method may further include:
determining the storage capacity of a target partition namespace according to the operation type of a target medium;
determining the current occupied capacity of the target partition naming space, and determining the capacity difference value between the current occupied capacity and the storage capacity;
and under the condition that the size of the data to be written is smaller than the capacity difference value, executing a writing working mode corresponding to the operation type of the target medium, and writing the data to be written into the target partition namespace.
It should be noted that the same partition namespace uses 1/3 with only TLC mode capacity in SLC mode, so once a partition namespace is set to SLC mode, it means that 2/3 of capacity is lost in the partition namespace, so the available capacity of the partition namespace is reduced and the storage engine needs to track the capacity change.
In practical application, the storage capacity of the target partition namespace can be determined according to the operation type of the target medium, then the current occupied capacity of the target partition namespace is determined, and the capacity difference value between the current occupied capacity and the storage capacity is determined, wherein the capacity difference value indicates how much capacity of the target partition namespace is left for data writing, under the condition that the size of the data to be written is smaller than the capacity difference value, the current remaining capacity of the target partition namespace can meet the requirement of writing the data to be written, and at the moment, the operation step of writing the data to be written into the target partition namespace according to a writing working mode corresponding to the operation type of the target medium can be executed; and under the condition that the size of the data to be written exceeds the capacity difference, the current residual capacity of the target partition namespace does not meet the requirement of writing the data to be written, namely, the total data amount is larger than the available capacity due to the fact that the data to be written is written, and therefore the data writing cannot be carried out.
In this embodiment of the present specification, the capacities corresponding to different media operation types are different, which means that the available capacity of the partition namespace may change after the partition namespace is opened with different media operation types, and therefore, the storage engine needs to continuously track the change of the available capacity of the partition namespace under different media operation types, and ensure that the total data amount of the partition namespace is not greater than the available capacity, thereby ensuring that the total data amount of the storage device is not greater than the capacity of the storage device.
In an optional implementation manner of this embodiment, after a partition namespace is full, the method may further include:
under the condition that the capacity difference value is smaller than the capacity threshold value, converting the state of the target partition namespace from an open state to a full storage state;
and sending an erasing command to the target partition name space under the condition that the data written in the target partition name space is invalid, wherein the erasing command is used for erasing the data written in the target partition name space and converting the target partition name space into an initial state.
It should be noted that, when the capacity difference is smaller than the capacity threshold, it indicates that the capacity of the target partition namespace is full and no other data can be written, so that the storage engine may convert the state of the target partition namespace from the open state to the full state and no data is written into the target partition namespace. Thereafter, when the data on the target partition namespace is invalid, the data written in the target partition namespace may be erased by an erase command, returning to the initial state.
For example, fig. 3 is a schematic diagram of a state machine of a partition namespace according to an embodiment of the present disclosure, as shown in fig. 3, the partition namespace is initially in an initial state (empty), and when a partition namespace receives a region open command, the partition namespace enters an open state (open), and it is determined under which medium operation type (SLC/MLC/TLC/QLC) the partition namespace is to be written. The Full state (Full) is entered when a partition namespace is Full. When data on the partition namespace is invalid, the data may be erased by an erase command, returning to the initial state (empty). If a media error occurs during the above operation process, the partition namespace will be changed to a read only state (read only), and if the data on the partition namespace is invalid, the partition namespace will be brought to an offline state (offline).
In the embodiment of the present specification, when the capacity difference is smaller than the capacity threshold, it is indicated that the capacity of the target partition namespace is full and no other data can be written, at this time, the state of the target partition namespace may be converted from the open state to the full storage state, and no data is written into the target partition namespace, so that the total amount of data in the partition namespace is not greater than the available capacity, and the success rate of data writing is ensured. In addition, under the condition that the data written in the target partition name space is invalid, the data written in the target partition name space can be erased, and the target partition name space is converted into an initial state for the next opening to continue the next round of data writing, so that the reuse rate of the partition name space is improved.
In an optional implementation manner of this embodiment, after erasing data written in the target partition namespace, the method may further open the target partition namespace again, that is, after sending the erase command to the target partition namespace, the method may further include:
and sending an area opening command to the target partition name space in the initial state, wherein the area opening command carries an updating medium operation type, and the updating medium operation type is different from the target medium operation type.
It should be noted that, after the data written in the target partition namespace is erased, the capacity of the target partition namespace may be available, and at this time, the area open command may be sent to the target partition namespace in the initial state again, so that the target partition namespace is converted from the initial state to the open state, and the data writing is performed again.
In practical application, the area open command carries an updated media operation type, where the updated media operation type is different from the target media operation type, that is, the media operation type of the partition namespace can be changed each time a partition namespace is opened again, the media operation type can be sent to the storage device through the area open command, and the partition description information in the storage device records the media operation type.
In this embodiment of the present specification, each time a partition namespace is reopened, the media operation type of the partition namespace may be changed, so that the flexibility of setting the media operation type of the partition namespace is improved.
In an optional implementation manner of this embodiment, after sending the area open command to the target partition namespace in the initial state, the method may further include:
and determining the life cycle of the target partition namespace by combining the target medium operation type and the update medium operation type.
It should be noted that the life cycle may refer to the age of the medium, i.e., the PEC, in the partitioned namespace in the storage device. The PECs are different for different media types of operation, e.g., higher PECs in SLC mode and lower PECs in TLC mode, and when a partition namespace is alternatively operated in SLC and TLC modes, the average of the impact of erase operations on NAND block lifetime for different media types needs to be considered.
In this embodiment of the present description, the life cycle of the target partition namespace may be determined in combination with the target media operation type and the updated media operation type, that is, the age of the media may be determined comprehensively based on each media operation type of the partition namespace, so that the accuracy of determining the age of the media is improved.
An embodiment of the present specification provides a data writing method, which may set a corresponding media operation type for a partition namespace, where different media operation types correspond to different writing work modes, and when data is written in different writing work modes, corresponding quality of service is different, a data attribute in a data writing request is related to the media operation type, and the media operation type may indicate quality of service, that is, a data attribute of data to be written may indicate a requirement for quality of service. Therefore, the partition naming space can provide different service qualities, when data is written in, the partition naming space capable of meeting the service quality requirement can be selected according to the service quality requirement of the data to be written in for data writing, the distributed partition naming space is matched with the requirement of the data to be written in on the service quality, the data writing performance is improved, and therefore better cost benefits are provided for the service of the storage device.
Corresponding to the above method embodiment, this specification further provides an embodiment of a data writing device, and fig. 4 shows a schematic structural diagram of a data writing device provided in an embodiment of this specification. As shown in fig. 4, the apparatus includes:
a receiving module 402, configured to receive a data write request, where the data write request carries data to be written and data attributes of the data to be written, which are related to a media operation type;
a determining module 404 configured to determine a corresponding target media operation type according to a data attribute of data to be written;
the searching module 406 is configured to search a corresponding target partition name space from the partition name spaces of the storage device according to the target media operation type, where the partition name space is provided with a corresponding media operation type, and different media operation types correspond to different writing working modes;
the writing module 408 is configured to write the data to be written into the target partition namespace according to the writing work mode corresponding to the target media operation type.
Optionally, the partition description information of the partition namespace includes a media operation type; the lookup module 406 is further configured to:
traversing the partition description information of the partition naming space, determining a candidate partition naming space with the medium operation type as the target medium operation type in the partition naming space, and taking the candidate partition naming space as the target partition naming space.
Optionally, the data writing request further carries a data type of the data to be written; the lookup module 406 is further configured to:
and under the condition that the number of the candidate partition namespaces is at least two, taking the candidate partition namespaces corresponding to the data types in the at least two candidate partition namespaces as target partition namespaces.
Optionally, the apparatus further comprises an adding module configured to:
sending an area opening command to the partition name space in the initial state, wherein the area opening command is used for indicating that the partition name space in the initial state is converted into the open state, and the area opening command carries a first media operation type;
a first media operation type is added to partition description information of an open-state partition namespace.
Optionally, the apparatus further comprises an execution module configured to:
determining the storage capacity of a target partition namespace according to the operation type of a target medium;
determining the current occupied capacity of the target partition naming space, and determining the capacity difference value between the current occupied capacity and the storage capacity;
in the event that the size of the data to be written is less than the capacity difference, the write module 408 is executed.
Optionally, the execution module is further configured to:
under the condition that the capacity difference value is smaller than the capacity threshold value, converting the state of the target partition namespace from an open state to a full storage state;
and sending an erasing command to the target partition name space under the condition that the data written in the target partition name space is invalid, wherein the erasing command is used for erasing the data written in the target partition name space and converting the target partition name space into an initial state.
Optionally, the execution module is further configured to:
and sending an area opening command to the target partition name space in the initial state, wherein the area opening command carries an updating medium operation type, and the updating medium operation type is different from the target medium operation type.
Optionally, the execution module is further configured to:
and determining the life cycle of the target partition namespace by combining the target medium operation type and the update medium operation type.
Optionally, the media operation types include single-tier storage, double-tier storage, three-tier storage, and four-tier storage, the single-tier storage having a better quality of service than the double-tier storage, the double-tier storage having a better quality of service than the three-tier storage, and the three-tier storage having a better quality of service than the four-tier storage.
An embodiment of the present specification provides a data writing device, which may set a corresponding media operation type for a partition namespace, where different media operation types correspond to different writing work modes, and when data is written in different writing work modes, corresponding service qualities are different, a data attribute in a data writing request is related to the media operation type, and the media operation type may indicate a service quality, that is, a data attribute of data to be written may indicate a requirement for the service quality. Therefore, the partition naming space can provide different service qualities, when data is written in, the partition naming space capable of meeting the service quality requirement can be selected according to the service quality requirement of the data to be written in for data writing, the distributed partition naming space is matched with the requirement of the data to be written in on the service quality, the data writing performance is improved, and therefore better cost benefits are provided for the service of the storage device.
The above is a schematic scheme of a data writing apparatus of the present embodiment. It should be noted that the technical solution of the data writing device and the technical solution of the data writing method belong to the same concept, and details that are not described in detail in the technical solution of the data writing device can be referred to the description of the technical solution of the data writing method.
FIG. 5 illustrates a block diagram of a computing device, according to one embodiment of the present description. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. Processor 520 is coupled to memory 510 via bus 530, and database 550 is used to store data.
Computing device 500 also includes access device 540, access device 540 enabling computing device 500 to communicate via one or more networks 560. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. The access device 540 may include one or more of any type of network interface, e.g., a Network Interface Card (NIC), wired or wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present description, the above-described components of computing device 500, as well as other components not shown in FIG. 5, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 5 is for purposes of example only and is not limiting as to the scope of the present description. Those skilled in the art may add or replace other components as desired.
Computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smartphone), wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 500 may also be a mobile or stationary server.
Wherein, the processor 520 is configured to execute the following computer-executable instructions to implement the following method:
receiving a data writing request, wherein the data writing request carries data to be written and data attributes of the data to be written and related to the operation type of the medium;
determining a corresponding target medium operation type according to the data attribute of the data to be written;
searching a corresponding target partition naming space from a partition naming space of a storage device according to the target medium operation type, wherein the partition naming space is provided with a corresponding medium operation type, and different medium operation types correspond to different writing working modes;
and writing the data to be written into the target partition namespace according to the write-in working mode corresponding to the target medium operation type.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the data writing method belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the data writing method.
An embodiment of the present specification also provides a computer readable storage medium storing computer instructions, which when executed by a processor, implement the steps of the data writing method.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the data writing method, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the data writing method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts, but those skilled in the art should understand that the present embodiment is not limited by the described acts, because some steps may be performed in other sequences or simultaneously according to the present embodiment. Further, those skilled in the art should also appreciate that the embodiments described in this specification are preferred embodiments and that acts and modules referred to are not necessarily required for an embodiment of the specification.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are intended only to aid in the description of the specification. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the embodiments and the practical application, to thereby enable others skilled in the art to best understand and utilize the embodiments. The specification is limited only by the claims and their full scope and equivalents.

Claims (12)

1. A data writing method, comprising:
receiving a data writing request, wherein the data writing request carries data to be written and data attributes of the data to be written related to the media operation type;
determining a corresponding target medium operation type according to the data attribute of the data to be written;
searching a corresponding target partition naming space from a partition naming space of a storage device according to the target medium operation type, wherein the partition naming space is provided with a corresponding medium operation type, and different medium operation types correspond to different writing working modes;
and writing the data to be written into the target partition namespace according to the write-in working mode corresponding to the target medium operation type.
2. The data writing method according to claim 1, wherein the partition description information of the partition namespace includes a media operation type;
the searching for the corresponding target partition name space from the partition name spaces of the storage device according to the target medium operation type includes:
traversing the partition description information of the partition namespace, determining a candidate partition namespace in which the media operation type in the partition namespace is the target media operation type, and taking the candidate partition namespace as the target partition namespace.
3. The data writing method according to claim 2, wherein the data writing request further carries a data type of the data to be written;
the taking the candidate partition namespace as the target partition namespace comprises:
and under the condition that the number of the candidate partition namespaces is at least two, taking the candidate partition namespaces corresponding to the data types in the at least two candidate partition namespaces as the target partition namespaces.
4. The data writing method of claim 2, before traversing the partition description information of the partition namespace, further comprising:
sending an area opening command to a partition namespace in an initial state, wherein the area opening command is used for indicating that the partition namespace in the initial state is converted into an open state, and a first media operation type is carried in the area opening command;
and adding the first media operation type in the partition description information of the partition namespace in the open state.
5. The data writing method according to any one of claims 1 to 4, further comprising, after searching for a corresponding target partition namespace from partition namespaces of a storage device according to the target media operation type:
determining the storage capacity of the target partition namespace according to the target media operation type;
determining the current occupied capacity of the target partition namespace, and determining the capacity difference value between the current occupied capacity and the storage capacity;
and executing the writing working mode corresponding to the target medium operation type and writing the data to be written into the target partition namespace under the condition that the size of the data to be written is smaller than the capacity difference.
6. The data writing method of claim 5, after determining the capacity difference between the currently occupied capacity and the storage capacity, further comprising:
under the condition that the capacity difference value is smaller than a capacity threshold value, converting the state of the target partition namespace from an open state to a full storage state;
and sending an erasing command to the target partition name space under the condition that the data written in the target partition name space is invalid, wherein the erasing command is used for erasing the data written in the target partition name space and converting the target partition name space into an initial state.
7. The data writing method of claim 6, after sending an erase command to the target partition namespace, further comprising:
and sending an area opening command to a target partition namespace in an initial state, wherein the area opening command carries an updated media operation type, and the updated media operation type is different from the target media operation type.
8. The data writing method according to claim 7, further comprising, after sending the region open command to the target partition namespace in the initial state:
and determining the life cycle of the target partition namespace by combining the target media operation type and the updating media operation type.
9. The data writing method according to any one of claims 1 to 4, wherein the media operation types include single-tier storage, double-tier storage, three-tier storage, and four-tier storage, the single-tier storage having a better quality of service than the double-tier storage, the double-tier storage having a better quality of service than the three-tier storage, and the three-tier storage having a better quality of service than the four-tier storage.
10. A data writing apparatus comprising:
the data writing method comprises the steps that a receiving module is configured to receive a data writing request, wherein the data writing request carries data to be written and data attributes of the data to be written, which are related to media operation types;
the determining module is configured to determine a corresponding target medium operation type according to the data attribute of the data to be written;
the searching module is configured to search a corresponding target partition name space from a partition name space of a storage device according to the target medium operation type, wherein the partition name space is provided with a corresponding medium operation type, and different medium operation types correspond to different writing working modes;
and the writing module is configured to write the data to be written into the target partition namespace according to a writing working mode corresponding to the target medium operation type.
11. A computing device, comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions, and the processor is configured to execute the computer-executable instructions to implement the method of:
receiving a data writing request, wherein the data writing request carries data to be written and data attributes of the data to be written and related to the operation type of a medium;
determining a corresponding target medium operation type according to the data attribute of the data to be written;
searching a corresponding target partition naming space from a partition naming space of a storage device according to the target medium operation type, wherein the partition naming space is provided with a corresponding medium operation type, and different medium operation types correspond to different writing working modes;
and writing the data to be written into the target partition namespace according to the write-in working mode corresponding to the target medium operation type.
12. A computer-readable storage medium storing computer-executable instructions which, when executed by a processor, implement the steps of the data writing method of any one of claims 1 to 9.
CN202210301689.6A 2022-03-25 2022-03-25 Data writing method and device Pending CN114625321A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210301689.6A CN114625321A (en) 2022-03-25 2022-03-25 Data writing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210301689.6A CN114625321A (en) 2022-03-25 2022-03-25 Data writing method and device

Publications (1)

Publication Number Publication Date
CN114625321A true CN114625321A (en) 2022-06-14

Family

ID=81903523

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210301689.6A Pending CN114625321A (en) 2022-03-25 2022-03-25 Data writing method and device

Country Status (1)

Country Link
CN (1) CN114625321A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115905219A (en) * 2022-11-04 2023-04-04 上海威固信息技术股份有限公司 Data storage driving system for multi-channel data storage cloud library and transmission method thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968253A (en) * 2018-09-29 2020-04-07 阿里巴巴集团控股有限公司 Data storage method, device and system
CN113138713A (en) * 2020-01-16 2021-07-20 铠侠股份有限公司 Memory system
US20210318820A1 (en) * 2020-04-09 2021-10-14 SK Hynix Inc. Data storage device and operating method thereof
CN113821158A (en) * 2020-06-20 2021-12-21 华为技术有限公司 Flash memory, storage medium conversion method and computing device
US20220075716A1 (en) * 2020-09-04 2022-03-10 Western Digital Technologies, Inc. Zoned Namespace Limitation Mitigation Using Sub Block Mode

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968253A (en) * 2018-09-29 2020-04-07 阿里巴巴集团控股有限公司 Data storage method, device and system
CN113138713A (en) * 2020-01-16 2021-07-20 铠侠股份有限公司 Memory system
US20210318820A1 (en) * 2020-04-09 2021-10-14 SK Hynix Inc. Data storage device and operating method thereof
CN113821158A (en) * 2020-06-20 2021-12-21 华为技术有限公司 Flash memory, storage medium conversion method and computing device
US20220075716A1 (en) * 2020-09-04 2022-03-10 Western Digital Technologies, Inc. Zoned Namespace Limitation Mitigation Using Sub Block Mode

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115905219A (en) * 2022-11-04 2023-04-04 上海威固信息技术股份有限公司 Data storage driving system for multi-channel data storage cloud library and transmission method thereof
CN115905219B (en) * 2022-11-04 2023-09-19 上海威固信息技术股份有限公司 Data storage driving system for multichannel data cloud storage library and transmission method thereof

Similar Documents

Publication Publication Date Title
CN107967121B (en) Data writing method and storage device
US10838859B2 (en) Recency based victim block selection for garbage collection in a solid state device (SSD)
CN107844431B (en) Mapping table updating method, memory control circuit unit and memory storage device
US8417872B2 (en) Write and merge methods in memory card systems for reducing the number of page copies
US7516295B2 (en) Method of remapping flash memory
CN105740163A (en) Nand Flash bad block management method
US20090265505A1 (en) Data writing method, and flash storage system and controller using the same
US10754549B2 (en) Append only streams for storing data on a solid state device
CN107665091B (en) Data reading method, data writing method and storage controller thereof
US8856475B1 (en) Efficient selection of memory blocks for compaction
CN109471594B (en) M L C flash memory read-write method
US20100042775A1 (en) Block management method for flash memory, and storage system and controller using the same
US8745312B2 (en) Storage device and method of mapping a nonvolatile memory based on a map history
CN109582593A (en) A kind of FTL address mapping method and data read-write method based on calculating
US20090319721A1 (en) Flash memory apparatus and method for operating the same
CN109840218B (en) Effective data management method and storage controller
CN101794253B (en) Memory storage device and control method thereof, and hot data control module
CN114625321A (en) Data writing method and device
CN114036079B (en) Mapping table compression method and system, memory controller, solid state disk and data reading method
WO2021035555A1 (en) Data storage method and apparatus for solid state disk and solid state disk (ssd)
CN113778907A (en) Storage device
CN112860193A (en) Finishing instruction processing method, memory control circuit unit and storage device
CN113010091B (en) Method for writing data into solid state disk, method and device for recycling garbage
CN115857811A (en) Data processing method and device, solid state disk and readable storage medium
KR20110070656A (en) Method and apparatus for processing data of flash memory

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