Buffering of data transfers for direct access block devices
First Claim
1. A method of transferring, by a media controller, data associated with a host data transfer between a host device and a storage media, the method comprising:
- by a flash translation layer module of the media controller;
mapping a physical address in the storage media to a logical sector address, wherein the logical sector address corresponds to mapping data comprising;
(i) a page index, (ii) a block index, and (iii) a superblock number of the storage media;
storing the mapping data in at least one summary page corresponding to the superblock containing the physical address;
storing one or more page offsets of an active block in the superblock in at least one active block table corresponding to the superblock;
storing a block index and a page index of the at least one summary page and an address of the at least one active block table, for each superblock of the storage device, in a page global directory corresponding to the storage media;
by a host layer module of the media controller;
receiving a data request to transfer data between a host device coupled to the media controller and one or more sectors of the storage media, wherein the data request comprises at least one of;
(i) a starting logical sector address, (ii) a total number of sectors to be accessed, and (iii) data to be written to the sectors;
identifying for each data transfer segment, based on the starting logical sector address, a corresponding (i) superblock number, (ii) block index and (iii) page index within the storage media; and
locating, from the page global directory of the storage device the at least one active block table and the summary page corresponding to the superblock number;
by a buffer layer module of the media controller;
segmenting the host data transfer into one or more data transfer segments, wherein each data transfer segment corresponds to at least a portion of the data;
allocating a number of physical buffers to a virtual circular buffer for buffering the one or more data transfer segments; and
transferring, by the virtual circular buffer, each of the data transfer segments between the host device and the storage media through the allocated physical buffers, by the steps of;
if the host data transfer is a host write operation;
(a) identifying, by the flash translation layer module, physical addresses for each data transfer segment based on (i) the at least one active block table of the superblock, if the physical address is in an active block of the superblock, otherwise, (ii) the summary page of the superblock, based on the block index and page index;
(b) providing, by a host layer module of the media controller, an initial number of data transfer segments to corresponding ones of the allocated physical buffers, the number of data transfer segments equivalent to the number of allocated physical buffers;
(c) providing, by the buffer layer module, the number of data transfer segments to the storage media; and
(d) repeating steps (a), (b) and (c) for each subsequent number of data transfer segments that remain.
8 Assignments
0 Petitions
Accused Products
Abstract
Described embodiments provide a method of transferring, by a media controller, data associated with a host data transfer between a host device and a storage media. A buffer layer module of the media controller segments the host data transfer into one or more data transfer segments. Each data transfer segment corresponds to at least a portion of the data. The buffer layer module allocates a number of physical buffers to a virtual circular buffer for buffering the one or more data transfer segments. The buffer layer module transfers, by the virtual circular buffer, each of the data transfer segments between the host device and the storage media through the allocated physical buffers.
76 Citations
20 Claims
-
1. A method of transferring, by a media controller, data associated with a host data transfer between a host device and a storage media, the method comprising:
-
by a flash translation layer module of the media controller; mapping a physical address in the storage media to a logical sector address, wherein the logical sector address corresponds to mapping data comprising;
(i) a page index, (ii) a block index, and (iii) a superblock number of the storage media;storing the mapping data in at least one summary page corresponding to the superblock containing the physical address; storing one or more page offsets of an active block in the superblock in at least one active block table corresponding to the superblock; storing a block index and a page index of the at least one summary page and an address of the at least one active block table, for each superblock of the storage device, in a page global directory corresponding to the storage media; by a host layer module of the media controller; receiving a data request to transfer data between a host device coupled to the media controller and one or more sectors of the storage media, wherein the data request comprises at least one of;
(i) a starting logical sector address, (ii) a total number of sectors to be accessed, and (iii) data to be written to the sectors;identifying for each data transfer segment, based on the starting logical sector address, a corresponding (i) superblock number, (ii) block index and (iii) page index within the storage media; and locating, from the page global directory of the storage device the at least one active block table and the summary page corresponding to the superblock number; by a buffer layer module of the media controller; segmenting the host data transfer into one or more data transfer segments, wherein each data transfer segment corresponds to at least a portion of the data; allocating a number of physical buffers to a virtual circular buffer for buffering the one or more data transfer segments; and transferring, by the virtual circular buffer, each of the data transfer segments between the host device and the storage media through the allocated physical buffers, by the steps of; if the host data transfer is a host write operation; (a) identifying, by the flash translation layer module, physical addresses for each data transfer segment based on (i) the at least one active block table of the superblock, if the physical address is in an active block of the superblock, otherwise, (ii) the summary page of the superblock, based on the block index and page index; (b) providing, by a host layer module of the media controller, an initial number of data transfer segments to corresponding ones of the allocated physical buffers, the number of data transfer segments equivalent to the number of allocated physical buffers; (c) providing, by the buffer layer module, the number of data transfer segments to the storage media; and (d) repeating steps (a), (b) and (c) for each subsequent number of data transfer segments that remain. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. 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 transferring, by a media controller, data associated with a host data transfer between a host device and a storage media, the method comprising:
-
by a flash translation layer module of the media controller; mapping a physical address in the storage media to a logical sector address, wherein the logical sector address corresponds to mapping data comprising;
(i) a page index, (ii) a block index, and (iii) a superblock number of the storage media;storing the mapping data in at least one summary page corresponding to the superblock containing the physical address; storing one or more page offsets of an active block in the superblock in at least one active block table corresponding to the superblock; storing a block index and a page index of the at least one summary page and an address of the least one active block table, for each superblock of the storage device, in a page global directory corresponding to the storage media; by a host layer module of the media controller; receiving a data request to transfer data between a host device coupled to the media controller and one or more sectors of the storage media, wherein the data request comprises at least one of (i) a starting logical sector address, (ii) a total number of sectors to be accessed, and (iii) data to be written to the sectors; identifying for each data transfer segment, based on the starting logical sector address, a corresponding (i) superblock number, (ii) block index and (iii) page index within the storage media; and locating, from the page global directory of the storage device, the at least one active block table and the summary page corresponding to the superblock number; by a buffer layer module of the media controller; segmenting the host data transfer into one or more data transfer segments, wherein each data transfer segment corresponds to at least a portion of the data; allocating a number of physical buffers to a virtual circular buffer for buffering the one or more data transfer segments; and transferring, by the virtual circular buffer, each of the data transfer segments between the host device and the storage media through the allocated physical buffers, by the steps of; if the host data transfer is a host write operation; (a) identifying, by the flash translation layer module, physical addresses for each data transfer segment based on (i) the at least one active block table of the superblock, if the physical address is in an active block of the superblock, otherwise, (ii) the summary page of the superblock, based on the block index and page index; (b) providing, by a host layer module of the media controller, an initial number of data transfer segments to corresponding ones of the allocated physical buffers, the number of data transfer segments equivalent to the number of allocated physical buffers; (c) providing, by the buffer layer module, the number of data transfer segments to the storage media; and (d) repeating steps (a), (b) and (c) for each subsequent number of data transfer segments that remain. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18)
-
-
19. A media controller, the media controller implemented as at least one integrated circuit, for synchronizing data cached in a buffer of the media between a host device and at least one storage media, the media controller comprising:
-
a host layer module configured to; send data to, and receive data from, the communication link, wherein data requests are received from the at least one external device, and wherein the data requests comprise (i) a starting logical sector address and (ii) a span of sectors to be transferred; a flash translation layer module configured to; maintain at least one active block table corresponding to each superblock, the active block table for storing one or more page offsets of an active block in the corresponding superblock; maintain at least one summary page for storing mapping data corresponding to each superblock, wherein the mapping data maps a physical address in the storage device to a logical sector address, the mapping in data comprising;
(iii) ii a block index, and iii a superblock number;maintain a page global directory for storing a block index and a page index of the at least one summary page and an address of the at least active block table for each superblock of the storage device; a buffer layer module configured to; segment the host data transfer into one or more data transfer segments, wherein each data transfer segment corresponds to at least a portion of the data; and allocate one or more physical buffers to a virtual circular buffer; the flash translation layer module configured to, for each data transfer segment; identify, based on the starting logical sector address, a corresponding (i) superblock number, (ii) block index and (iii) page index within the storage media for each data transfer segment; locate, from the page global directory of the storage device, the at least one active block table and the summary page corresponding to the superblock number; and iteratively identify physical addresses for each data transfer segment based on (i) the at least one active block table of the superblock, if the physical address is in an active block of the superblock, otherwise, (ii) the summary page of the superblock, based on the block index and page index; wherein, if the host data transfer is a host write operation; the host layer module transfers an initial number of data transfer segments to corresponding ones of an initial number of allocated physical buffers of the virtual circular buffer, the initial number of data transfer segments equivalent to the initial number of allocated physical buffers; the buffer layer module transfers, in parallel, i) the initial number of data transfer segments to the storage media, at the corresponding physical addresses identified by the flash translation layer module, from the virtual circular buffer, and ii) one or more subsequent numbers of data transfer segments from the host layer module to corresponding ones of allocated physical buffers of the virtual circular buffer for remaining data transfer segments; otherwise, if the host data transfer is a host read operation; the buffer layer module transfers an initial number of data transfer segments from the storage media, at the corresponding physical addresses identified by the flash translation layer module, to corresponding ones of the allocated physical buffers of the virtual circular buffer, the initial number of data transfer segments equivalent to the initial number of allocated physical buffers; and the buffer layer module transfers, in parallel, i) the initial number of data transfer segments from the virtual circular buffer to the host layer module, and ii) one or more subsequent numbers of data transfer segments from storage media, at the corresponding physical addresses identified by the flash translation layer module, to subsequent corresponding ones of allocated physical buffers of the virtual circular buffer for remaining data transfer segments. - View Dependent Claims (20)
-
Specification