Skip to content

Commit a70bd8f

Browse files
committed
config-linux: Drop redundant 'blkio' prefix from blockIO properties
These are long enough without the prefix, and linux.resources.blockIO.blkioWeight, etc. are just as specific as linux.resources.blockIO.weight. Generated with: $ sed -i s/blkioWeight/weight/g $(git grep -l blkioWeight) $ sed -i s/blkioLeaf/leaf/g $(git grep -l blkioLeaf) $ sed -i s/blkioThrottle/throttle/g $(git grep -l blkioThrottle) Signed-off-by: W. Trevor King <[email protected]>
1 parent e6c9689 commit a70bd8f

File tree

6 files changed

+46
-46
lines changed

6 files changed

+46
-46
lines changed

config-linux.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -339,18 +339,18 @@ For more information, see the kernel cgroups documentation about [blkio][cgroup-
339339

340340
The following parameters can be specified to set up the controller:
341341

342-
* **`blkioWeight`** *(uint16, OPTIONAL)* - specifies per-cgroup weight. This is default weight of the group on all devices until and unless overridden by per-device rules.
342+
* **`weight`** *(uint16, OPTIONAL)* - specifies per-cgroup weight. This is default weight of the group on all devices until and unless overridden by per-device rules.
343343

344-
* **`blkioLeafWeight`** *(uint16, OPTIONAL)* - equivalents of `blkioWeight` for the purpose of deciding how much weight tasks in the given cgroup has while competing with the cgroup's child cgroups.
344+
* **`leafWeight`** *(uint16, OPTIONAL)* - equivalents of `weight` for the purpose of deciding how much weight tasks in the given cgroup has while competing with the cgroup's child cgroups.
345345

346-
* **`blkioWeightDevice`** *(array of objects, OPTIONAL)* - specifies the list of devices which will be bandwidth rate limited. The following parameters can be specified per-device:
346+
* **`weightDevice`** *(array of objects, OPTIONAL)* - specifies the list of devices which will be bandwidth rate limited. The following parameters can be specified per-device:
347347
* **`major, minor`** *(int64, REQUIRED)* - major, minor numbers for device. More info in [mknod(1)][mknod.1] man page.
348348
* **`weight`** *(uint16, OPTIONAL)* - bandwidth rate for the device.
349349
* **`leafWeight`** *(uint16, OPTIONAL)* - bandwidth rate for the device while competing with the cgroup's child cgroups, CFQ scheduler only
350350

351351
You MUST specify at least one of `weight` or `leafWeight` in a given entry, and MAY specify both.
352352

353-
* **`blkioThrottleReadBpsDevice`**, **`blkioThrottleWriteBpsDevice`**, **`blkioThrottleReadIOPSDevice`**, **`blkioThrottleWriteIOPSDevice`** *(array of objects, OPTIONAL)* - specify the list of devices which will be IO rate limited.
353+
* **`throttleReadBpsDevice`**, **`throttleWriteBpsDevice`**, **`throttleReadIOPSDevice`**, **`throttleWriteIOPSDevice`** *(array of objects, OPTIONAL)* - specify the list of devices which will be IO rate limited.
354354
The following parameters can be specified per-device:
355355
* **`major, minor`** *(int64, REQUIRED)* - major, minor numbers for device. More info in [mknod(1)][mknod.1] man page.
356356
* **`rate`** *(uint64, REQUIRED)* - IO rate limit for the device
@@ -359,9 +359,9 @@ The following parameters can be specified to set up the controller:
359359

360360
```json
361361
"blockIO": {
362-
"blkioWeight": 10,
363-
"blkioLeafWeight": 10,
364-
"blkioWeightDevice": [
362+
"weight": 10,
363+
"leafWeight": 10,
364+
"weightDevice": [
365365
{
366366
"major": 8,
367367
"minor": 0,
@@ -374,14 +374,14 @@ The following parameters can be specified to set up the controller:
374374
"weight": 500
375375
}
376376
],
377-
"blkioThrottleReadBpsDevice": [
377+
"throttleReadBpsDevice": [
378378
{
379379
"major": 8,
380380
"minor": 0,
381381
"rate": 600
382382
}
383383
],
384-
"blkioThrottleWriteIOPSDevice": [
384+
"throttleWriteIOPSDevice": [
385385
{
386386
"major": 8,
387387
"minor": 16,

config.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -745,9 +745,9 @@ Here is a full example `config.json` for reference.
745745
}
746746
],
747747
"blockIO": {
748-
"blkioWeight": 10,
749-
"blkioLeafWeight": 10,
750-
"blkioWeightDevice": [
748+
"weight": 10,
749+
"leafWeight": 10,
750+
"weightDevice": [
751751
{
752752
"major": 8,
753753
"minor": 0,
@@ -760,14 +760,14 @@ Here is a full example `config.json` for reference.
760760
"weight": 500
761761
}
762762
],
763-
"blkioThrottleReadBpsDevice": [
763+
"throttleReadBpsDevice": [
764764
{
765765
"major": 8,
766766
"minor": 0,
767767
"rate": 600
768768
}
769769
],
770-
"blkioThrottleWriteIOPSDevice": [
770+
"throttleWriteIOPSDevice": [
771771
{
772772
"major": 8,
773773
"minor": 16,

schema/config-linux.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,44 +64,44 @@
6464
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO",
6565
"type": "object",
6666
"properties": {
67-
"blkioWeight": {
68-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeight",
69-
"$ref": "defs-linux.json#/definitions/blkioWeight"
67+
"weight": {
68+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/weight",
69+
"$ref": "defs-linux.json#/definitions/weight"
7070
},
71-
"blkioLeafWeight": {
72-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioLeafWeight",
73-
"$ref": "defs-linux.json#/definitions/blkioWeight"
71+
"leafWeight": {
72+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/leafWeight",
73+
"$ref": "defs-linux.json#/definitions/weight"
7474
},
75-
"blkioThrottleReadBpsDevice": {
76-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleReadBpsDevice",
75+
"throttleReadBpsDevice": {
76+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleReadBpsDevice",
7777
"type": "array",
7878
"items": {
7979
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
8080
}
8181
},
82-
"blkioThrottleWriteBpsDevice": {
83-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleWriteBpsDevice",
82+
"throttleWriteBpsDevice": {
83+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleWriteBpsDevice",
8484
"type": "array",
8585
"items": {
8686
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
8787
}
8888
},
89-
"blkioThrottleReadIopsDevice": {
90-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleReadIopsDevice",
89+
"throttleReadIopsDevice": {
90+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleReadIopsDevice",
9191
"type": "array",
9292
"items": {
9393
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
9494
}
9595
},
96-
"blkioThrottleWriteIopsDevice": {
97-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioThrottleWriteIopsDevice",
96+
"throttleWriteIopsDevice": {
97+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/throttleWriteIopsDevice",
9898
"type": "array",
9999
"items": {
100100
"$ref": "defs-linux.json#/definitions/blockIODeviceThrottle"
101101
}
102102
},
103-
"blkioWeightDevice": {
104-
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/blkioWeightDevice",
103+
"weightDevice": {
104+
"id": "https://opencontainers.org/schema/bundle/linux/resources/blockIO/weightDevice",
105105
"type": "array",
106106
"items": {
107107
"$ref": "defs-linux.json#/definitions/blockIODeviceWeight"

schema/defs-linux.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
}
145145
}
146146
},
147-
"blkioWeight": {
147+
"weight": {
148148
"type": "integer"
149149
},
150150
"blockIODevice": {
@@ -172,10 +172,10 @@
172172
"type": "object",
173173
"properties": {
174174
"weight": {
175-
"$ref": "#/definitions/blkioWeight"
175+
"$ref": "#/definitions/weight"
176176
},
177177
"leafWeight": {
178-
"$ref": "#/definitions/blkioWeight"
178+
"$ref": "#/definitions/weight"
179179
}
180180
}
181181
}

schema/test/config/good/spec-example.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,9 @@
278278
}
279279
],
280280
"blockIO": {
281-
"blkioWeight": 10,
282-
"blkioLeafWeight": 10,
283-
"blkioWeightDevice": [
281+
"weight": 10,
282+
"leafWeight": 10,
283+
"weightDevice": [
284284
{
285285
"major": 8,
286286
"minor": 0,
@@ -293,14 +293,14 @@
293293
"weight": 500
294294
}
295295
],
296-
"blkioThrottleReadBpsDevice": [
296+
"throttleReadBpsDevice": [
297297
{
298298
"major": 8,
299299
"minor": 0,
300300
"rate": 600
301301
}
302302
],
303-
"blkioThrottleWriteIOPSDevice": [
303+
"throttleWriteIOPSDevice": [
304304
{
305305
"major": 8,
306306
"minor": 16,

specs-go/config.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ type linuxBlockIODevice struct {
249249
Minor int64 `json:"minor"`
250250
}
251251

252-
// LinuxWeightDevice struct holds a `major:minor weight` pair for blkioWeightDevice
252+
// LinuxWeightDevice struct holds a `major:minor weight` pair for weightDevice
253253
type LinuxWeightDevice struct {
254254
linuxBlockIODevice
255255
// Weight is the bandwidth rate for the device.
@@ -268,19 +268,19 @@ type LinuxThrottleDevice struct {
268268
// LinuxBlockIO for Linux cgroup 'blkio' resource management
269269
type LinuxBlockIO struct {
270270
// Specifies per cgroup weight
271-
Weight *uint16 `json:"blkioWeight,omitempty"`
271+
Weight *uint16 `json:"weight,omitempty"`
272272
// Specifies tasks' weight in the given cgroup while competing with the cgroup's child cgroups, CFQ scheduler only
273-
LeafWeight *uint16 `json:"blkioLeafWeight,omitempty"`
273+
LeafWeight *uint16 `json:"leafWeight,omitempty"`
274274
// Weight per cgroup per device, can override BlkioWeight
275-
WeightDevice []LinuxWeightDevice `json:"blkioWeightDevice,omitempty"`
275+
WeightDevice []LinuxWeightDevice `json:"weightDevice,omitempty"`
276276
// IO read rate limit per cgroup per device, bytes per second
277-
ThrottleReadBpsDevice []LinuxThrottleDevice `json:"blkioThrottleReadBpsDevice,omitempty"`
277+
ThrottleReadBpsDevice []LinuxThrottleDevice `json:"throttleReadBpsDevice,omitempty"`
278278
// IO write rate limit per cgroup per device, bytes per second
279-
ThrottleWriteBpsDevice []LinuxThrottleDevice `json:"blkioThrottleWriteBpsDevice,omitempty"`
279+
ThrottleWriteBpsDevice []LinuxThrottleDevice `json:"throttleWriteBpsDevice,omitempty"`
280280
// IO read rate limit per cgroup per device, IO per second
281-
ThrottleReadIOPSDevice []LinuxThrottleDevice `json:"blkioThrottleReadIOPSDevice,omitempty"`
281+
ThrottleReadIOPSDevice []LinuxThrottleDevice `json:"throttleReadIOPSDevice,omitempty"`
282282
// IO write rate limit per cgroup per device, IO per second
283-
ThrottleWriteIOPSDevice []LinuxThrottleDevice `json:"blkioThrottleWriteIOPSDevice,omitempty"`
283+
ThrottleWriteIOPSDevice []LinuxThrottleDevice `json:"throttleWriteIOPSDevice,omitempty"`
284284
}
285285

286286
// LinuxMemory for Linux cgroup 'memory' resource management

0 commit comments

Comments
 (0)