Correct format error

Signed-off-by: Derek Su <derek.su@suse.com>
This commit is contained in:
Derek Su 2023-09-25 14:11:39 +08:00 committed by Damiano Cipriani
parent 44fdc5864a
commit 11a8d36765
11 changed files with 55 additions and 16 deletions

View File

@ -496,6 +496,8 @@ Example response:
"bdev_lvol_rename_lvstore",
"bdev_lvol_create_lvstore",
"bdev_lvol_shallow_copy",
"bdev_lvol_set_xattr",
"bdev_lvol_get_xattr",
"bdev_lvol_get_fragmap",
"bdev_daos_delete",
"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
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 request:

View File

@ -197,4 +197,12 @@ bdev_lvol_decouple_parent [-h] name
Decouple parent of a logical volume
optional arguments:
-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
```

View File

@ -331,7 +331,8 @@ spdk_is_divisible_by(uint64_t dividend, uint64_t divisor)
* \return 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;
time_t rawtime;

View File

@ -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++) {
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);
}
}

View File

@ -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;
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);
block_size = spdk_bdev_get_block_size(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;
}
// Construct a fragmap of the lvol
/*
* Construct a fragmap of the lvol
*/
rc = spdk_bdev_open_ext(lvol->bdev->name, false,
dummy_bdev_event_cb, NULL, &desc);
if (rc != 0) {

View File

@ -166,8 +166,7 @@ void vbdev_lvol_shallow_copy(struct spdk_lvol *lvol, const char *bdev_name,
* @param cb_fn Completion callback
* @param cb_arg Completion callback custom arguments
*/
void
vbdev_lvol_get_fragmap(struct spdk_lvol *lvol, uint64_t offset, uint64_t size,
void 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);
#endif /* SPDK_VBDEV_LVOL_H */