Writing segments and erase blocks based on ordering
A method is provided. The method includes receiving a set of data blocks to be stored in a storage system. The storage system includes a plurality of non-volatile memory modules. The method also includes generating a set of segments based on the set of data blocks. A respective segment comprising portions of one or more erase blocks. The method further includes writing the set of segments to the non-volatile memory modules based on orderings of the portions of the one or more erase blocks.
1. A method, comprising:
receiving a set of data blocks to be stored in a storage system, the storage system comprising a plurality of non-volatile memory modules;
generating a set of segments based on the set of data blocks, a respective segment comprising portions of one or more allocation units; and
writing the set of segments to the non-volatile memory modules based on orderings of the portions of the one or more allocation units.
2. The method of claim 1 , wherein generating the set of segments based on the set of data blocks comprises:
organizing the set of data blocks into the one or more allocation units.
3. The method of claim 1 , further comprising:
storing the set of data blocks in a memory prior to generating the set of segments based on the set of data blocks.
4. The method of claim 1 , wherein writing the segments to the non-volatile memory modules based on the orderings of the portions of the one or more allocation units comprises:
writing respective portions of a respective allocation unit to the non-volatile memory modules in order.
5. The method of claim 1 , wherein writing the segments to the non-volatile memory modules based on the orderings of the portions of the one or more allocation units prevents a later portion of a first allocation unit from being written to the non-volatile memory modules before an earlier portion of the first allocation unit.
6. The method of claim 1 , wherein writing the segments to the non-volatile memory modules based on the orderings of the portions of the one or more allocation units comprises:
writing the set of segments to one or more zones, a respective zone comprising one or more non-volatile memory modules.
7. The method of claim 1 , wherein a first non-volatile memory module of the plurality of non-volatile memory modules differs from a second non-volatile memory module of the plurality of non-volatile memory modules.
8. The method of claim 1 , wherein the at least two segments of the set of segments are generated in parallel.
9. The method of claim 1 , wherein the plurality of non-volatile memory modules do not allow portions of the one or more allocation units to be written out of order.
10. The method of claim 1 , wherein writing the segments to the non-volatile memory modules based on the orderings of the portions of the one or more allocation units reduces an amount of credits used for power loss protection by the storage system.
11. The method of claim 1 , wherein at least two allocation units have different sizes.
12. A storage system, comprising:
a plurality of non-volatile memory modules; and
a processor operatively coupled to a plurality of non-volatile memory modules, to perform a method, comprising:
receiving a set of data blocks to be stored in a storage system, the storage system comprising a plurality of non-volatile memory modules;
generating a set of segments based on the set of data blocks, a respective segment comprising portions of one or more allocation units; and
writing the set of segments to the non-volatile memory modules based on orderings of the portions of the one or more allocation units.
13. The storage system of claim 12 , wherein generating the set of segments based on the set of data blocks comprises:
organizing the set of data blocks into the one or more allocation units.
14. The storage system of claim 12 , further comprising:
storing the set of data blocks in a memory prior to generating the set of segments based on the set of data blocks.
15. The storage system of claim 12 , wherein writing the segments to the non-volatile memory modules based on the orderings of the portions of the one or more allocation units comprises:
writing respective portions of a respective allocation unit to the non-volatile memory modules in order.
16. The storage system of claim 12 , wherein writing the segments to the non-volatile memory modules based on the orderings of the portions of the one or more allocation units comprises:
writing the set of segments to one or more zones, a respective zone comprising one or more non-volatile memory modules.
17. The storage system of claim 12 , wherein a first non-volatile memory module of the plurality of non-volatile memory modules differs from a second non-volatile memory module of the plurality of non-volatile memory modules.
18. The storage system of claim 12 , wherein the at least two segments of the set of segments are generated in parallel.
19. The storage system of claim 12 , wherein writing the segments to the non-volatile memory modules based on the orderings of the portions of the one or more allocation units reduces an amount of credits used for power loss protection by the storage system.
20. A non-transitory, computer-readable media having instructions thereupon which, when executed by a processor, cause the processor to perform a method comprising:
receiving a set of data blocks to be stored in a storage system, the storage system comprising a plurality of non-volatile memory modules;
generating a set of segments based on the set of data blocks, a respective segment comprising portions of one or more allocation units; and
writing the set of segments to the non-volatile memory modules based on orderings of the portions of the one or more allocation units.