Patent Description:
A semiconductor memory device is classified as a volatile memory device, in which stored data disappears when a power supply is turned off, such as in a static random access memory (SRAM) or a dynamic random access memory (DRAM), or a nonvolatile memory device, in which stored data is retained even when a power supply is turned off, such as in a flash memory device, a phase-change RAM (PRAM), a magnetic RAM (MRAM), a resistive RAM (RRAM), or a ferroelectric RAM (FRAM).

The flash memory device is currently being widely used as a high-capacity storage device. A controller configured to control the flash memory device controls the flash memory device by using a mapping table. The mapping table is a device of important metadata for guaranteeing the reliability of data. Accordingly, when the metadata such as the mapping table is lost, the reliability of data stored in the storage device is incapable of being guaranteed, various techniques for preventing the loss of such metadata are being developed.

<CIT> discloses a memory device and one or more processors. The memory device is configured to store a table that includes two or more mappings, each mapping being associated with a respective logical address and a respective physical address. The processors are configured to identify, within the table, a first zone and a second zone. Each zone includes one or more mappings of the table. The zones do not share any mapping of the table. The processors are further configured to form a first log list indicating one or more mapping updates associated with the mapping(s) included in the first zone, to form a second log list indicating one or more mapping updates associated with the mapping(s) included in the second zone, and to replay a portion of the first log list and a portion of the second log list concurrently to update the table.

<CIT> discloses system-, method-, and computer readable device- embodiments for parallel replication of databases across row-store and column-store table formats. An embodiment of this prior art document operates by maintaining a replication log and a storage-level recovery log formatted according to separate respective log formats, logging a record-level SQL execution result, and replicating at least one database table from a primary server to at least one replica server. The primary server and the at least one replica server may each be configured to store data according to one table format of a row-store table format and a column-store table format, such that the primary server's table format is different from the at least one replica server's table format.

<CIT> discloses a plurality of computing devices that are communicatively coupled to each other via a network, wherein each of the plurality of computing devices is operably coupled to one or more of a plurality of storage devices. Each computing device is operable to compress one or more blocks of data and append a journal in front of the data. The journal and the data are written concurrently to flash memory. Each computing device is also operable to maintain a metadata registry that records changes in the flash memory. In the event of a power failure, the journal and previous journals may be used to verify the state of the metadata registry.

Embodiments of the present disclosure provide a storage device with improved reliability and improved performance and an operating method thereof.

According to a partial aspect of an embodiment, a storage device includes a nonvolatile memory device, and a storage controller that controls the nonvolatile memory device and updates metadata based on the control for the nonvolatile memory device, and the storage controller includes a journal data generator that generates a plurality of journal data associated with the update of the metadata, and a journal data replayer that replays the plurality of journal data in parallel to restore the metadata.

According to a partial aspect of an embodiment, an operating method of a storage device which includes a nonvolatile memory device and a storage controller configured to control the nonvolatile memory device includes reading a plurality of journal data from the nonvolatile memory device, splitting the plurality of journal data into a plurality of groups based on dependency of the plurality of journal data, and replaying journal data, respectively included in the plurality of groups in parallel to restore metadata.

According to a partial aspect of an embodiment, a storage device includes a nonvolatile memory device, and a storage controller that controls the nonvolatile memory device. The storage controller includes a journal data generator that generates first to fourth journal data associated with an update of metadata, a first replaying unit, and a second replaying unit. When the metadata is lost, the first and second replaying units are configured to replay the first to fourth journal data to restore the metadata. The first replaying unit replays the first and second journal data, and while the first replaying unit replays the first and second journal data, the second replaying unit replays the third and fourth journal data.

According to a partial aspect of an embodiment, a storage system includes a first storage device, a second storage device, and a host that controls the first and second storage devices and manages metadata for controlling the first and second storage devices. The host includes a journal manager configured to generate a plurality of journal data associated with an update of the metadata. When the metadata are lost, the journal manager replays the plurality of journal data to restore the metadata. The journal manager includes a first replaying unit that replays a plurality of first journal data corresponding to the first storage device from among the plurality of journal data, and a second replaying unit that replays a plurality of second journal data corresponding to the second storage device from among the plurality of journal data while the first replaying unit replays the plurality of first journal data.

According a partial aspect of to an embodiment, a storage system includes a first host, a second host, and a storage device that performs an operation under control of the first and second hosts and manages metadata according to the operation. The storage device includes a journal manager configured to generate a plurality of journal data associated with an update of the metadata. When the metadata is lost, the journal manager replays the plurality of journal data to restore the metadata. The journal manager includes a first replaying unit that replays a plurality of first journal data corresponding to the first host from among the plurality of journal data, and a second replaying unit that replays a plurality of second journal data corresponding to the second host from among the plurality of journal data while the first replaying unit replays the plurality of first journal data.

The above and other objects and features of the present disclosure will become apparent by the detailed description of their embodiments thereof with reference to the accompanying drawings.

Below, embodiments of the present disclosure will be described in such detail and clarity ,that any person of skill in the art may easily implement the invention.

<FIG> is a block diagram illustrating a storage system according to an embodiment of the present disclosure. Referring to <FIG>, a storage system <NUM> may include a host <NUM> and a storage device <NUM>.

The host <NUM> may store data in the storage device <NUM> or may read data stored in the storage device <NUM>. The host <NUM> may control the storage device <NUM> based on a given interface. In an embodiment, the given interface may include one of various interfaces such as an ATA (Advanced Technology Attachment) interface, an SATA (Serial ATA) interface, an e-SATA (external SATA) interface, an SCSI (Small Computer Small Interface) interface, an SAS (Serial Attached SCSI) interface, a PCI (Peripheral Component Interconnection) interface, a PCIe (PCI express) interface, an NVMe (NVM express) interface, an IEEE <NUM> interface, an USB (Universal Serial Bus) interface, an SD (Secure Digital) card interface, an MMC (Multi-Media Card) interface, an eMMC (embedded Multi-Media Card) interface, an UFS (Universal Flash Storage) interface, an eUFS (embedded Universal Flash Storage) interface, and a CF (Compact Flash) card interface.

The storage device <NUM> includes a storage controller <NUM>, a nonvolatile memory device <NUM>, and a buffer memory <NUM>. Under control of the host <NUM>, the storage controller <NUM> stores data in the nonvolatile memory device <NUM> or reads data stored in the nonvolatile memory device <NUM>.

The nonvolatile memory device <NUM> operates under control of the storage controller <NUM>. In an embodiment, the nonvolatile memory device <NUM> may be a NAND flash memory device, however the present disclosure is not limited thereto. For example, the nonvolatile memory device <NUM> may be based on various nonvolatile devices such as a PRAM, an RRAM, and a MRAM or the like.

The buffer memory <NUM> may be configured to temporarily store data to be stored in the nonvolatile memory device <NUM> or data read from the nonvolatile memory device <NUM>. In an embodiment, the buffer memory <NUM> may be a DRAM, however the present disclosure is not limited thereto. For example, the buffer memory <NUM> may include one of various high-speed memories such as an SRAM, a PRAM, a RRAM, and an MRAM or the like.

In an embodiment, the buffer memory <NUM> may store a variety of information (e.g., metadata MD) necessary for the storage device <NUM> to operate. For example, the storage controller <NUM> may manage data stored in the nonvolatile memory device <NUM> through an address translation operation. The address translation operation refers to an operation of translating a logical block address managed by the host <NUM> into a physical block address of the nonvolatile memory device <NUM>. The address translation operation may be performed through a mapping table. The mapping table may be stored in the buffer memory <NUM> so as to be managed.

Below, to describe embodiments of the present disclosure simply,, the description will be given as in the case in which the metadata MD correspond to the mapping table. However, the present disclosure is not limited thereto. For example, the metadata MD may include a variety of information necessary for the storage device <NUM> to operate.

