projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rpma: gpspm: introduce the busy_wait_polling toggle
[fio.git]
/
engines
/
libzbc.c
diff --git
a/engines/libzbc.c
b/engines/libzbc.c
index 9e5683349fb1c60d99c782d085de23cb60bafbb5..2aacf7bbebecd3ca0d2a5f11a5346ab26c429c86 100644
(file)
--- a/
engines/libzbc.c
+++ b/
engines/libzbc.c
@@
-86,7
+86,8
@@
static int libzbc_open_dev(struct thread_data *td, struct fio_file *f,
return -ENOMEM;
ret = zbc_open(f->file_name,
return -ENOMEM;
ret = zbc_open(f->file_name,
- flags | ZBC_O_DRV_SCSI | ZBC_O_DRV_ATA, &ld->zdev);
+ flags | ZBC_O_DRV_BLOCK | ZBC_O_DRV_SCSI | ZBC_O_DRV_ATA,
+ &ld->zdev);
if (ret) {
log_err("%s: zbc_open() failed, err=%d\n",
f->file_name, ret);
if (ret) {
log_err("%s: zbc_open() failed, err=%d\n",
f->file_name, ret);
@@
-235,6
+236,11
@@
static int libzbc_report_zones(struct thread_data *td, struct fio_file *f,
zbdz->start = zones[i].zbz_start << 9;
zbdz->len = zones[i].zbz_length << 9;
zbdz->wp = zones[i].zbz_write_pointer << 9;
zbdz->start = zones[i].zbz_start << 9;
zbdz->len = zones[i].zbz_length << 9;
zbdz->wp = zones[i].zbz_write_pointer << 9;
+ /*
+ * ZBC/ZAC do not define zone capacity, so use the zone size as
+ * the zone capacity.
+ */
+ zbdz->capacity = zbdz->len;
switch (zones[i].zbz_type) {
case ZBC_ZT_CONVENTIONAL:
switch (zones[i].zbz_type) {
case ZBC_ZT_CONVENTIONAL:
@@
-278,7
+284,7
@@
static int libzbc_report_zones(struct thread_data *td, struct fio_file *f,
default:
/* Treat all these conditions as offline (don't use!) */
zbdz->cond = ZBD_ZONE_COND_OFFLINE;
default:
/* Treat all these conditions as offline (don't use!) */
zbdz->cond = ZBD_ZONE_COND_OFFLINE;
-
break
;
+
zbdz->wp = zbdz->start
;
}
}
}
}
@@
-397,7
+403,7
@@
static enum fio_q_status libzbc_queue(struct thread_data *td, struct io_u *io_u)
return FIO_Q_COMPLETED;
}
return FIO_Q_COMPLETED;
}
-
static
struct ioengine_ops ioengine = {
+
FIO_STATIC
struct ioengine_ops ioengine = {
.name = "libzbc",
.version = FIO_IOOPS_VERSION,
.open_file = libzbc_open_file,
.name = "libzbc",
.version = FIO_IOOPS_VERSION,
.open_file = libzbc_open_file,