Smart storage management based on dynamic logic capacity for the storage
First Claim
Patent Images
1. A data processing method, applied to a solid state disk (SSD) and comprising:
- receiving, by the SSD, a write request from a controller, wherein the write request carries to-be-written data;
allocating, by the SSD, a blank logical block to the to-be-written data, wherein the blank logical block is a logical block with a free logical address, the logical block corresponding to a segment of logical capacity of the SSD;
compressing, by the SSD, the to-be-written data to obtain compressed data;
storing, by the SSD, the compressed data;
sending, by the SSD, first feedback information to the controller, wherein the first feedback information indicates a remaining logical capacity of the SSD after the compressed data is stored, wherein the remaining logical capacity of the SSD corresponds to an actual amount of free data blocks on the SSD available for storing data;
converting, by the SSD, the allocated blank logical block into a valid logical block, wherein the valid logical block is a logical block whose logical address is occupied by valid data;
determining, by the SSD, according to a size of the to-be-written data and a size of the compressed data, a quantity of blank logical blocks that need to be added in the SSD,wherein a quantity M of blank logical blocks to be added in the SSD is equal to a rounded-down result of dividing D by L, wherein D indicates a difference between a length of the to-be-written data and a length of the compressed data, and L indicates a length of a logical block in the SSD;
querying, by the SSD, a quantity of remaining blank logical blocks in the SSD, andsending, by the SSD, second feedback information to the controller, wherein the second feedback information indicates the quantity of remaining blank logical blocks and/or remaining capacity of the SSD, wherein the remaining capacity is based on the quantity of the remaining blank logical blocks.
1 Assignment
0 Petitions
Accused Products
Abstract
Providing a data processing manner, wherein: a SSD compresses a data; the SSD storing the compressed data; the SSD sends a feedback information to a controller, wherein the feedback information indicates a remaining capacity of the SSD after the compressed data is stored.
-
Citations
6 Claims
-
1. A data processing method, applied to a solid state disk (SSD) and comprising:
-
receiving, by the SSD, a write request from a controller, wherein the write request carries to-be-written data; allocating, by the SSD, a blank logical block to the to-be-written data, wherein the blank logical block is a logical block with a free logical address, the logical block corresponding to a segment of logical capacity of the SSD; compressing, by the SSD, the to-be-written data to obtain compressed data; storing, by the SSD, the compressed data; sending, by the SSD, first feedback information to the controller, wherein the first feedback information indicates a remaining logical capacity of the SSD after the compressed data is stored, wherein the remaining logical capacity of the SSD corresponds to an actual amount of free data blocks on the SSD available for storing data; converting, by the SSD, the allocated blank logical block into a valid logical block, wherein the valid logical block is a logical block whose logical address is occupied by valid data; determining, by the SSD, according to a size of the to-be-written data and a size of the compressed data, a quantity of blank logical blocks that need to be added in the SSD, wherein a quantity M of blank logical blocks to be added in the SSD is equal to a rounded-down result of dividing D by L, wherein D indicates a difference between a length of the to-be-written data and a length of the compressed data, and L indicates a length of a logical block in the SSD; querying, by the SSD, a quantity of remaining blank logical blocks in the SSD, and sending, by the SSD, second feedback information to the controller, wherein the second feedback information indicates the quantity of remaining blank logical blocks and/or remaining capacity of the SSD, wherein the remaining capacity is based on the quantity of the remaining blank logical blocks.
-
-
2. A data processing method, applied to a solid state disk (SSD) and comprising:
-
receiving, by the SSD, a write request from a controller, wherein the write request carries to-be-written data; allocating, by the SSD, a blank logical block to the to-be-written data, wherein the blank logical block is a logical block with a free logical address, the logical block corresponding to a segment of logical capacity of the SSD; compressing, by the SSD, the to-be-written data to obtain compressed data; storing, by the SSD, the compressed data; converting, by the SSD, the allocated blank logical block into a valid logical block, wherein the valid logical block is a logical block whose logical address is occupied by valid data; and sending, by the SSD, first feedback information to the controller, wherein the first feedback information indicates a remaining logical capacity of the SSD after the compressed data is stored, wherein the remaining logical capacity of the SSD corresponds to an actual amount of free data blocks on the SSD available for storing data; querying, by the SSD, a quantity of remaining blank logical blocks in the SSD; and
,sending, by the SSD, second feedback information to the controller, wherein the second feedback information indicates a quantity of remaining blank logical blocks and/or remaining capacity of the SSD, wherein the remaining capacity is based on the quantity of the remaining blank logical blocks; receiving, by the SSD, a command from the controller, wherein the command comprises a logical address range, and the command instructs to mark valid data in the logical address range as invalid data; converting, by the SSD, a valid logical block in the logical address range into an isolated logical block, wherein the isolated logical block is a logical block whose logical address is not to be used; determining, by the SSD, a size of physical space occupied by data in the logical address range; selecting, by the SSD, partial over-provisioning space from over-provisioning space, wherein a size of the partial over-provisioning space is equal to the size of the physical space occupied by the data in the logical address range; and using, by the SSD, the partial over-provisioning space as a free physical space of the SSD.
-
-
3. A solid state disk, comprising:
-
a communications interface, configured to communicate with a controller; a storage medium, configured to provide storage space; and a processor, connected to the communications interface and the storage medium, and configured to; receive a write request from the controller through the communications interface, wherein the write request carries to-be-written data; allocate a blank logical block to the to-be-written data, wherein the blank logical block is a logical block with a free logical address, the logical block corresponding to a segment of logical capacity of the storage medium; compress the to-be-written data to obtain the compressed data; determine, according to a size of the to-be-written data and a size of the compressed data, a quantity of blank logical blocks that need to be added in the solid state disk, wherein a quantity M of blank logical blocks that need to be added in the solid state disk is equal to a rounded-down result of dividing D by L, wherein D indicates a difference between a length of the to-be-written data and a length of the compressed data, and L indicates a length of a logical block in the solid state disk; store the compressed data in the storage medium; send first feedback information to the controller, wherein the first feedback information indicates a remaining logical capacity of the storage medium after the compressed data is stored, wherein the remaining logical capacity of the SSD corresponds to an actual amount of free data blocks on the SSD available for storing data; convert the allocated blank logical block into a valid logical block, wherein the valid logical block is a logical block whose logical address is occupied by valid data; query a quantity of remaining blank logical blocks in the solid state disk; and send second feedback information to the controller, wherein the second feedback information indicates a quantity of remaining blank logical blocks and/or remaining capacity on the SSD, wherein the remaining capacity is based on the quantity of the remaining blank logical blocks.
-
-
4. A solid state disk, comprising:
-
a communications interface, configured to communicate with a controller; a storage medium, configured to provide storage space; and a processor, connected to the communications interface and the storage medium, and configured to; receive a write request from the controller through the communications interface, wherein the write request carries to-be-written data; allocate a blank logical block to the to-be-written data, wherein the blank logical block is a logical block with a free logical address, the logical block corresponding to a segment of logical capacity of the storage medium; compress the to-be-written data to obtain compressed data; store the compressed data in the storage medium; and send first feedback information to the controller, wherein the first feedback information indicates a remaining logical capacity of the storage medium after the compressed data is stored, wherein the remaining logical capacity of the SSD corresponds to an actual amount of free data blocks on the SSD available for storing data; convert the allocated blank logical block into a valid logical block, wherein the valid logical block is a logical block whose logical address is occupied by valid data; query a quantity of remaining blank logical blocks in the solid state disk; send second feedback information to the controller, wherein the second feedback information indicates a quantity of remaining blank logical blocks and/or remaining capacity on the SSD, wherein the remaining capacity is based on the quantity of the remaining blank logical blocks; receive a command from the controller through the communications interface, wherein the command comprises a logical address range, and the command instructs to mark valid data in the logical address range as invalid data; convert a valid logical block in the logical address range into an isolated logical block, wherein the isolated logical block is a logical block whose logical address cannot be used; determine a size of physical space occupied by data in the logical address range; select partial over-provisioning space from over-provisioning space, wherein a size of the partial over-provisioning space is equal to the size of the physical space occupied by the data in the logical address range; and use the partial over-provisioning space as a free physical space of the storage medium.
-
-
5. A storage system, comprising a controller and a solid state disk, wherein
the solid state disk, comprising: -
a communications interface, configured to communicate with a controller; a storage medium, configured to provide storage space; and a processor, connected to the communications interface and the storage medium, and configured to; receive a write request from the controller through the communications interface, wherein the write request carries to-be-written data; compress the to-be-written data to obtain compressed data;
store the compressed data in the storage medium; andsend first feedback information to the controller through the communications interface, wherein the first feedback information indicates a remaining capacity of the storage medium after the compressed data is stored; and
, whereinthe controller is configured to; generate a write request comprising the to-be-written data;
receive a response message for the write request from the processor through the communications interface, wherein the response message comprises a logical address of the to-be-written data in the storage medium; andrecord a mapping relationship between a logical address of the to-be-written data in a disk array and the logical address of the to-be-written data in the storage medium. - View Dependent Claims (6)
-
Specification