In an embodiment, when the metadata MD is lost due to various causes, the reliability of data stored in the nonvolatile memory device <NUM> is incapable of being guaranteed. To prevent the loss of the metadata MD, the storage controller <NUM> manages journal data including update information of the metadata MD. For example, the storage controller <NUM> may include a journal manager <NUM>. The journal manager <NUM> may write and manage the update information of the metadata MD in the form of journal data. In an embodiment, the journal data that are managed by the journal manager <NUM> may be stored in an internal buffer included in the storage controller <NUM> or may be stored in the buffer memory <NUM> located externally of the storage controller <NUM>.

In an embodiment, when the metadata MD is lost in various situations, the journal manager <NUM> restores the lost metadata MD by replaying the written journal data. For example, the storage controller <NUM> may periodically store the metadata MD of the buffer memory <NUM> in the nonvolatile memory device <NUM>. In the storage system <NUM>, when sudden power-off (SPO) occurs, the storage device <NUM> may perform a sudden power-off operation by using an internal power source (e.g., a capacitor power). In this case, because a capacity of the metadata MD present in the buffer memory <NUM> is relatively large, the metadata MD may not be flushed to the nonvolatile memory device <NUM>. That is, in the sudden power-off, the metadata MD stored (or present) in the nonvolatile memory device <NUM> may not be the latest version; in this case, partial information of the metadata MD may be lost. In contrast, because a capacity of journal data managed by the journal manager <NUM> is relatively small, in a sudden power-off, the journal data may be flushed to the nonvolatile memory device <NUM>. Afterwards, when the storage system <NUM> is powered on, the storage controller <NUM> may restore the metadata MD by replaying the journal data flushed to the nonvolatile memory device <NUM>.

In general, the replay for journal data is sequentially performed in the order of writing journal data. In such a case, a time taken to replay journal data may increase, thereby causing an increase in a time taken to restore the metadata MD. In contrast, according to the present disclosure, the storage controller <NUM> (or the journal manager <NUM>) splits the journal data into a plurality of groups based on the dependency of journal data and replays portions of journal data of the split groups in parallel. By performing a replay operation on journal data in parallel, a time taken to restore the metadata MD is shortened. Also, because the journal data to be replayed in parallel is split based on the dependency of the journal data, the reliability of metadata may be guaranteed. A journal data management method of the storage controller <NUM> according to embodiments of the present disclosure will be described in detail with reference to the following drawings.

<FIG> is a flowchart illustrating an operation of a storage device of <FIG>. Below, to describe embodiments of the present disclosure clearly, it is assumed that the metadata MD correspond to the mapping table. However, the present disclosure is not limited thereto. For example, the metadata MD may include a variety of other information. Below, it is assumed that a situation in which the metadata MD are restored, is a situation in which a power is turned on after the sudden power-off. However, the present disclosure is not limited thereto. For example, the situation in which the metadata MD are restored may include various different other situations. For example, when an error occurs in the metadata MD while the storage device <NUM> operates, the storage controller <NUM> may restore the metadata MD through the replay operation of journal data as described below.

Referring to <FIG> and <FIG>, in operation S110, the storage device <NUM> may write journal data associated with the update of the metadata MD. For example, the storage controller <NUM> may perform various operations (e.g., a read operation, a write operation, and an erase operation) for the nonvolatile memory device <NUM>. In this case, the metadata MD may be updated, and the journal manager <NUM> of the storage controller <NUM> may write journal data associated with the update of the metadata MD.

In operation S120, the storage device <NUM> may sense the sudden power-off. For example, the storage device <NUM> may sense the sudden power-off by detecting a voltage drop of a power supply voltage provided from the host <NUM> or an external power supply (e.g., a power management integrated circuit (PMIC)). When the sudden power-off is not sensed, the storage device <NUM> continues to perform operation S110.

When the sudden power-off is sensed, in operation S130, the storage device <NUM> may flush the journal data to the nonvolatile memory device <NUM>. For example, when the sudden power-off occurs, the storage controller <NUM> of the storage device <NUM> may flush a variety of information or important information present in the buffer memory <NUM> or the internal memory to the nonvolatile memory device <NUM> by using auxiliary power. The data flushed to the nonvolatile memory device <NUM> may include the journal data. In an embodiment, the journal data may be programmed in a given region of the nonvolatile memory device <NUM> in a high-speed program manner or a single level cell (SLC) program manner.

In operation S140, the storage device <NUM> may be powered on. In operation S150, the storage device <NUM> reads the journal data from the nonvolatile memory device <NUM>. For example, the storage controller <NUM> may read data from the given region of the nonvolatile memory device <NUM>.

In operation S160, the storage device <NUM> splits the journal data based on the dependency of the journal data. To perform the replay operation on the journal data in parallel, the journal manager <NUM> of the storage controller <NUM> splits the journal data into a plurality groups. In such case, to perform the replay operation on the journal data in parallel, there should be no dependency between journal data to be replayed at the same time or non-sequentially. In an embodiment, the dependency of the journal is determined based on an opcode associated with the journal data. A configuration associated with the dependency of the journal data will be described in detail with reference to the drawings.

In operation S170, the storage device <NUM> replays the journal data in parallel to restore the metadata MD. For example, the journal manager <NUM> of the storage controller <NUM> replays the journal data in parallel by a split group unit.

As described above, the storage controller <NUM> according to an embodiment of the present disclosure restores the metadata MD by replaying the journal data in parallel based on the dependency of the journal data. That is, the journal data may be replayed in a non-sequential order different from the order of generating the journal data (i.e., the order of updating metadata); nevertheless, the metadata MD may be normally restored. In this case, compared to the case of replaying the journal data sequentially, a time taken to restore the metadata MD may be shortened.

<FIG> is a block diagram for describing an operation in which a journal manager included in a storage controller of <FIG> generates journal data. <FIG> is a diagram illustrating journal data stored in a journal memory of <FIG>. <FIG> is a block diagram for describing a replay operation of a journal manager included in the storage controller of <FIG>. For convenience of description, components that are unnecessary to describe an operation of a journal manager are omitted.

Referring to <FIG> and <FIG>, the storage controller <NUM> of the storage device <NUM> may perform various operations (e.g., a read operation, a write operation, and an erase operation) on the nonvolatile memory device <NUM>. As various operations are performed on the nonvolatile memory device <NUM>, the metadata MD stored in the buffer memory <NUM> may be updated. In an embodiment, the update of the metadata MD may be performed by a flash translation layer (FTL) included in the storage controller <NUM>.

The journal manager <NUM> may manage journal data JNL based on update information of the metadata MD. For example, the journal manager <NUM> includes a journal data generator 111a, a journal memory 111b, and a journal data replayer 111c.

The journal data generator 111a generates the journal data JNL based on the update information of the metadata MD. That is, the journal data JNL may include information indicating how the metadata MD is updated; in the case where partial information of the metadata MD is lost, the lost information may be restored through the journal data JNL.

The journal data JNL generated by the journal data generator 111a may be stored in the journal memory 111b. In an embodiment, the journal memory 111b may be an internal memory, an internal buffer, or an internal SRAM included in the storage controller <NUM>. Alternatively although not illustrated in drawings, the journal memory 111b may be implemented with a part of the buffer memory <NUM> located externally of the storage controller <NUM>.

The journal memory 111b may accumulate and store the journal data JNL generated from the journal data generator 111a. For example, as illustrated in <FIG>, as the metadata MD is updated, the journal data generator 111a may sequentially generate a plurality of journal data JNL_A0, JNL_B0, JNL_C0, JNL_D0 JNL_A1, JNL_C1, JNL_B1, JNL_A2, JNL_D1, JNL_B2, JNL_D2, and JNL_C2. The plurality of journal data JNL_A0, JNL_B0, JNL_C0, JNL_D0 JNL_A1, JNL_C1, JNL_B1, JNL_A2, JNL_D1, JNL_B2, JNL_D2, and JNL_C2 may be sequentially written or stored in the journal memory 111b based on the order of generating journal data. In an embodiment, the order of generating a plurality journal data may be associated with the order of updating the metadata MD.

In an embodiment, while the storage device <NUM> is driven, the metadata MD present in the buffer memory <NUM> may be flushed to the nonvolatile memory device <NUM> periodically or non-periodically (or randomly).

In an embodiment, when the sudden power-off occurs in the storage device <NUM>, the journal data JNL present in the journal memory 111b may be flushed to the nonvolatile memory device <NUM>. In an embodiment, in the nonvolatile memory device <NUM>, a region in which the metadata MD and the journal data JNL are stored may be an SLC region.

The journal data replayer 111c is configured to replay journal data for the purpose of restoring the metadata MD. For example, as illustrated in <FIG>, when the storage device <NUM> is powered on after a sudden power-off, the metadata MD present in the nonvolatile memory device <NUM> may be loaded or stored onto the buffer memory <NUM>. In this case, as described above, the metadata MD present in the nonvolatile memory device <NUM> may not be the latest version; in such a case, the reliability of data present in the nonvolatile memory device <NUM> is incapable of being guaranteed. Accordingly, there may be required an operation for restoring the latest version of the metadata MD.

The journal data replayer 111c of the journal manager <NUM> restores the latest version of the metadata MD by replaying the journal data JNL present in the nonvolatile memory device <NUM>. For example, the journal data replayer 111c reads the journal data JNL from the nonvolatile memory device <NUM>. The journal data replayer 111c restores the metadata MD by splitting the journal data JNL into a plurality of groups based on the dependency of the journal data JNL and replaying the journal data JNL individually or in parallel depending on the split groups.

<FIG> is a block diagram for describing a journal data replayer of <FIG>. Referring to <FIG> and <FIG>, the journal data replayer 111c includes a journal data splitting unit SPL and a plurality of journal data replaying units RP0 to RP3. Hereinafter, for convenience of description, the journal data replaying unit may be referred to as a "replaying unit". In an embodiment, the number of replaying units included in the journal data replayer 111c may be variously changed.

The journal data splitting unit SPL receives the journal data JNL from the nonvolatile memory device <NUM>. The journal data splitting unit SPL splits the journal data JNL into a plurality of groups based on the dependency of the journal data JNL. For example, it is assumed that the journal data JNL have the data structure described with reference to <FIG>. In this case, the A-th journal data JNL_A (including JNL_A0, JNL_A1, and JNL_A2), the B-th journal data JNL_B (including JNL_B0, JNL_B1, and JNL_B2), the C-th journal data JNL_C (including JNL_C0, JNL_C1, and JNL_C2), and the D-th journal data JNL_D0 (including JNL_D0, JNL_D1, and JNL_D2) may not have the dependency mutually.

That there is no dependency between journal data may mean that the journal data are not associated with each other temporally or spatially. For example, in the case where first journal data and second journal data are spatially associated with each other and are sequentially written, the metadata MD may be normally restored only in the following manner: <NUM>) the first journal data are first replayed, and <NUM>) the second journal data are then replayed. In the case where the first and second journal data are replayed at the same time or in parallel or in the case where the second journal data are first replayed, the metadata MD is incapable of being restored. In this case, the first and second journal data may be determined as having the dependency mutually.

In contrast, in the case where third journal data and fourth journal data are not associated with each other temporally or spatially, the metadata MD may be normally restored by replaying the third and fourth journal data regardless of the order of replaying the third and fourth journal data. In this case, even though the third and fourth journal data are replayed at the same time or in parallel, the metadata MD may be normally restored. That is, the third and fourth journal data may be determined as having no dependency mutually.

