bdevio: print I/O target bdev information
Change-Id: Icdff86fa7dbf9a44400a9b4796a2671fcc9bf75a Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
249a68e92b
commit
0a845cb2bc
@ -107,6 +107,8 @@ bdevio_construct_targets(void)
|
||||
struct spdk_bdev *bdev;
|
||||
struct io_target *target;
|
||||
|
||||
printf("I/O targets:\n");
|
||||
|
||||
bdev = spdk_bdev_first();
|
||||
while (bdev != NULL) {
|
||||
|
||||
@ -115,6 +117,11 @@ bdevio_construct_targets(void)
|
||||
continue;
|
||||
}
|
||||
|
||||
printf(" %s: %" PRIu64 " blocks of %" PRIu32 " bytes (%" PRIu64 " MiB)\n",
|
||||
bdev->name,
|
||||
bdev->blockcnt, bdev->blocklen,
|
||||
(bdev->blockcnt * bdev->blocklen + 1024 * 1024 - 1) / (1024 * 1024));
|
||||
|
||||
target = malloc(sizeof(struct io_target));
|
||||
if (target == NULL) {
|
||||
return -ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user