Command tracking for direct access block storage devices
First Claim
1. A method of tracking and processing commands received by a storage device, the method comprising:
- determining one or more requested logical block addresses (LBAs) of a received command, including a starting LBA and a length of one or more LBAs of the received command;
determining whether command reordering is restricted; and
if command reordering is not restricted;
processing the received commands;
otherwise, if command reordering is restricted;
conflict checking each received command by;
checking one or more small command tracking structures for one or more active small commands in conflict with the received command; and
checking one or more large command tracking structures for one or more active large commands in conflict with the received command;
if no conflict is detected;
tracking and processing the received command by;
determining whether the received command is (i) an exclusive command requesting exclusive access to the requested LBAs or ii a non-exclusive command requesting non-exclusive access to the requested LBAs;
for each exclusive command having a length less than or equal to a predetermined size;
allocating, if appropriate, at least one tracking entry in the one or more small command tracking structures; and
updating fields of the at least one allocated tracking entry,wherein the updated fields correspond to the requested LBAs;
otherwise, for each exclusive command with length greater than the predetermined size;
allocating a tracking entry in an exclusive large command tracking structure; and
updating the tracking entry with the starting LBA and length of the received command;
otherwise, if a conflict is detected;
queuing the received command in a general command queue of the storage device.
8 Assignments
0 Petitions
Accused Products
Abstract
Described embodiments provide tracking and processing of commands received by a storage device. For each received command, the storage device determines one or more requested logical block addresses (LBAs), including a starting LBA and a length of one or more LBAs of the received command. The storage device determines whether command reordering is restricted. If command reordering is not restricted, the storage device processes the received commands. Otherwise, if command reordering is restricted, the storage device conflict checks each received command. If no conflict is detected, the storage device tracks and processes the received command. Otherwise, if a conflict is detected, the storage device queues the received command.
-
Citations
19 Claims
-
1. A method of tracking and processing commands received by a storage device, the method comprising:
-
determining one or more requested logical block addresses (LBAs) of a received command, including a starting LBA and a length of one or more LBAs of the received command; determining whether command reordering is restricted; and if command reordering is not restricted; processing the received commands; otherwise, if command reordering is restricted; conflict checking each received command by; checking one or more small command tracking structures for one or more active small commands in conflict with the received command; and checking one or more large command tracking structures for one or more active large commands in conflict with the received command; if no conflict is detected; tracking and processing the received command by; determining whether the received command is (i) an exclusive command requesting exclusive access to the requested LBAs or ii a non-exclusive command requesting non-exclusive access to the requested LBAs; for each exclusive command having a length less than or equal to a predetermined size;
allocating, if appropriate, at least one tracking entry in the one or more small command tracking structures; and
updating fields of the at least one allocated tracking entry,wherein the updated fields correspond to the requested LBAs; otherwise, for each exclusive command with length greater than the predetermined size;
allocating a tracking entry in an exclusive large command tracking structure; and
updating the tracking entry with the starting LBA and length of the received command;otherwise, if a conflict is detected; queuing the received command in a general command queue of the storage device. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A non-transitory machine-readable storage medium, having encoded thereon program code, wherein, when the program code is executed by a machine, the machine implements a method of tracking and processing commands received by a storage device, the method comprising:
-
determining one or more requested logical block addresses (LBAs) of a received command, including a starting LBA and a length of one or more LBAs of the received command; determining whether command reordering is restricted; and if command reordering is not restricted; processing the received commands; otherwise, if command reordering is restricted; conflict checking each received command by; checking one or more small command tracking structures for one or more active small commands in conflict with the received command; and checking one or more large command tracking structures for one or more active large commands in conflict with the received command; if no conflict is detected; tracking and processing the received command by; determining whether the received command is (i) an exclusive command requesting exclusive access to the requested LBAs or (ii) a non-exclusive command requesting non-exclusive access to the requested LBAs; for each exclusive command having a length less than or equal to a predetermined size;
allocating, if appropriate, at least one tracking entry in the one or more small command tracking structures; and
updating fields of the at least one allocated tracking entry,wherein the updated fields correspond to the requested LBAs; otherwise, for each exclusive command with length greater than the predetermined size;
allocating a tracking entry in an exclusive large command tracking structure; and
updating the tracking entry with the starting LBA and length of the received command;otherwise, if a conflict is detected; queuing the received command in a general command queue of the storage device.
-
-
16. An apparatus for tracking and processing commands received by a storage device, the apparatus comprising:
-
a host layer module adapted to i) determine one or more requested logical block addresses (LBAs) of a received command, including a starting LBA and a length of one or more LBAs of the received command, and ii) determine whether command reordering is restricted; a buffer layer module adapted to i) conflict check for each received command, ii) process received commands that do not have detected conflicts, iii) track commands that are being processed, and iv) queue the received commands that do have detected conflicts; a general command queue adapted as a first-in, first-out command queue for the storage device; one or more small command tracking structures including bit fields corresponding to each one of a predetermined number of blocks, wherein a small command is a command that accesses less than or equal to the predetermined number of blocks; at least one small command tracking structure adapted to track exclusive commands, and at least one corresponding non-exclusive small command counter adapted to track non-exclusive small commands; one or more large command tracking structures including entries for the starting LBA and length of one or more commands, wherein one large command tracking structure is adapted to track exclusive commands, and another large command tracking structure is adapted to track non-exclusive commands; a buffer for storing the one or more small command tracking structures and the one or more large command tracking structures; and one or more registers for updating and checking the one or more small command tracking structures. - View Dependent Claims (17, 18, 19)
-
Specification