That is, the journal data JNL of <FIG>, the A-th journal data JNL_A (including JNL_A0, JNL_A1, and JNL_A2) may have the mutual dependency but may not have the dependency with the remaining journal data JNL_B, JNL_C, and JNL_D; the B-th journal data JNL_B (including JNL_B0, JNL_B1, and JNL_B2) may have the mutual dependency but may not have the dependency with the remaining journal data JNL_A, JNL_C, and JNL_D; the C-th journal data JNL_C (including JNL_C0, JNL_C1, and JNL_C2 may have the mutual dependency but may not have the dependency with the remaining journal data JNL_A, JNL_B, and JNL_D; the D-th journal data JNL_D (including JNL_D0, JNL_D1, and JNL_D2) may have the mutual dependency but may not have the dependency with the remaining journal data JNL_A, JNL_B, and JNL_C.

In an embodiment, the dependency between journal data is determined based on an opcode indicating an operation of journal data.

The A-th journal data JNL_A split by the journal data splitting unit SPL may be provided to the <NUM>-th replaying unit RP0; the B-th journal data JNL_B split by the journal data splitting unit SPL may be provided to the first replaying unit RP1; the C-th journal data JNL_C split by the journal data splitting unit SPL may be provided to the second replaying unit RP2; the D-th journal data JNL_D split by the journal data splitting unit SPL may be provided to the third replaying unit RP3.

The <NUM>-th to third replaying units RP0 to RP3 may respectively replay the A-th to D-th journal data JNL_A, JNL_B, JNL_C, and JNL_D individually or in parallel, and thus, the metadata MD may be restored. In an embodiment, as described above, because the A-th to D-th journal data JNL_A, JNL_B, JNL_C, and JNL_D have no dependency mutually, even though the A-th to D-th journal data JNL_A, JNL_B, JNL_C, and JNL_D are replayed at the same time or in parallel, the metadata MD may be normally restored.

In an embodiment, journal data with the dependency may be replayed by one replaying unit depending on a given order. For example, the A-th journal data JNL_A (including JNL_A0, JNL_A1, and JNL_A2) may be replayed by the <NUM>-th replaying unit RP0. In this case, the A-th journal data JNL_A (including JNL_A0, JNL_A1, and JNL_A2) may be replayed depending on the written order (i.e., JNL_A0 → JNL_A1 → JNL_A2).

<FIG> is a diagram for describing a configuration of journal data managed by a journal manager of <FIG> in detail. To describe an embodiment of the present disclosure clearly, it is assumed that the storage device <NUM> repeatedly performs the write operation for a first logical block address LBA1 depending on a request of the host <NUM> or under control of the host <NUM>.

For example, referring to <FIG> and <FIG>, the storage device <NUM> may perform a first write operation (1st WR) for the first logical block address LBA1 depending on the request of the host <NUM>. In this case, the storage controller <NUM> of the storage device <NUM> may allocate or map a first physical block address PBA1 of the nonvolatile memory device <NUM> to the first logical block address LBA1. In addition, the storage controller <NUM> may write information about the first logical block address LBA1 and the first physical block address PBA1 in a mapping table L2P Map being the metadata MD and may set first valid information VPB1 (marked by "S" in <FIG>). That is, after the first write operation for the first logical block address LBA1 is completed, the mapping table L2P Map being the metadata MD may include the correspondence information of the first logical block address LBA1 and the first physical block address PBA1 and the first valid information VPB1.

The journal manager <NUM> may be configured to write the update information of the metadata MD described above. For example, the journal manager <NUM> may generate, as journal data, first mapping journal data JNL_L2P_1 associated with the update operation (i.e., Write L2P) of writing the correspondence information of the first logical block address LBA1 and the first physical block address PBA1. Afterwards, the journal manager <NUM> may generate, journal data, first valid set journal data JNL_VPBSET_1 associated with the update operation (i.e., Set_VPB1) of setting the first valid information VPB1 indicating validity of the correspondence information of the first logical block address LBA1 and the first physical block address PBA1.

The first mapping journal data JNL_L2P_1 and the first valid set journal data JNL_VPBSET_1 may be stored in the journal memory 111b sequentially or in order.

Afterwards, the storage device <NUM> may perform the second write operation (2nd WR) for the first logical block address LBA1. In this case, the storage controller <NUM> may allocate or map a second physical block address PBA2 of the nonvolatile memory device <NUM> to the first logical block address LBA1.

In addition, the storage controller <NUM> may write information about the first logical block address LBA1 and the second physical block address PBA2 in the mapping table L2P Map being the metadata MD, may clear the first valid information VPB1 (marked by "C" in <FIG>), and may set second valid information VPB2. That is, after the second write operation for the first logical block address LBA1 is completed, the mapping table L2P Map being the metadata MD may include the correspondence information of the first logical block address LBA1 and the first physical block address PBA1, the first valid information VPB1, correspondence information of the first logical block address LBA1 and the second physical block address PBA2, and the second valid information VPB2. In this case, because the first valid information VPB1 is cleared (C) and the second valid information VPB2 is set (S), after the second write operation is completed, the access to the first logical block address LBA1 may be performed based on the second physical block address PBA2.

As in the above description, the journal manager <NUM> may be configured to write the update information of the metadata MD described above. For example, the journal manager <NUM> may generate, as journal data, second mapping journal data JNL_L2P_2 associated with the update operation (i.e., Write L2P) of writing the correspondence information of the first logical block address LBA1 and the second physical block address PBA2. Afterwards, the journal manager <NUM> may generate, journal data, first valid clear journal data JNL_VPBCLR_1 associated with the update operation (i.e., Clear _VPB1) of clearing the first valid information VPB1 indicating the validity of the correspondence information of the first logical block address LBA1 and the first physical block address PBA1. Afterwards, the journal manager <NUM> may generate, journal data, second valid set journal data JNL_VPBSET_2 associated with the update operation (i.e., Set_VPB2) of setting the second valid information VPB2 indicating validity of the correspondence information of the first logical block address LBA1 and the second physical block address PBA2.

The second mapping journal data JNL_L2P_2, the first valid clear journal data JNL_VPBCLR_1, and the second valid set journal data JNL_VPBSET_2 may be stored in the journal memory 111b sequentially or in order.

Afterwards, the storage device <NUM> may perform a third write operation (3rd WR) for the first logical block address LBA1. In the third write operation (3rd WR), the storage controller <NUM> may allocate or map a third physical block address PBA3 of the nonvolatile memory device <NUM> to the first logical block address LBA1. In this case, as described above, an operation (i.e., Write L2P) of writing correspondence information of the first logical block address LBA1 and the third physical block address PBA3 in the mapping table L2P Map, an operation (i.e., Clear_VPB2) of clearing the second valid information VPB2, and an operation (i.e., Set_VPB3) of setting third valid information VPB3 may be performed.

The journal manager <NUM> may be configured to write the update information of the metadata MD described above. For example, the journal manager <NUM> may generate, as journal data, third mapping journal data JNL_L2P_3 associated with the update operation (i.e., Write L2P) of writing the correspondence information of the first logical block address LBA1 and the third physical block address PBA3. Afterwards, the journal manager <NUM> may generate, journal data, second valid clear journal data JNL_VPBCLR_2 associated with the update operation (i.e., Clear_VPB2) of clearing the second valid information VPB2 indicating the validity of the correspondence information of the first logical block address LBA1 and the second physical block address PBA2. Afterwards, the journal manager <NUM> may generate, journal data, third valid set journal data JNL_VPBSET_3 associated with the update operation (i.e., Set_VPB3) of setting the third valid information VPB3 indicating validity of the correspondence information of the first logical block address LBA1 and the third physical block address PBA3.

The third mapping journal data JNL_L2P_3, the second valid clear journal data JNL_VPBCLR_2, and the third valid set journal data JNL_VPBSET_3 may be stored in the journal memory 111b sequentially or in order.

As described above, the journal manager <NUM> generates the journal data JNL associated with the update of the metadata MD, and the generated journal data JNL may be stored in the journal memory 111b sequentially (e.g., in the order of updating the metadata MD).

In an embodiment, when a sudden power-off occurs in the storage device <NUM>, the journal data JNL present in the journal memory 111b may be flushed to the nonvolatile memory device <NUM>.

<FIG> is a diagram for describing a configuration in which journal data is replayed in parallel by a journal manager of <FIG> in detail. For convenience of description, it is assumed that the journal data JNL that are replayed by the journal manager <NUM> is the journal data JNL described with reference to <FIG>.

Referring to <FIG>, <FIG>, <FIG>, and <FIG>, the journal data replayer 111c of the journal manager <NUM> reads the journal data JNL from the nonvolatile memory device <NUM> and replays the journal data JNL in parallel based on the dependency of the journal data JNL.

For example the journal data splitting unit SPL splits the journal data JNL based on the dependency of the journal data JNL. In detail, the journal data JNL flushed in the nonvolatile memory device <NUM> in a sudden power-off may include the following journal data: JNL _L2P_1, JNL_VPBSET_1, JNL_L2P_2, JNL_VPBCLR_1, JNL_VPBSET_2, JNL_L2P_3, JNL_VPBCLR_2, and JNL_VPBSET_3. In this case, the journal data splitting unit SPL may classify the journal data JNL _L2P_1, JNL_L2P_2, and JNL_L2P_3 as a first group, may classify the journal data JNL_VPBSET_1 and JNL_VPBCLR_1 as a second group, may classify the journal data JNL_VPBSET_2 and JNL_VPBCLR _2 as a third group, and may classify the journal data JNL_VPBSET_3 as a fourth group.

In the above split of the journal data, the journal data of each group do not have the dependency mutually. For example, although the journal data (e.g., JNL_L2P_1, JNL_L2P_2, and JNL _L2P_3) of the first group and the journal data (e.g., JNL_VPBSET_1 and JNL_VPBCLR_1) of the second group are replayed at the same time or in parallel, the metadata MD are normally restored. In contrast, when the journal data (e.g., JNL_VPBSET_1 and JNL_VPBCLR_1) of the second group are replayed at the same time or in parallel, a final value of the second valid information VPB2 may correspond to a set (S) state, which is different from an actual state of the second valid information VPB2.

That is, the journal data splitting unit SPL splits the journal data into a plurality of groups based on the dependency of the journal data. The dependency of the journal data is determined based on opcode information included in the journal data.

The journal data JNL split into the plurality of groups by the journal data splitting unit SPL is respectively provided to the plurality of replaying units RP0 to RP3. Each of the plurality of replaying units RP0 to RP3 restores the metadata MD based on the received journal data JNL.

For example, the <NUM>-th replaying unit RP0 may receive the journal data (e.g., JNL_L2P_1, JNL_L2P_2, and JNL_L2P_3) of the first group and may update L2P information (i.e., correspondence information of a logical block address and a physical block address) of the metadata MD based on the received journal data.

The first replaying unit RP1 may receive the journal data (e.g., JNL_VPBSET_1 and JNL_VPBCLR_1) of the second group and may update the first valid information VPB1 of the metadata MD based on the received journal data.

The second replaying unit RP2 may receive the journal data (e.g., JNL_VPBSET_2 and JNL_VPBCLR_2) of the third group and may update the second valid information VPB2 of the metadata MD based on the received journal data.

The third replaying unit RP3 may receive the journal data (e.g., JNL_VPBSET_3) of the fourth group and may update the third valid information VPB3 of the metadata MD based on the received journal data.

A conventional journal data replayer replays journal data one by one sequentially depending on the order of generating or writing the journal data. In this case, a speed at which the metadata MD is restored may be relatively slow. In contrast, as described above, the journal data replayer 111c according to an embodiment of the present disclosure includes the plurality of replaying units RP0 to RP3 and replays the journal data JNL in parallel through the replaying units RP0 to RP3 based on the dependency of the journal data JNL. In this case, because the journal data is replayed at the same time or in parallel by the plurality of replaying units RP0 to RP3, an operating speed at which the metadata MD is restored may be improved.

<FIG> is a timing diagram for describing an operation of a journal data replayer of <FIG>. Referring to <FIG> and <FIG>, the journal data replayer 111c reads the journal data JNL from the nonvolatile memory device <NUM>. In an embodiment, the operation of reading the journal data JNL from the nonvolatile memory device <NUM> may be performed in an SLC read manner. The journal data replayer 111c splits the read journal data JNL into a plurality of groups. Next, the journal data replayer 111c replays the journal data JNL in parallel by using the plurality of replaying units RP0 to RP3.

In this case, as illustrated in <FIG>, the journal data read operation, the journal data split operation, and the journal data replay operation of the journal data replayer 111c may be performed in a pipeline manner, and thus, a metadata restoration speed may be improved.

<FIG> is a diagram illustrating a format of journal data according to an embodiment of the present disclosure. <FIG> is a diagram for describing an operation in which journal data is replayed in parallel based on a journal address field of journal data of <FIG>.

In an embodiment, the format of the journal data JNL illustrated in <FIG> is only an example, and the present disclosure is not limited thereto. The format of the journal data JNL may be variously changed or modified. Referring to <FIG>, the journal data JNL may include a journal opcode field, a journal address field, and a data field.

The journal opcode field includes information about an operation that is updated in replaying the journal data JNL. The journal address field may indicate a location (e.g., a location of the buffer memory <NUM>) of updated metadata in replaying the journal data JNL. The data field may indicate a value that is updated in replaying the journal data JNL.

In an embodiment, the splitting manner of the journal data splitting unit SPL described with reference to <FIG> is performed based on the journal opcode field of the journal data JNL. The journal data splitting unit SPL checks the journal opcode field of the journal data JNL read from the nonvolatile memory device <NUM> and splits the journal data JNL into a plurality of groups based on the journal opcode field.

In an embodiment, not covered by the invention, the journal data splitting unit SPL may split the journal data JNL into the plurality of groups based on the journal address field of the journal data JNL. For example, as illustrated in <FIG>, the metadata MD may be stored or managed within a given address range of the buffer memory <NUM>. The given address range of the buffer memory <NUM> may include <NUM>-th to third address ranges AR_0, AR_1, AR_2, and AR_3.

When the journal data JNL is replayed, data or information of the metadata MD, which is included in the <NUM>-th address range AR_0, may be updated by the <NUM>-th replaying unit RP0; data or information of the metadata MD, which is included in the first address range AR_1, may be updated by the first replaying unit RP1; data or information of the metadata MD, which is included in the second address range AR_2, may be updated by the second replaying unit RP2; data or information of the metadata MD, which is included in the third address range AR_3, may be updated by the third replaying unit RP3.

In this case, because the metadata MD respectively included in the <NUM>-th to third address ranges AR_0, AR_1, AR_2, and AR_3 are distinguished from each other physically or logically, the metadata MD may be normally restored even though updated in parallel. That is, journal data respectively corresponding to the <NUM>-th to third address ranges AR_0, AR_1, AR_2, and AR_3 do not have the dependency mutually. In detail, when the journal address field of the first journal data is included in the first address range AR_1 and the journal address field of the second journal data is included in the second address range AR_2, there may be no dependency between the first journal data and the second journal data, and thus, the first journal data and the second journal data may be replayed at the same time or in parallel.

The journal data splitting unit SPL determines the dependency between journal data based on the opcode field of the journal data described above and provides the journal data to different replaying units such that the journal data having no mutual dependency are replayed at the same time or in parallel.

<FIG> is a diagram for describing an operation of a journal data replayer of <FIG>. In the above embodiments, the description is given as the journal data splitting unit SPL splits the journal data JNL based on the dependency of the journal data JNL and provides the journal data of the groups to the plurality of replaying units RP0 to RP3, respectively.

For example, as illustrated in <FIG>, the journal data replayer 111c includes the journal data splitting unit SPL and the plurality of replaying units RP0 to RP3. The journal data splitting unit SPL receives the journal data JNL from the nonvolatile memory device <NUM>. The journal data splitting unit SPL splits the journal data JNL into a plurality of groups based on the methods described with reference to <FIG>.

The journal memory 111b may be divided into a plurality of journal memory units JM0 to JM3. The plurality of journal memory units JM0 to JM3 may indicate memory regions distinguished from each other physically or logically within the journal memory 111b. The journal data split by the journal data splitting unit SPL may be stored in a corresponding journal memory unit of the plurality of journal memory units JM0 to JM3. For example, the A-th journal data JNL_A classified as the first group may be stored in the <NUM>-th journal memory unit JM0; the B-th journal data JNL_B classified as the second group may be stored in the first journal memory unit JM1; the C-th journal data JNL_C classified as the third group may be stored in the second journal memory unit JM2; the D-th journal data JNL_D classified as the fourth group may be stored in the third journal memory unit JM3.

Each of the plurality of replaying units RP0 to RP3 of the journal data replayer 111c may be configured to replay journal data stored in the corresponding one of the journal memory units JM0, JM1, JM2, and JM3. For example, the <NUM>-th replaying unit RP0 may sequentially replay the A-th journal data JNL_A stored in the <NUM>-th journal memory unit JM0; the first replaying unit RP1 may sequentially replay the B-th journal data JNL_B stored in the first journal memory unit JM1; the second replaying unit RP2 may sequentially replay the C-th journal data JNL_C stored in the second journal memory unit JM2; the third replaying unit RP3 may sequentially replay the D-th journal data JNL_D stored in the third journal memory unit JM3.

<FIG> is a block diagram for describing an operation of a journal data generator of <FIG>. Referring to <FIG>, <FIG>, and <FIG>, a journal data generator 111a-<NUM> of the journal manager <NUM> includes journal data generating logic 111a-1a and replaying unit allocation logic 111a-1b. The journal data generating logic 111a-1a generates the journal data JNL based on update information of metadata. In an embodiment, the journal data JNL generated by the journal data generating logic 111a-1a may have the format of <FIG>, but the present disclosure is not limited thereto. For example, the journal data JNL generated by the journal data generating logic 111a-1a may have various formats.

In the above embodiments, the generated journal data JNL are stored in the journal memory 111b. In contrast, in the embodiment of <FIG>, before the generated journal data JNL are stored in the journal memory 111b, the generated journal data JNL are provided to the replaying unit allocation logic 111a-1b. The replaying unit allocation logic 111a-1b may allocate a replaying unit, which will replay the journal data JNL later, based on the dependency of the journal data JNL. The replaying unit is allocated to the journal data JNL through an operation and a configuration that are similar to the operation and the configuration of the journal data splitting unit SPL described above, and thus, additional description will be omitted to avoid redundancy.

The replaying unit allocation logic 111a-1b may generate internal journal data JNL_in by adding an identifier field RP_ID including information about the allocated replaying unit to the journal data JNL. The internal journal data JNL_in may be stored in the journal memory 111b. In this case, when the journal data JNL are replayed later, the journal data splitting unit SPL splits the journal data JNL by checking the identifier field RP_ID.

That is, according to the embodiment of <FIG>, the journal manager <NUM> may allocate in advance a replaying unit, which will replay journal data later, based on the dependency of the journal data in the process of generating the journal data and may add the identifier field RP_ID including information about the allocated replaying unit to the journal data JNL. Afterwards, when the journal data JNL is replayed, the journal manager <NUM> may provide the journal data JNL to a replaying unit allocated to the journal data JNL from among a plurality of replaying units, based on a result of checking the identifier field RP_ID of the journal data JNL. As such, the journal data may be replayed in parallel.

<FIG> is a block diagram for describing the operation of a journal data generator of <FIG>. Referring to <FIG>, <FIG>, and <FIG>, a journal data generator 111a-<NUM> includes journal data generating logic 111a-2a and replaying unit allocation logic 111a-2b. The journal data generating logic 111a-2a is similar to the journal data generating logic 111a-1a described with reference to <FIG>, and thus, additional description will be omitted to avoid redundancy.

The replaying unit allocation logic 111a-2b may allocate a replaying unit, which will replay the journal data JNL later, based on the dependency of the journal data JNL. The replaying unit is allocated to the journal data JNL through an operation and a configuration that are similar to the operation and the configuration of the journal data splitting unit SPL described above, and thus, additional description will be omitted to avoid redundancy.

The replaying unit allocation logic 111a-2b may store journal data in a journal memory unit corresponding to a replaying unit allocated to the journal data. For example, the journal data generating logic 111a-2a may generate the A-th, B-th, C-th, and D-th journal data JNL_A, JNL_B, JNL_C, and JNL_D. The A-th, B-th, C-th, and D-th journal data JNL_A, JNL_B, JNL_C, and JNL_D may be journal data having no mutual dependency. In this case, the replaying unit allocation logic 111a-2b may allocate the A-th journal data JNL_A to the <NUM>-th replaying unit RP0, may allocate the B-th journal data JNL_B to the first replaying unit RP1, may allocate the C-th journal data JNL_C to the second replaying unit RP2, and may allocate the D-th journal data JNL_D to the third replaying unit RP3.

The replaying unit allocation logic 111a-2b may store the A-th journal data JNL_A in the <NUM>-th journal memory unit JM0 of a journal memory 111b-<NUM>, may store the B-th journal data JNL_B in the first journal memory unit JM1 of the journal memory 111b-<NUM>, may store the C-th journal data JNL_C in the second journal memory unit JM2 of the journal memory 111b-<NUM>, and may store the D-th journal data JNL_D in the third journal memory unit JM3 of the journal memory 111b-<NUM>. The <NUM>-th to third journal memory units JM0 to JM3 may be memory regions distinguished from each other physically or logically in the journal memory 111b-<NUM>.

As described above, replaying unit allocation logic may store journal data in different journal memory units depending on replaying units respectively allocated to the journal data. In an embodiment, the journal data JNL stored in the journal memory 111b-<NUM> through the operation of <FIG> may be flushed to the nonvolatile memory device <NUM>.

<FIG> is a diagram for describing how journal data generated by the journal data generator of <FIG> are replayed. Referring to <FIG>, <FIG>, <FIG>, and <FIG>, the journal data JNL present in the nonvolatile memory device <NUM> may be loaded onto the journal memory 111b-<NUM>. In an embodiment, the journal data JNL_A, JNL_B, JNL_C, and JNL_D may be loaded at locations of the journal memory 111b-<NUM>, which are the same as the locations where the journal data JNL_A, JNL_B, JNL_C, and JNL_D are stored by the replaying unit allocation logic 111a-2b. For example, like the manner in which journal data are stored by the replaying unit allocation logic 111a-2b, the A-th journal data JNL_A read from the nonvolatile memory device <NUM> may be loaded onto the <NUM>-th journal memory unit JM0; the B-th journal data JNL_B read from the nonvolatile memory device <NUM> may be loaded onto the first journal memory unit JM1; the C-th journal data JNL_C read from the nonvolatile memory device <NUM> may be loaded onto the second journal memory unit JM2; the D-th journal data JNL_D read from the nonvolatile memory device <NUM> may be loaded onto the third journal memory unit JM3.

In an embodiment, the above way to load the journal data JNL may be accomplished by flushing and loading the entire journal data present in the journal memory 111b-<NUM> in the form of a packet or an image.

Afterwards, the A-th journal data JNL_A loaded onto the <NUM>-th journal memory unit JM0 may be replayed by the <NUM>-th replaying unit RP0; the B-th journal data JNL_B loaded onto the first journal memory unit JM1 may be replayed by the first replaying unit RP1; the C-th journal data JNL_C loaded onto the second journal memory unit JM2 may be replayed by the second replaying unit RP2; the D-th journal data JNL_D loaded onto the third journal memory unit JM3 may be replayed by the third replaying unit RP3. Accordingly, the parallel replay of journal data may be accomplished.

<FIG> is a block diagram illustrating a host-storage system according to an embodiment of the present disclosure. Referring to <FIG>, a host-storage system <NUM> may include a host <NUM> and a storage device <NUM>. Also, the storage device <NUM> may include a storage controller <NUM> and a nonvolatile memory (NVM) <NUM>. Also, according to an embodiment of the present disclosure, the host <NUM> may include a host controller <NUM> and a host memory <NUM>. The host memory <NUM> may function as a buffer memory for temporarily storing data to be sent to the storage device <NUM> or data sent from the storage device <NUM>.

The storage device <NUM> may include storage mediums for storing data depending on a request from the host <NUM>. As an example, the storage device <NUM> may include at least one of a solid state drive (SSD), an embedded memory, and a detachable external memory. In the case where the storage device <NUM> is an SSD, the storage device <NUM> may be a device complying with the non-volatile memory express (NVMe) standard. In the case where the storage device <NUM> is an embedded memory or an external memory, the storage device <NUM> may be a device complying with the universal flash storage (UFS) or embedded multi-media card (eMMC) standard. Each of the host <NUM> and the storage device <NUM> may generate a packet complying with a standard protocol applied thereto and may transmit the generated packet.

When the nonvolatile memory <NUM> of the storage device <NUM> includes a flash memory, the flash memory may include a two-dimensional (2D) NAND flash memory array or a three-dimensional (3D) (or vertical) NAND (VNAND) memory array. As another example, the storage device <NUM> may be implemented with various kinds of different nonvolatile memories. For example, the storage device <NUM> may include a magnetic RAM (MRAM), a spin-transfer torque MRAM (STT-MRAM), a conductive bridging RAM (CBRAM), a ferroelectric RAM (FeRAM), a phase change RAM (PRAM), a resistive RAM (RRAM), or at least one of various kinds of different memories.

According to an embodiment, the host controller <NUM> and the host memory <NUM> may be implemented with separate semiconductor chips. Alternatively, in some embodiments, the host controller <NUM> and the host memory <NUM> may be implemented in the same semiconductor chip. As an example, the host controller <NUM> may be one of a plurality of modules included in an application processor; in this case, the application processor may be implemented with a system on chip (SoC). Also, the host memory <NUM> may be an embedded memory included in the application processor or may be a nonvolatile memory or a memory module disposed externally of the application processor.

The host controller <NUM> may manage an operation of storing data (e.g., write data) of a buffer area of the host memory <NUM> in the nonvolatile memory <NUM> or storing data (e.g., read data) of the nonvolatile memory <NUM> in the buffer area.

The storage controller <NUM> may include a host interface <NUM>, a memory interface <NUM>, central processing unit (CPU) <NUM>. Also, the storage controller <NUM> may further include a flash translation layer (FTL) <NUM>, a journal manager <NUM>, a buffer memory <NUM>, an error correction code (ECC) engine <NUM>, an advanced encryption standard (AES) engine <NUM>. The storage controller <NUM> may further include a working memory (not illustrated) onto which the flash translation layer <NUM> is loaded, and data write and read operations of the nonvolatile memory <NUM> may be controlled as the CPU <NUM> executes the flash translation layer <NUM>.

The host interface <NUM> may exchange packets with the host <NUM>. The packet that is transmitted from the host <NUM> to the host interface <NUM> may include a command or data to be written in the nonvolatile memory <NUM>, and the packet that is transmitted from the host interface <NUM> to the host <NUM> may include a response to the command or data read from the nonvolatile memory <NUM>. The memory interface <NUM> may provide the nonvolatile memory <NUM> with data to be written in the nonvolatile memory <NUM>, and may receive data read from the nonvolatile memory <NUM>. The memory interface <NUM> may be implemented to comply with a standard such as Toggle or ONFI (Open NAND Flash Interface).

The flash translation layer <NUM> may perform various functions (or operations) such as address mapping, wear-leveling, and garbage collection. The address mapping operation refers to an operation of translating a logical address received from the host <NUM> into a physical address to be used to actually store data in the nonvolatile memory <NUM>. Wear-leveling, that is a technology for allowing blocks in the nonvolatile memory <NUM> to be used uniformly such that excessive degradation of a specific block is prevented may be implemented, for example, through a firmware technology for balancing erase counts of physical blocks. The garbage collection refers to a technology for securing an available capacity of the nonvolatile memory <NUM> through a way to erase an existing block after copying valid data of the existing block to a new block. In an embodiment, the flash translation layer <NUM> may be configured to manage and update the metadata MD, which is described with reference to <FIG>.

The journal manager <NUM> may manage and store various journal data associated with the update of various metadata that are managed by the storage device <NUM>. In an embodiment, the journal manager <NUM> may be the journal manager described with reference to <FIG>.

The buffer memory <NUM> may temporarily store data to be written in the nonvolatile memory <NUM> or data read from the nonvolatile memory <NUM>. The buffer memory <NUM> may be a component provided within the storage controller <NUM>; however, it may be possible to dispose the buffer memory <NUM> externally of the storage controller <NUM>. In an embodiment, the buffer memory <NUM> may be a buffer memory configured to store the metadata MD, which is described with reference to <FIG>. Alternatively, the buffer memory <NUM> may be the journal memory to store the journal data JNL described with reference to <FIG>.

The ECC engine <NUM> may perform an error detection and correction function on data read from the nonvolatile memory <NUM>. In detail, the ECC engine <NUM> may generate parity bits for write data to be written in the nonvolatile memory <NUM>, and the parity bits thus generated may be stored in the nonvolatile memory <NUM> together with the write data. When data is read from the nonvolatile memory <NUM>, the ECC engine <NUM> may correct an error of the read data by using parity bits read from the nonvolatile memory <NUM> together with the read data and may output the error-corrected read data.

The AES engine <NUM> may perform at least one of an encryption operation and a decryption operation on data input to the storage controller <NUM> by using a symmetric-key algorithm.

In an embodiment, the storage controller <NUM> may further include a packet manager that generates a packet complying with a protocol of an interface agreed with the host <NUM> or parses a variety of information from the packet received from the host <NUM>.

<FIG> is a block diagram illustrating a storage system according to an embodiment of the present disclosure. Referring to <FIG>, a storage system <NUM> may include a plurality of hosts <NUM> to 200n and a storage device <NUM>. The plurality of hosts <NUM> to 200n may be configured to access the storage device <NUM>. For example, each of the plurality of hosts <NUM> to 200n may store data in the storage device <NUM> or may read data stored in the storage device <NUM>.

The storage device <NUM> includes a storage controller <NUM>, a nonvolatile memory device <NUM>, and a buffer memory <NUM>. Overall operations of the storage device <NUM>, the storage controller <NUM>, the nonvolatile memory device <NUM>, and the buffer memory <NUM> are similar to those described above, and thus, additional description will be omitted to avoid redundancy.

In an embodiment, the storage controller <NUM> includes a journal manager <NUM>. The journal manager <NUM> generates and manages journal data associated with update information of various metadata that are used in an operation of the storage device <NUM>.

In an embodiment, according to the method described with reference to <FIG>, the journal manager <NUM> splits the journal data JNL into a plurality of groups based on the dependency of the journal data JNL and replays the journal data JNL in parallel.

In an embodiment, the journal manager <NUM> may identify the dependency of the journal data JNL with respect to the plurality of hosts <NUM> to 200n. For example, the journal manager <NUM> may generate first journal data associated with the update of metadata according to a request or an operation of the first host <NUM> and may generate second journal data associated with the update of metadata according to a request or an operation of the second host <NUM>. The journal manager <NUM> may manage the first and second journal data as journal data having no mutual dependency. In the restoration of the metadata, the journal manager <NUM> may replay the first and second journal data in parallel. That is, the journal manager <NUM> may classify (or identify or determine) the dependency of journal data based on a host corresponding to the journal data.

<FIG> is a block diagram illustrating a storage system according to an embodiment of the present disclosure. Referring to <FIG>, a storage system <NUM>-<NUM> may include a host <NUM>-<NUM> and a plurality of storage devices <NUM>-<NUM> to 3n00-<NUM>. The host <NUM>-<NUM> may be configured to control the plurality of storage devices <NUM>-<NUM> to 3n00-<NUM>.

Each of the plurality of storage devices <NUM>-<NUM> to 3n00-<NUM> may be configured to manage metadata necessary for an operation thereof; each of the plurality of storage devices <NUM>-<NUM> to 3n00-<NUM> may manage journal data through a journal manager described with reference to <FIG>.

In an embodiment, the host <NUM>-<NUM> may include a journal manager JM. The journal manager JM included in the host <NUM>-<NUM> may be configured to manage journal data associated with the update of metadata that is managed by the host <NUM>-<NUM>. For example, the host <NUM>-<NUM> may be configured to control or access the plurality of storage devices <NUM>-<NUM> to 3n00-<NUM> independently of each other. In this case, the host <NUM>-<NUM> may manage various metadata necessary to access or control the plurality of storage devices <NUM>-<NUM> to 3n00-<NUM> individually or collectively. In an embodiment, as in the above description, the journal manager JM of the host <NUM>-<NUM> may replay journal data simultaneously or in parallel based on the dependency of the journal data.

In an embodiment, the dependency of the journal data managed by the host <NUM>-<NUM> may be determined through various methods as described above. Alternatively, the dependency of the journal data managed by the host <NUM>-<NUM> may be determined depending on a corresponding storage device. For example, journal data corresponding to the first storage device <NUM>-<NUM> may be determined by the journal manager JM as having the dependency and thus may be replayed by one replaying unit; journal data corresponding to the second storage device <NUM>-<NUM> may be determined by the journal manager JM as having the dependency and thus may be replayed by another replaying unit. In this case, the journal data corresponding to the first storage device <NUM>-<NUM> and the journal data corresponding to the second storage device <NUM>-<NUM> may be determined as having no mutual dependency, and the journal data may be replayed independently of each other, at the same time, or in parallel.

<FIG> is a block diagram illustrating a storage system according to an embodiment of the present disclosure. Referring to <FIG>, a storage system <NUM>-<NUM> may include a host <NUM>-<NUM> and a plurality of storage devices <NUM>-<NUM> to 3n00-<NUM>. The host <NUM>-<NUM> may include the journal manager JM. The host <NUM>-<NUM>, the journal manager JM, and the plurality of storage devices <NUM>-<NUM> to 3n00-<NUM> are similar to those described with reference to <FIG>, and thus, additional description will be omitted to avoid redundancy.

In an embodiment, the host <NUM>-<NUM> may further include a flash translation layer FTL. In the embodiments described with reference to <FIG>, the flash translation layer FTL is included in a storage controller of a storage device and performs various maintenance operations on a nonvolatile memory device. In contrast, in the embodiment of <FIG>, the flash translation layer FTL may be included in the host <NUM>-<NUM>. In this case, the flash translation layer FTL of the host <NUM>-<NUM> may perform various maintenance operations on each of the plurality of storage devices <NUM>-<NUM> to 3n00-<NUM> and may manage metadata on each of the plurality of storage devices <NUM>-<NUM> to 3n00-<NUM>. In an embodiment, according to various methods described with reference to <FIG>, the journal manager JM of the host <NUM>-<NUM> may manage journal data associated with the update of metadata managed by the flash translation layer FTL of the host <NUM>-<NUM> and may replay the journal data independently, simultaneously, or in parallel based on the dependency of the journal manager.

<FIG> is a diagram of a data center <NUM> to which a memory device is applied, according to an embodiment.

Referring to <FIG>, the data center <NUM> may be a facility that collects various types of partial of data and provides services and may be referred to as a data storage center. The data center <NUM> may be a system for operating a search engine and a database, and may be a computing system used by companies, such as banks, or government agencies. The data center <NUM> may include application servers <NUM> to 4100n and storage servers <NUM> to <NUM>. The number of application servers <NUM> to 4100n and the number of storage servers <NUM> to <NUM> may be variously selected according to various embodiments. The number of application servers <NUM> to 4100n may be different from the number of storage servers <NUM> to <NUM>.

The application server <NUM> or the storage server <NUM> may include at least one of processors <NUM> and <NUM> and memories <NUM> and <NUM>. The storage server <NUM> will now be described as an example. The processor <NUM> may control all operations of the storage server <NUM>, access the memory <NUM>, and execute instructions and/or data loaded in the memory <NUM>. The memory <NUM> may be a double-data-rate synchronous DRAM (DDR SDRAM), a high-bandwidth memory (HBM), a hybrid memory cube (HMC), a dual in-line memory module (DIMM), Optane DIMM, and/or a non-volatile DIMM (NVMDIMM). In some embodiments, the number of processors <NUM> and memories <NUM> included in the storage server <NUM> may be variously selected. In an embodiment, the processor <NUM> and the memory <NUM> may provide a processor-memory pair. In an embodiment, the number of processors <NUM> may be different from the number of memories <NUM>. The processor <NUM> may include a single-core processor or a multi-core processor. The above description of the storage server <NUM> may be similarly applied to the application server <NUM>. In some embodiments, the application server <NUM> may not include a storage device <NUM>. The storage server <NUM> may include at least one storage device <NUM>. The number of storage devices <NUM> included in the storage server <NUM> may be variously selected according to differing embodiments.

The application servers <NUM> to 4100n may communicate with the storage servers <NUM> to <NUM> through a network <NUM>. The network <NUM> may be implemented by using a fiber channel (FC) or Ethernet. In this case, the FC may be a medium used for relatively high-speed data transmission and use an optical switch with high performance and high availability. The storage servers <NUM> to <NUM> may be provided as file storages, block storages, or object storages according to the access method of the network <NUM>.

In an embodiment, the network <NUM> may be a storage-dedicated network, such as a storage area network (SAN). For example, the SAN may be an FC-SAN, which uses an FC network and is implemented according to an FC protocol (FCP). As another example, the SAN may be an Internet protocol (IP)-SAN, which uses a transmission control protocol (TCP)/IP network and is implemented according to a SCSI over TCP/IP or Internet SCSI (iSCSI) protocol. In another embodiment, the network <NUM> may be a general network, such as a TCP/IP network. For example, the network <NUM> may be implemented according to a protocol, such as FC over Ethernet (FCoE), network attached storage (NAS), and NVMe over Fabrics (NVMe-oF).

Hereinafter, the application server <NUM> and the storage server <NUM> will be described. A description of the application server <NUM> may be applied to another application server 4100n, and a description of the storage server <NUM> may be applied to another storage server <NUM>.

The application server <NUM> may store data, which is requested by a user or a client to be stored, in one of the storage servers <NUM> to <NUM> through the network <NUM>. Also, the application server <NUM> may obtain data, which is requested by the user or the client to be read, from one of the storage servers <NUM> to <NUM> through the network <NUM>. For example, the application server <NUM> may be implemented as a web server or a database management system (DBMS).

The application server <NUM> may access a memory 4120n or a storage device 4150n, which is included in another application server 4100n, through the network <NUM>. Alternatively, the application server <NUM> may access memories <NUM> to <NUM> or storage devices <NUM> to <NUM>, which are included in the storage servers <NUM> to <NUM>, through the network <NUM>. Thus, the application server <NUM> may perform various operations on data stored in application servers <NUM> to 4100n and/or the storage servers <NUM> to <NUM>. For example, the application server <NUM> may execute an instruction for moving or copying data between the application servers <NUM> to 4100n and/or the storage servers <NUM> to <NUM>. In this case, the data may be moved from the storage devices <NUM> to <NUM> of the storage servers <NUM> to <NUM> to the memories <NUM> to 4120n of the application servers <NUM> to 4100n directly or through the memories <NUM> to <NUM> of the storage servers <NUM> to <NUM>. The data moved through the network <NUM> may be data that is encrypted for security or privacy.

The storage server <NUM> will now be described as an example. An interface <NUM> may provide physical connection between a processor <NUM> and a controller <NUM> and a physical connection between a network interface card (NIC) <NUM> and the controller <NUM>. For example, the interface <NUM> may be implemented using a direct attached storage (DAS) scheme in which the storage device <NUM> is directly connected with a dedicated cable. For example, the interface <NUM> may be implemented by using various interface schemes, such as ATA, SATA, e-SATA, an SCSI, SAS, PCI, PCIe, NVMe, IEEE <NUM>, a USB interface, an SD card interface, an MMC interface, an eMMC interface, a UFS interface, an eUFS interface, and/or a CF card interface.

The storage server <NUM> may further include a switch <NUM> and the NIC(Network InterConnect) <NUM>. The switch <NUM> may selectively connect the processor <NUM> to the storage device <NUM> or selectively connect the NIC <NUM> to the storage device <NUM> via the control of the processor <NUM>.

In an embodiment, the NIC <NUM> may include a network interface card and a network adaptor. The NIC <NUM> may be connected to the network <NUM> by a wired interface, a wireless interface, a Bluetooth interface, or an optical interface. The NIC <NUM> may include an internal memory, a digital signal processor (DSP), and a host bus interface and be connected to the processor <NUM> and/or the switch <NUM> through the host bus interface. The host bus interface may be implemented as one of the above-described examples of the interface <NUM>. In an embodiment, the NIC <NUM> may be integrated with at least one of the processor <NUM>, the switch <NUM>, and the storage device <NUM>.

In the storage servers <NUM> to <NUM> or the application servers <NUM> to 4100n, a processor may transmit a command to storage devices <NUM> to 4150n and <NUM> to <NUM> or the memories <NUM> to 4120n and <NUM> to <NUM> and program or read data. In this case, the data may be data of which an error is corrected by an ECC engine. The data may be data on which a data bus inversion (DBI) operation or a data masking (DM) operation is performed, and may include cyclic redundancy code (CRC) information. The data may be data encrypted for security or privacy.

Storage devices <NUM> to 4150n and <NUM> to <NUM> may transmit a control signal and a command/address signal to NAND flash memory devices <NUM> to <NUM> in response to a read command received from the processor. Thus, when data is read from the NAND flash memory devices <NUM> to <NUM>, a read enable (RE) signal may be input as a data output control signal, and thus, the data may be output to a DQ bus. A data strobe signal DQS may be generated using the RE signal. The command and the address signal may be latched in a page buffer depending on a rising edge or falling edge of a write enable (WE) signal.

The controller <NUM> may control all operations of the storage device <NUM>. In an embodiment, the controller <NUM> may include SRAM. The controller <NUM> may write data to the NAND flash memory device <NUM> in response to a write command or read data from the NAND flash memory device <NUM> in response to a read command. For example, the write command and/or the read command may be provided from the processor <NUM> of the storage server <NUM>, the processor <NUM> of another storage server <NUM>, or the processors <NUM> and 4110n of the application servers <NUM> and 4100n. DRAM <NUM> may temporarily store (or buffer) data to be written to the NAND flash memory device <NUM> or data read from the NAND flash memory device <NUM>. Also, the DRAM <NUM> may store metadata. Here, the metadata may be user data or data generated by the controller <NUM> to manage the NAND flash memory device <NUM>. The storage device <NUM> may include a secure element (SE) for security or privacy.

In an embodiment, controllers included in the storage devices <NUM> to 4150n and <NUM> to <NUM> or CPUs of servers may be configured to manage various metadata. Journal data for guaranteeing the reliability of various metadata may be managed by the controllers included in the storage devices <NUM> to 4150n and <NUM> to <NUM> or the CPUs of the servers <NUM> to <NUM>. In this case, the controllers included in the storage devices <NUM> to 4150n and <NUM> to <NUM> or the CPUs of the servers <NUM> to <NUM> may include the journal manager described with reference to <FIG> or may operate based on the method described with reference to <FIG>.

Claim 1:
A storage device (<NUM>, <NUM>, <NUM>, <NUM>-<NUM> - 3n00-<NUM>, <NUM>-<NUM> - 3n00-<NUM>, <NUM> - 4150n, <NUM> - <NUM>) comprising:
a nonvolatile memory device (<NUM>, <NUM>); and
a storage controller (<NUM>, <NUM>) configured to control the nonvolatile memory device (<NUM>, <NUM>) and to update metadata (MD) based on the control for the nonvolatile memory device (<NUM>, <NUM>),
wherein the storage controller (<NUM>, <NUM>) includes:
a journal data generator (111a, 111a-<NUM>, 111a-<NUM>) configured to generate a plurality of journal data (JNL) associated with the update of the metadata (MD); and
a journal data replayer (111c) configured to replay the plurality of journal data (JNL) in parallel to restore the metadata (MD), wherein the journal data replayer (111c) includes:
a journal data splitting unit (SPL) configured to split the plurality of journal data (JNL) into a plurality of groups based on dependency of each of the plurality of journal data (JNL); and
a plurality of replaying units (RP0-RP3) respectively corresponding to the plurality of groups,
wherein each of the plurality of replaying units (RP0-RP3) replays, in parallel, journal data (JNL) included in the corresponding one of the plurality of groups,
characterized by
the journal data splitting unit (SPL) is further configured to determine the dependency based on an opcode field of each of the plurality of journal data (JNL).