Optimized relocation of data based on data characteristics
A command is transmitted to a storage device to relocate first data that partially fills a first erase block of the storage device and second data that partially fills a second erase block of the storage device to a third erase block of the storage device, wherein the command causes the relocation of the first data and the second data while bypassing sending the data to the storage controller. An acknowledgement that the first data and the second data have been stored at the third erase block is received from the storage device.
1. A storage system comprising:
a plurality of storage devices; and
a storage controller operatively coupled to the plurality of storage devices, the storage controller comprising a processing device, the processing device to:
transmit a command to relocate first data that partially fills a first erase block of a storage device of the plurality of storage devices and second data that partially fills a second erase block of the storage device to a third erase block of the storage device, wherein the command causes the relocation of the first data and the second data while bypassing sending the data to the storage controller; and
receive, from the storage device, an acknowledgement that the first data and the second data have been stored at the third erase block.
2. The storage system of claim 1 , wherein the processing device is further to:
identify one or more corresponding characteristics associated with the first data and the second data, wherein the first data and the second data are relocated to the third erase block based on the one or more corresponding characteristics.
3. The storage system of claim 2 , wherein the one or more corresponding characteristics comprise an expected lifespan of the first data and the second data.
4. The storage system of claim 2 , wherein the one or more corresponding characteristics comprise an amount of data of the first data and the second data.
5. The storage system of claim 4 , wherein the first data and the second data are relocated based on the amount of data of the first data and the second data corresponding to an erase block size of the third erase block.
6. The storage system of claim 1 , wherein the processing device is further to:
update a mapping data structure to deallocate the first data stored at the first erase block, deallocate the second data stored at the second erase block, and associate the first data and the second data with the third erase block.
7. The storage system of claim 1 , wherein the storage controller is external to the plurality of storage devices.
8. A method, comprising:
transmitting, by a processing device of a storage controller operatively coupled to a plurality of storage devices, a command to relocate first data that partially fills a first erase block of a storage device of the plurality of storage devices and second data that partially fills a second erase block of the storage device to a third erase block of the storage device, wherein the command causes the relocation of the first data and the second data while bypassing sending the data to the storage controller; and
receiving, from the storage device, an acknowledgement that the first data and the second data have been stored at the third erase block.
9. The method of claim 8 , further comprising:
identifying one or more corresponding characteristics associated with the first data and the second data, wherein the first data and the second data are relocated to the third erase block based on the one or more corresponding characteristics.
10. The method of claim 9 , wherein the one or more corresponding characteristics comprise an expected lifespan of the first data and the second data.
11. The method of claim 9 , wherein the one or more corresponding characteristics comprise an amount of data of the first data and the second data.
12. The method of claim 11 , wherein the first data and the second data are relocated based on the amount of data of the first data and the second data corresponding to an erase block size of the third erase block.
13. The method of claim 8 , further comprising:
updating a mapping data structure to deallocate the first data stored at the first erase block, deallocate the second data stored at the second erase block, and associate the first data and the second data with the third erase block.
14. The method of claim 8 , wherein the storage controller is external to the plurality of storage devices.
15. A non-transitory computer readable storage medium storing instructions, which when executed, cause a processing device of a storage controller to:
transmit, by the processing device of the storage controller operatively coupled to a plurality of storage devices, a command to relocate first data that partially fills a first erase block of a storage device of the plurality of storage devices and second data that partially fills a second erase block of the storage device to a third erase block of the storage device, wherein the command causes the relocation of the first data and the second data while bypassing sending the data to the storage controller; and
receive, from the storage device, an acknowledgement that the first data and the second data have been stored at the third erase block.
16. The non-transitory computer readable storage medium of claim 15 , wherein the processing device is further to:
identify one or more corresponding characteristics associated with the first data and the second data, wherein the first data and the second data are relocated to the third erase block based on the one or more corresponding characteristics.
17. The non-transitory computer readable storage medium of claim 16 , wherein the one or more corresponding characteristics comprise an expected lifespan of the first data and the second data.
18. The non-transitory computer readable storage medium of claim 16 , wherein the one or more corresponding characteristics comprise an amount of data of the first data and the second data.
19. The non-transitory computer readable storage medium of claim 18 , wherein the first data and the second data are relocated based on the amount of data of the first data and the second data corresponding to an erase block size of the third erase block.
20. The non-transitory computer readable storage medium of claim 15 , wherein the processing device is further to:
update a mapping data structure to deallocate the first data stored at the first erase block, deallocate the second data stored at the second erase block, and associate the first data and the second data with the third erase block.