Correct format error
Signed-off-by: Derek Su <derek.su@suse.com>
This commit is contained in:
parent
44fdc5864a
commit
11a8d36765
@ -496,6 +496,8 @@ Example response:
|
|||||||
"bdev_lvol_rename_lvstore",
|
"bdev_lvol_rename_lvstore",
|
||||||
"bdev_lvol_create_lvstore",
|
"bdev_lvol_create_lvstore",
|
||||||
"bdev_lvol_shallow_copy",
|
"bdev_lvol_shallow_copy",
|
||||||
|
"bdev_lvol_set_xattr",
|
||||||
|
"bdev_lvol_get_xattr",
|
||||||
"bdev_lvol_get_fragmap",
|
"bdev_lvol_get_fragmap",
|
||||||
"bdev_daos_delete",
|
"bdev_daos_delete",
|
||||||
"bdev_daos_create",
|
"bdev_daos_create",
|
||||||
@ -10016,6 +10018,29 @@ Name | Optional | Type | Description
|
|||||||
src_lvol_name | Required | string | UUID or alias of lvol to create a copy from
|
src_lvol_name | Required | string | UUID or alias of lvol to create a copy from
|
||||||
dst_bdev_name | Required | string | Name of the bdev that acts as destination for the copy
|
dst_bdev_name | Required | string | Name of the bdev that acts as destination for the copy
|
||||||
|
|
||||||
|
### bdev_lvol_set_xattr {#rpc_bdev_lvol_set_xattr}
|
||||||
|
|
||||||
|
Set xattr for lvol bdev
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
Name | Optional | Type | Description
|
||||||
|
----------------------- | -------- | ----------- | -----------
|
||||||
|
name | Required | string | UUID or alias of lvol
|
||||||
|
xattr_name | Required | string | Name of the xattr
|
||||||
|
xattr_value | Required | string | Value of the xattr
|
||||||
|
|
||||||
|
### bdev_lvol_get_xattr {#rpc_bdev_lvol_get_xattr}
|
||||||
|
|
||||||
|
Get xattr for lvol bdev
|
||||||
|
#### Parameters
|
||||||
|
|
||||||
|
Name | Optional | Type | Description
|
||||||
|
----------------------- | -------- | ----------- | -----------
|
||||||
|
name | Required | string | UUID or alias of lvol
|
||||||
|
xattr_name | Required | string | Name of the xattr
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
Example request:
|
Example request:
|
||||||
|
@ -197,4 +197,12 @@ bdev_lvol_decouple_parent [-h] name
|
|||||||
Decouple parent of a logical volume
|
Decouple parent of a logical volume
|
||||||
optional arguments:
|
optional arguments:
|
||||||
-h, --help show help
|
-h, --help show help
|
||||||
|
bdev_lvol_set_xattr [-h] name xattr_name xattr_value
|
||||||
|
Set xattr for lvol bdev
|
||||||
|
optional arguments:
|
||||||
|
-h, --help show help
|
||||||
|
bdev_lvol_get_xattr [-h] name xattr_name
|
||||||
|
Get xattr for lvol bdev
|
||||||
|
optional arguments:
|
||||||
|
-h, --help show help
|
||||||
```
|
```
|
||||||
|
@ -331,7 +331,8 @@ spdk_is_divisible_by(uint64_t dividend, uint64_t divisor)
|
|||||||
* \return void
|
* \return void
|
||||||
*/
|
*/
|
||||||
static inline void
|
static inline void
|
||||||
spdk_current_utc_time_rfc3339(char *buf, size_t buf_size) {
|
spdk_current_utc_time_rfc3339(char *buf, size_t buf_size)
|
||||||
|
{
|
||||||
struct tm *utc;
|
struct tm *utc;
|
||||||
time_t rawtime;
|
time_t rawtime;
|
||||||
|
|
||||||
|
@ -516,7 +516,9 @@ spdk_bit_array_to_base64_string(const struct spdk_bit_array *array)
|
|||||||
|
|
||||||
for (uint32_t i = 0; i < bit_count; i++) {
|
for (uint32_t i = 0; i < bit_count; i++) {
|
||||||
if (spdk_bit_array_get(array, i)) {
|
if (spdk_bit_array_get(array, i)) {
|
||||||
// Set the bit in bytes's correct position
|
/*
|
||||||
|
* Set the bit in bytes's correct position
|
||||||
|
*/
|
||||||
((uint8_t *)bytes)[i / 8] |= 1 << (i % 8);
|
((uint8_t *)bytes)[i / 8] |= 1 << (i % 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2218,7 +2218,9 @@ vbdev_lvol_get_fragmap(struct spdk_lvol *lvol, uint64_t offset, uint64_t size,
|
|||||||
uint64_t cluster_size, num_clusters, block_size, num_blocks, lvol_size, segment_size;
|
uint64_t cluster_size, num_clusters, block_size, num_blocks, lvol_size, segment_size;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
// Create a bitmap recording the allocated clusters
|
/*
|
||||||
|
* Create a bitmap recording the allocated clusters
|
||||||
|
*/
|
||||||
cluster_size = spdk_bs_get_cluster_size(lvol->lvol_store->blobstore);
|
cluster_size = spdk_bs_get_cluster_size(lvol->lvol_store->blobstore);
|
||||||
block_size = spdk_bdev_get_block_size(lvol->bdev);
|
block_size = spdk_bdev_get_block_size(lvol->bdev);
|
||||||
num_blocks = spdk_bdev_get_num_blocks(lvol->bdev);
|
num_blocks = spdk_bdev_get_num_blocks(lvol->bdev);
|
||||||
@ -2252,7 +2254,9 @@ vbdev_lvol_get_fragmap(struct spdk_lvol *lvol, uint64_t offset, uint64_t size,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Construct a fragmap of the lvol
|
/*
|
||||||
|
* Construct a fragmap of the lvol
|
||||||
|
*/
|
||||||
rc = spdk_bdev_open_ext(lvol->bdev->name, false,
|
rc = spdk_bdev_open_ext(lvol->bdev->name, false,
|
||||||
dummy_bdev_event_cb, NULL, &desc);
|
dummy_bdev_event_cb, NULL, &desc);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
|
@ -166,8 +166,7 @@ void vbdev_lvol_shallow_copy(struct spdk_lvol *lvol, const char *bdev_name,
|
|||||||
* @param cb_fn Completion callback
|
* @param cb_fn Completion callback
|
||||||
* @param cb_arg Completion callback custom arguments
|
* @param cb_arg Completion callback custom arguments
|
||||||
*/
|
*/
|
||||||
void
|
void vbdev_lvol_get_fragmap(struct spdk_lvol *lvol, uint64_t offset, uint64_t size,
|
||||||
vbdev_lvol_get_fragmap(struct spdk_lvol *lvol, uint64_t offset, uint64_t size,
|
|
||||||
spdk_lvol_op_with_fragmap_handle_complete cb_fn, void *cb_arg);
|
spdk_lvol_op_with_fragmap_handle_complete cb_fn, void *cb_arg);
|
||||||
|
|
||||||
#endif /* SPDK_VBDEV_LVOL_H */
|
#endif /* SPDK_VBDEV_LVOL_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user