Performing discard commands on RAID storage devices
First Claim
Patent Images
1. A method comprising:
- receiving, by a processing device, a request to free a range of logical sectors that is mapped to a plurality of storage devices organized as Redundant Array of Independent Disks (RAID), each storage device partitioned into a plurality of partitions to store a plurality of physical sectors;
for each storage device, identifying a first physical sector number corresponding to a first logical sector having a lowest number greater or equal than a starting logical sector number of the range of logical sectors;
identifying a second physical sector number corresponding to a second logical sector having a lowest number greater or equal than an ending logical sector number of the range of logical sectors; and
issuing a command to free a range of physical sectors identified by the first physical sector number and the second physical sector number;
wherein identifying a physical sector number on a current device comprises determining a first integer corresponding to a specified logical sector number and a second integer corresponding to the specified logical sector number, rounding down the first integer to a partition boundary responsive to determining that the second integer exceeds an ordinal number of the current device, and rounding down the first integer incremented by one to a partition boundary responsive to determining that the second integer does not exceed an ordinal number of the current device.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and system for efficiently freeing storage in a Redundant Array of Independent Disks (RAID) system. A computer system is coupled to storage devices that are organized as a RAID with block-level striping. Each storage device is partitioned into multiple physical sectors. The computer system receives a request to free a contiguous range of logical sectors that are mapped to the storage devices. In response, the computer system issues, for each storage device, a discard command to free contiguous physical sectors in the storage device that correspond to non-contiguous logical sectors.
-
Citations
20 Claims
-
1. A method comprising:
-
receiving, by a processing device, a request to free a range of logical sectors that is mapped to a plurality of storage devices organized as Redundant Array of Independent Disks (RAID), each storage device partitioned into a plurality of partitions to store a plurality of physical sectors; for each storage device, identifying a first physical sector number corresponding to a first logical sector having a lowest number greater or equal than a starting logical sector number of the range of logical sectors; identifying a second physical sector number corresponding to a second logical sector having a lowest number greater or equal than an ending logical sector number of the range of logical sectors; and issuing a command to free a range of physical sectors identified by the first physical sector number and the second physical sector number; wherein identifying a physical sector number on a current device comprises determining a first integer corresponding to a specified logical sector number and a second integer corresponding to the specified logical sector number, rounding down the first integer to a partition boundary responsive to determining that the second integer exceeds an ordinal number of the current device, and rounding down the first integer incremented by one to a partition boundary responsive to determining that the second integer does not exceed an ordinal number of the current device. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A system comprising:
-
a plurality of storage devices organized as a Redundant Array of Independent Disks (RAID), each storage device partitioned into a plurality of partitions to store a plurality of physical sectors; and a processing device coupled to the storage devices, the processing device to; receive a request to free a range of logical sectors that is mapped to the storage devices; identify, for each storage device, a first physical sector number corresponding to a logical sector having a lowest number greater or equal than a starting logical sector number of the range of logical sectors; identify, for each storage device, a second physical sector number corresponding to a logical sector having a lowest number greater or equal than an ending logical sector number of the range of logical sectors; and issue, for each storage device, a command to free a range of physical sectors identified by the first physical sector number and the second physical sector number; wherein identifying a physical sector number on a current device comprises determining a first integer corresponding to a specified logical sector number and a second integer corresponding to the specified logical sector number, rounding down the first integer to a partition boundary responsive to determining that the second integer exceeds an ordinal number of the current device, and rounding down the first integer incremented by one to a partition boundary responsive to determining that the second integer does not exceed an ordinal number of the current device. - View Dependent Claims (10, 11, 12, 13, 14)
-
-
15. A computer readable non-transitory storage medium including instructions that, when executed by a processing device, cause the processing device to perform operations comprising:
-
receiving, by the processing device, a request to free a range of logical sectors that is mapped to a plurality of storage devices organized as Redundant Array of Independent Disks (RAID), each storage device partitioned into a plurality of partitions to store a plurality of physical sectors; for each storage device, identifying a first physical sector number corresponding to a logical sector having a lowest number greater or equal than a starting logical sector number of the range of logical sectors; identifying a second physical sector number corresponding to a logical sector having a lowest number greater or equal than an ending logical sector number of the range of logical sectors; and issuing a command to free a range of physical sectors identified by the first physical sector number and the second physical sector number; wherein identifying a physical sector number on a current device comprises determining a first integer corresponding to a specified logical sector number and a second integer corresponding to the specified logical sector number, rounding down the first integer to a partition boundary responsive to determining that the second integer exceeds an ordinal number of the current device, and rounding down the first integer incremented by one to a partition boundary responsive to determining that the second integer does not exceed an ordinal number of the current device. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification