Recent changes (master)
The following changes since commit e0bb44a5b2a67695f0b940772c70f678b323ec54:
t/io_uring: only calculate per-file depth if we have files (2024-04-17 16:34:47 -0600)
are available in the Git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 420415dd1180c14ec0f55f65a05e57ea1fd85f9f:
fio: ioengine flag cleanup (2024-04-18 12:36:01 -0400)
----------------------------------------------------------------
Chana-Zaks-wdc (2):
Don break too early in readwrite mode
test: add test for readwrite issue
Vincent Fu (3):
fio: use thread flag count for ioengine flag shift
fio: remove compile time assertion
fio: ioengine flag cleanup
backend.c | 5 ++++ fio.c | 2 -- fio.h | 4 +-- io_u.c | 11 +++++++ ioengines.h | 73 ++++++++++++++++++++++++++++++----------------- libfio.c | 1 + t/jobs/t0032-43063a1c.fio | 12 ++++++++ 7 files changed, 78 insertions(+), 30 deletions(-) create mode 100644 t/jobs/t0032-43063a1c.fio
---
Diff of recent changes:
backend.c +5 -0
@@ -977,6 +977,11 @@ static void do_io(struct thread_data *td, uint64_t *bytes_done)*/ if (td_write (td) &&td_random (td) && td->o.norandommap) total_bytes =max (total_bytes, (uint64_t ) td->o.io_size); + +/* Don't break too early if io_size > size */ +if (td_rw (td) && !td_random (td)) + total_bytes =max (total_bytes, (uint64_t )td->o.io_size); +/* * If verify_backlog is enabled, we'll run the verify in this * handler as well. For that case, we may need up to twice the
fio.c +0 -2
@@ -27,8 +27,6 @@ int main(int argc, char *argv[], char *envp[]) {int ret =1 ; -compiletime_assert (TD_NR <=TD_ENG_FLAG_SHIFT ,"TD_ENG_FLAG_SHIFT" ); -if (initialize_fio (envp))return 1 ;
fio.h +2 -2
@@ -706,8 +706,8 @@ enum { TD_NR, }; -#define TD_ENG_FLAG_SHIFT 18 -#define TD_ENG_FLAG_MASK ((1ULL << 18) - 1) +#define TD_ENG_FLAG_SHIFT (__TD_F_LAST) +#define TD_ENG_FLAG_MASK ((1ULL << (__TD_F_LAST)) - 1)static inline void td_set_ioengine_flags (struct thread_data *td) {
io_u.c +11 -0
@@ -360,6 +360,17 @@ static int get_next_seq_offset(struct thread_data *td, struct fio_file *f,loop_cache_invalidate (td, f); } +/* +* If we reach the end for a rw-io-size based run, reset us back to 0 +* and invalidate the cache, if we need to. +*/ +if (td_rw (td) && o->io_size > o->size) { +if (f->last_pos[ddir] >= f->io_size +get_start_offset (td, f)) { + f->last_pos[ddir] = f->file_offset; +loop_cache_invalidate (td, f); + } + } +if (f->last_pos[ddir] < f->real_file_size) {uint64_t pos;
ioengines.h +47 -26
80 lines not on this page · raw message
libfio.c +1 -0
@@ -378,6 +378,7 @@ int initialize_fio(char *envp[])compiletime_assert ((offsetof(struct jobs_eta , m_rate) %8 ) ==0 ,"m_rate" );compiletime_assert (__TD_F_LAST <=TD_ENG_FLAG_SHIFT ,"TD_ENG_FLAG_SHIFT" ); +compiletime_assert ((__TD_F_LAST + __FIO_IOENGINE_F_LAST) <=8 *sizeof (((struct thread_data *)0 )->flags),"td->flags" );compiletime_assert (BSSPLIT_MAX <=ZONESPLIT_MAX ,"bsssplit/zone max" ); err =endian_check ();
t/jobs/t0032-43063a1c.fio new file +12 -0
@@ -0,0 +1,12 @@ +# Expected results: max offset is ~1280K +# Buggy result: max offset is ~640K +# + +[global] +ioengine=null +size=1280K +io_size=2560k +bs=128K + +[test1] +rw=rw