Access request processing method and apparatus, and computer system
US-2018300236-A1 · Oct 18, 2018 · US
US10606746B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-10606746-B2 |
| Application number | US-201816018602-A |
| Country | US |
| Kind code | B2 |
| Filing date | Jun 26, 2018 |
| Priority date | Dec 30, 2015 |
| Publication date | Mar 31, 2020 |
| Grant date | Mar 31, 2020 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
An access request processing method and apparatus, and a computer system is disclosed. The computer system includes a processor and a non-volatile memory (NVM). When receiving a write request, the processor determines an object cache page according to the write request. After determining that the NVM stores a log chain of the object cache page, the processor inserts, into the log chain of the object cache page, a second data node recording information about a second log data chunk. The log chain already includes a first data node recording information about the first log data chunk. The second log data chunk is at least partial to-be-written data of the write request. Then, the processor sets, in the first data node, data that is in the first log data chunk and that overlaps the second log data chunk to invalid data.
Opening claim text (preview).
What is claimed is: 1. An access request processing method, wherein the method is performed by a computer system, the computer system comprises a processor and a non-volatile memory (NVM), and the access request processing method comprises: receiving a write request, wherein the write request carries a file identifier, a buffer pointer, and a size of to-be-written data, the buffer pointer points to a buffer for caching the to-be-written data, and the to-be-written data is modified data of an object file that is to be accessed according to the write request; obtaining an access location according to the file identifier, wherein the access location indicates a start address for writing data into the object file according to the write request; determining object cache pages according to the access location, the size of the to-be-written data, and a size of a cache page, wherein the object cache pages are memory pages in internal memory that are configured to cache file data that is in the object file and that is modified by the to-be-written data; determining that the NVM stores a log chain of a first object cache page of the object cache pages, wherein the log chain of the first object cache page comprises a first data node, the first data node comprises information about a first log data chunk, and the first log data chunk comprises modified data of the first object cache page during a modification; inserting a second data node into the log chain of the first object cache page, wherein the second data node comprises information about a second log data chunk of the first object cache page, the second log data chunk is at least partial to-be-written data that is obtained from the buffer to which the buffer pointer points, and the information about the second log data chunk comprises the second log data chunk or a storage address of the second log data chunk in the NVM; determining that an intra-page location of the second log data chunk overlaps an intra-page location of the first log data chunk, wherein the intra-page location of the second log data chunk is a location of the second log data chunk in the first object cache page, and the intra-page location of the first log data chunk is a location of the first log data chunk in the first object cache page; and setting, in the first data node, data that is in the first log data chunk and that overlaps the second log data chunk to invalid data. 2. The access request processing method according to claim 1 , wherein the inserting the second data node into the log chain of the first object cache page comprises inserting the second data node into a head or a tail of the log chain of the first object cache page, wherein after the second data node is inserted, the log chain of the first object cache page comprises at least two data nodes that are sequentially linked according to an update sequence of the first object cache page. 3. The access request processing method according to claim 1 , further comprising: updating at least one log data chunk in the log chain to the first object cache page according to information about the at least one log data chunk, to obtain an updated first object cache page, wherein the information about the at least one log data chunk is recorded in the log chain of the first object cache page; and storing data of the updated first object cache page in an external storage device of the computer system. 4. The access request processing method according to claim 1 , wherein the setting, in the first data node, data that is in the first log data chunk and that overlaps the second log data chunk to invalid data comprises, when the intra-page location of the second log data chunk partially overlaps the intra-page location of the first log data chunk, modifying, in the first data node, information about the intra-page location of the first log data chunk according to an intra-page location of the data that is in the first log data chunk and that overlaps the second log data chunk, to set the data that is in the first log data chunk and that overlaps the second log data chunk to invalid data, wherein the information about the intra-page location of the first log data chunk comprises at least one of an “intra-page offset” or a “log data length” of the first log data chunk. 5. The access request processing method according to claim 1 , wherein the setting, in the first data node, data that is in the first log data chunk and that overlaps the second log data chunk to invalid data comprises, when the intra-page location of the second log data chunk comprises the intra-page location of the first log data chunk, deleting the first data node. 6. The access request processing method according to claim 1 , wherein the setting, in the first data node, data that is in the first log data chunk and that overlaps the second log data chunk to invalid data comprises: when the intra-page location of the first log data chunk comprises the intra-page location of the second log data chunk, splitting the first data node into a first data subnode and a second data subnode, wherein data structures of the first data subnode and the second data subnode are the same as a data structure of the first data node; and separately recording, in the first data subnode and the second data subnode, data that is in the first log data chunk and that does not overlap the second log data chunk, to set the data that is in the first log data chunk and that overlaps the second log data chunk to invalid data. 7. The access request processing method according to claim 3 , further comprising after storing the data of the updated first object cache page in the external storage device of the computer system, reclaiming the log chain of the first object cache page. 8. A computer system comprising: a non-volatile memory (NVM); and a processor coupled to the NVM and configured to: receive a write request, wherein the write request carries a file identifier, a buffer pointer, and a size of to-be-written data, the buffer pointer points to a buffer for caching the to-be-written data, and the to-be-written data is modified data of an object file that is to be accessed according to the write request; obtain an access location according to the file identifier, wherein the access location indicates a start address for writing data into the object file according to the write request; determine object cache pages according to the access location, the size of the to-be-written data, and a size of a cache page, wherein the object cache pages are memory pages in internal memory that are configured to cache file data that is in the object file and that is modified by the to-be-written data; determine that the NVM stores a log chain of a first object cache page of the object cache pages, wherein the log chain of the first object cache page comprises a first data node, the first data node comprises information about a first log data chunk, and the first log data chunk comprises modified data of the first object cache page during a modification; insert a second data node into the log chain of the first object cache page, wherein the second data node comprises information about a second log data chunk of the first object cache page, the second log data chunk is at least partial to-be-written data that is obtained from the buffer to which the buffer pointer points, and the information about the second log data chunk comprises the second log data chunk or a storage address of the second log data chunk in the NVM; determine that an intra-page location of the second log data chunk overlaps an intra-page location of the first log data chunk, wherein the intra-page location of the second log data chunk is a location of the second log data chunk in the first object
Sector or disk block · CPC title
Resource optimization · CPC title
with main memory updating (G06F12/0806 takes precedence) · CPC title
Data transfer between cache memory and other subsystems, e.g. storage devices or host systems · CPC title
In storage device · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.