Go to the source code of this file.
◆ DiskStore
| typedef struct DiskStore DiskStore |
◆ DiskStore_GetDataCb
| typedef void(* DiskStore_GetDataCb) (Packet *npkt, uintptr_t ctx) |
DiskStore_GetData completion callback.
- Parameters
-
| npkt | Interest packet. |
| ctx | store->getDataCtx . |
This function is invoked on store->th thread.
◆ DiskStoreRequest
| typedef struct DiskStoreRequest DiskStoreRequest |
DiskStore request context.
◆ DiskStoreSlimRequest
| typedef struct DiskStoreSlimRequest DiskStoreSlimRequest |
DiskStore compact request context.
◆ DiskStore_GetData()
Retrieve a Data packet.
- Parameters
-
| slotID | disk slot number. |
| npkt | an Interest packet. DiskStore takes ownership until callback. |
| dataBuf | a uniquely owned, unsegmented, direct mbuf for Data packet. DiskStore takes ownership until callback. |
| sp | same BdevStoredPacket used during PutData, will be copied. |
This function asynchronously reads from a specified slot of the underlying disk, and parses the content as a Data packet. Upon success, it assigns interest->diskSlot and interest->diskData . Upon failure, it assigns interest->diskSlot and clears interest->diskData . It then calls store->getDataCb with the npkt .
This function may be invoked on any thread, including non-SPDK thread.
◆ DiskStore_PutData()
Store a Data packet.
- Parameters
-
| slotID | disk slot number; slot 0 cannot be used. |
| npkt | a Data packet. DiskStore takes ownership. |
| sp | output of a successful DiskStore_PrepareData . |
This function may be invoked on any thread, including non-SPDK thread.