projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for zoned block devices
[fio.git]
/
filesetup.c
diff --git
a/filesetup.c
b/filesetup.c
index 2ab251531ae8491fbcb0515547d4ea2aaf006559..580403dbc232aa8676d2a3933c3eac4a5f7e31a5 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-14,6
+14,7
@@
#include "hash.h"
#include "lib/axmap.h"
#include "rwlock.h"
#include "hash.h"
#include "lib/axmap.h"
#include "rwlock.h"
+#include "zbd.h"
#ifdef CONFIG_LINUX_FALLOCATE
#include <linux/falloc.h>
#ifdef CONFIG_LINUX_FALLOCATE
#include <linux/falloc.h>
@@
-1158,7
+1159,14
@@
done:
td->done = 1;
td_restore_runstate(td, old_state);
td->done = 1;
td_restore_runstate(td, old_state);
+
+ if (td->o.zone_mode == ZONE_MODE_ZBD) {
+ err = zbd_init(td);
+ if (err)
+ goto err_out;
+ }
return 0;
return 0;
+
err_offset:
log_err("%s: you need to specify valid offset=\n", o->name);
err_out:
err_offset:
log_err("%s: you need to specify valid offset=\n", o->name);
err_out:
@@
-1346,6
+1354,8
@@
void close_and_free_files(struct thread_data *td)
td_io_unlink_file(td, f);
}
td_io_unlink_file(td, f);
}
+ zbd_free_zone_info(f);
+
if (use_free)
free(f->file_name);
else
if (use_free)
free(f->file_name);
else
@@
-1870,6
+1880,8
@@
void fio_file_reset(struct thread_data *td, struct fio_file *f)
axmap_reset(f->io_axmap);
else if (fio_file_lfsr(f))
lfsr_reset(&f->lfsr, td->rand_seeds[FIO_RAND_BLOCK_OFF]);
axmap_reset(f->io_axmap);
else if (fio_file_lfsr(f))
lfsr_reset(&f->lfsr, td->rand_seeds[FIO_RAND_BLOCK_OFF]);
+
+ zbd_file_reset(td, f);
}
bool fio_files_done(struct thread_data *td)
}
bool fio_files_done(struct thread_data *td)