}
pthread_mutex_lock(&f->zbd_info->mutex);
- f->zbd_info->wp_sectors_with_data -= data_in_zone;
+ f->zbd_info->wp_valid_data_bytes -= data_in_zone;
pthread_mutex_unlock(&f->zbd_info->mutex);
z->wp = z->start;
return write_cnt == 0;
}
-static uint64_t zbd_set_swd(struct thread_data *td, const struct fio_file *f)
+static uint64_t zbd_set_vdb(struct thread_data *td, const struct fio_file *f)
{
struct fio_zone_info *zb, *ze, *z;
- uint64_t wp_swd = 0;
+ uint64_t wp_vdb = 0;
zb = zbd_get_zone(f, f->min_zone);
ze = zbd_get_zone(f, f->max_zone);
for (z = zb; z < ze; z++) {
if (z->has_wp) {
zone_lock(td, f, z);
- wp_swd += z->wp - z->start;
+ wp_vdb += z->wp - z->start;
}
}
pthread_mutex_lock(&f->zbd_info->mutex);
- f->zbd_info->wp_sectors_with_data = wp_swd;
+ f->zbd_info->wp_valid_data_bytes = wp_vdb;
pthread_mutex_unlock(&f->zbd_info->mutex);
for (z = zb; z < ze; z++)
if (z->has_wp)
zone_unlock(z);
- return wp_swd;
+ return wp_vdb;
}
void zbd_file_reset(struct thread_data *td, struct fio_file *f)
{
struct fio_zone_info *zb, *ze;
- uint64_t swd;
+ uint64_t vdb;
bool verify_data_left = false;
if (!f->zbd_info || !td_write(td))
zb = zbd_get_zone(f, f->min_zone);
ze = zbd_get_zone(f, f->max_zone);
- swd = zbd_set_swd(td, f);
+ vdb = zbd_set_vdb(td, f);
- dprint(FD_ZBD, "%s(%s): swd = %" PRIu64 "\n",
- __func__, f->file_name, swd);
+ dprint(FD_ZBD, "%s(%s): valid data bytes = %" PRIu64 "\n",
+ __func__, f->file_name, vdb);
/*
* If data verification is enabled reset the affected zones before
*/
pthread_mutex_lock(&zbd_info->mutex);
if (z->wp <= zone_end)
- zbd_info->wp_sectors_with_data += zone_end - z->wp;
+ zbd_info->wp_valid_data_bytes += zone_end - z->wp;
pthread_mutex_unlock(&zbd_info->mutex);
z->wp = zone_end;
break;
/* Check whether the zone reset threshold has been exceeded */
if (td->o.zrf.u.f) {
- if (zbdi->wp_sectors_with_data >= f->io_size * td->o.zrt.u.f &&
+ if (zbdi->wp_valid_data_bytes >=
+ f->io_size * td->o.zrt.u.f &&
zbd_dec_and_reset_write_cnt(td, f))
zb->reset_zone = 1;
}
* @mutex: Protects the modifiable members in this structure (refcount and
* num_open_zones).
* @zone_size: size of a single zone in bytes.
- * @wp_sectors_with_data: total size of data in zones with write pointers in
- * units of 512 bytes
+ * @wp_valid_data_bytes: total size of data in zones with write pointers
* @zone_size_log2: log2 of the zone size in bytes if it is a power of 2 or 0
* if the zone size is not a power of 2.
* @nr_zones: number of zones
uint32_t max_open_zones;
pthread_mutex_t mutex;
uint64_t zone_size;
- uint64_t wp_sectors_with_data;
+ uint64_t wp_valid_data_bytes;
uint32_t zone_size_log2;
uint32_t nr_zones;
uint32_t refcount;