Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[storage] Transaction support #212

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions storage/v1alpha1/autogen.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@

- [CryptoType](#opi_api-storage-v1-CryptoType)

- [transactions.proto](#transactions-proto)
- [CreateTransactionRequest](#opi_api-storage-v1-CreateTransactionRequest)
- [DeleteTransactionRequest](#opi_api-storage-v1-DeleteTransactionRequest)
- [ExecuteTransactionRequest](#opi_api-storage-v1-ExecuteTransactionRequest)
- [Transaction](#opi_api-storage-v1-Transaction)

- [TransactionService](#opi_api-storage-v1-TransactionService)

- [object_key.proto](#object_key-proto)
- [ObjectKey](#opi_api-common-v1-ObjectKey)

Expand Down Expand Up @@ -201,6 +209,7 @@
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| device | [AioController](#opi_api-storage-v1-AioController) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -216,6 +225,7 @@
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| handle | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand Down Expand Up @@ -317,6 +327,7 @@ Intentionally empty
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| device | [AioController](#opi_api-storage-v1-AioController) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand Down Expand Up @@ -397,6 +408,7 @@ Back End (network-facing) APIs. This service is for AIO generic kernel block dev
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| device | [NullDebug](#opi_api-storage-v1-NullDebug) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -412,6 +424,7 @@ Back End (network-facing) APIs. This service is for AIO generic kernel block dev
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| handle | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand Down Expand Up @@ -498,6 +511,7 @@ Intentionally empty.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| device | [NullDebug](#opi_api-storage-v1-NullDebug) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand Down Expand Up @@ -828,6 +842,7 @@ Back End (network-facing) APIs. NVMe/TCP and NVMe/RoCEv2 protocols are covered b
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| controller | [NVMeController](#opi_api-storage-v1-NVMeController) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -843,6 +858,7 @@ Back End (network-facing) APIs. NVMe/TCP and NVMe/RoCEv2 protocols are covered b
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| namespace | [NVMeNamespace](#opi_api-storage-v1-NVMeNamespace) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -858,6 +874,7 @@ Back End (network-facing) APIs. NVMe/TCP and NVMe/RoCEv2 protocols are covered b
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| subsystem | [NVMeSubsystem](#opi_api-storage-v1-NVMeSubsystem) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -873,6 +890,7 @@ Back End (network-facing) APIs. NVMe/TCP and NVMe/RoCEv2 protocols are covered b
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| controller_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -888,6 +906,7 @@ Back End (network-facing) APIs. NVMe/TCP and NVMe/RoCEv2 protocols are covered b
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| namespace_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -903,6 +922,7 @@ Back End (network-facing) APIs. NVMe/TCP and NVMe/RoCEv2 protocols are covered b
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| subsystem_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand Down Expand Up @@ -1311,6 +1331,7 @@ Back End (network-facing) APIs. NVMe/TCP and NVMe/RoCEv2 protocols are covered b
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| controller | [NVMeController](#opi_api-storage-v1-NVMeController) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -1326,6 +1347,7 @@ Back End (network-facing) APIs. NVMe/TCP and NVMe/RoCEv2 protocols are covered b
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| namespace | [NVMeNamespace](#opi_api-storage-v1-NVMeNamespace) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -1341,6 +1363,7 @@ Back End (network-facing) APIs. NVMe/TCP and NVMe/RoCEv2 protocols are covered b
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| subsystem | [NVMeSubsystem](#opi_api-storage-v1-NVMeSubsystem) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand Down Expand Up @@ -1426,6 +1449,7 @@ Front End (host-facing) APIs. Mostly used for NVMe/PCIe emulation and host prese
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| controller | [VirtioBlk](#opi_api-storage-v1-VirtioBlk) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -1441,6 +1465,7 @@ Front End (host-facing) APIs. Mostly used for NVMe/PCIe emulation and host prese
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| controller_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand Down Expand Up @@ -1503,6 +1528,7 @@ Front End (host-facing) APIs. Mostly used for NVMe/PCIe emulation and host prese
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| controller | [VirtioBlk](#opi_api-storage-v1-VirtioBlk) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand Down Expand Up @@ -1614,6 +1640,7 @@ Front End (host-facing) APIs. Mostly used for Virtio-blk emulation emulation and
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| controller | [VirtioScsiController](#opi_api-storage-v1-VirtioScsiController) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -1629,6 +1656,7 @@ Front End (host-facing) APIs. Mostly used for Virtio-blk emulation emulation and
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| lun | [VirtioScsiLun](#opi_api-storage-v1-VirtioScsiLun) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -1644,6 +1672,7 @@ Front End (host-facing) APIs. Mostly used for Virtio-blk emulation emulation and
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| target | [VirtioScsiTarget](#opi_api-storage-v1-VirtioScsiTarget) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -1659,6 +1688,7 @@ Front End (host-facing) APIs. Mostly used for Virtio-blk emulation emulation and
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| controller_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -1675,6 +1705,7 @@ Front End (host-facing) APIs. Mostly used for Virtio-blk emulation emulation and
| ----- | ---- | ----- | ----------- |
| controller_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |
| lun_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -1690,6 +1721,7 @@ Front End (host-facing) APIs. Mostly used for Virtio-blk emulation emulation and
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| target_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand Down Expand Up @@ -1848,6 +1880,7 @@ Front End (host-facing) APIs. Mostly used for Virtio-blk emulation emulation and
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| controller | [VirtioScsiController](#opi_api-storage-v1-VirtioScsiController) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -1863,6 +1896,7 @@ Front End (host-facing) APIs. Mostly used for Virtio-blk emulation emulation and
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| lun | [VirtioScsiLun](#opi_api-storage-v1-VirtioScsiLun) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand All @@ -1878,6 +1912,7 @@ Front End (host-facing) APIs. Mostly used for Virtio-blk emulation emulation and
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| target | [VirtioScsiTarget](#opi_api-storage-v1-VirtioScsiTarget) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand Down Expand Up @@ -2079,6 +2114,7 @@ Front End (host-facing) APIs. Mostly used for Virtio-scsi emulation and host pre
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| volume | [Crypto](#opi_api-storage-v1-Crypto) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand Down Expand Up @@ -2143,6 +2179,7 @@ Front End (host-facing) APIs. Mostly used for Virtio-scsi emulation and host pre
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| crypto_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand Down Expand Up @@ -2205,6 +2242,7 @@ Front End (host-facing) APIs. Mostly used for Virtio-scsi emulation and host pre
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| volume | [Crypto](#opi_api-storage-v1-Crypto) | | |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |



Expand Down Expand Up @@ -2292,6 +2330,89 @@ AES encryption type to be used



<a name="transactions-proto"></a>
<p align="right"><a href="#top">Top</a></p>

## transactions.proto



<a name="opi_api-storage-v1-CreateTransactionRequest"></a>

### CreateTransactionRequest
Empty






<a name="opi_api-storage-v1-DeleteTransactionRequest"></a>

### DeleteTransactionRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |






<a name="opi_api-storage-v1-ExecuteTransactionRequest"></a>

### ExecuteTransactionRequest



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |






<a name="opi_api-storage-v1-Transaction"></a>

### Transaction



| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| txn_id | [opi_api.common.v1.ObjectKey](#opi_api-common-v1-ObjectKey) | | |












<a name="opi_api-storage-v1-TransactionService"></a>

### TransactionService


| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| CreateTransaction | [CreateTransactionRequest](#opi_api-storage-v1-CreateTransactionRequest) | [Transaction](#opi_api-storage-v1-Transaction) | |
| DeleteTransaction | [DeleteTransactionRequest](#opi_api-storage-v1-DeleteTransactionRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |
| ExecuteTransaction | [ExecuteTransactionRequest](#opi_api-storage-v1-ExecuteTransactionRequest) | [.google.protobuf.Empty](#google-protobuf-Empty) | |





<a name="object_key-proto"></a>
<p align="right"><a href="#top">Top</a></p>

Expand Down
6 changes: 6 additions & 0 deletions storage/v1alpha1/backend_aio.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,20 @@ message AioController {

message AioControllerCreateRequest {
AioController device = 1;

common.v1.ObjectKey txn_id = 2;
}

message AioControllerDeleteRequest {
common.v1.ObjectKey handle = 1;

common.v1.ObjectKey txn_id = 2;
}

message AioControllerUpdateRequest {
AioController device = 1;

common.v1.ObjectKey txn_id = 2;
}

message AioControllerList{
Expand Down
5 changes: 5 additions & 0 deletions storage/v1alpha1/backend_null.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,20 @@ message NullDebug {

message NullDebugCreateRequest {
NullDebug device = 1;

common.v1.ObjectKey txn_id = 2;
}

message NullDebugDeleteRequest {
common.v1.ObjectKey handle = 1;

common.v1.ObjectKey txn_id = 2;
}

message NullDebugUpdateRequest {
NullDebug device = 1;

common.v1.ObjectKey txn_id = 2;
}

message NullDebugListRequest {
Expand Down
Loading