X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=verify.c;h=9ee3bc42ca215961b03951445fdb64070b3f35aa;hp=43dd392687ee53fac4d28161f3ee42514a6c907f;hb=81f0366c7adcd5d70de5c1b144eafd366933f78e;hpb=0dce9bc9b21a8d91aa55a29258dfaeffc57bd466 diff --git a/verify.c b/verify.c index 43dd3926..9ee3bc42 100644 --- a/verify.c +++ b/verify.c @@ -39,38 +39,24 @@ void fill_pattern(struct thread_data *td, void *p, unsigned int len, struct io_u io_u->rand_seed = fill_random_buf(&td->buf_state, p, len); break; case 1: - /* - * See below write barrier comment - */ -#if 0 - read_barrier(); if (io_u->buf_filled_len >= len) { dprint(FD_VERIFY, "using already filled verify pattern b=0 len=%u\n", len); return; } -#endif dprint(FD_VERIFY, "fill verify pattern b=0 len=%u\n", len); memset(p, td->o.verify_pattern[0], len); - /* - * We need to ensure that the pattern stores are seen before - * the fill length store, or we could observe headers that - * aren't valid to the extent notified by the fill length - */ - write_barrier(); io_u->buf_filled_len = len; break; default: { unsigned int i = 0, size = 0; unsigned char *b = p; -#if 0 - read_barrier(); if (io_u->buf_filled_len >= len) { dprint(FD_VERIFY, "using already filled verify pattern b=%d len=%u\n", td->o.verify_pattern_bytes, len); return; } -#endif + dprint(FD_VERIFY, "fill verify pattern b=%d len=%u\n", td->o.verify_pattern_bytes, len); @@ -81,7 +67,6 @@ void fill_pattern(struct thread_data *td, void *p, unsigned int len, struct io_u memcpy(b+i, td->o.verify_pattern, size); i += size; } - write_barrier(); io_u->buf_filled_len = len; break; } @@ -602,10 +587,8 @@ int verify_io_u_async(struct thread_data *td, struct io_u *io_u) if (io_u->file) put_file_log(td, io_u->file); - io_u->file = NULL; - pthread_mutex_lock(&td->io_u_lock); - + if (io_u->flags & IO_U_F_IN_CUR_DEPTH) { td->cur_depth--; io_u->flags &= ~IO_U_F_IN_CUR_DEPTH; @@ -1035,7 +1018,7 @@ static void *verify_async_thread(void *data) put_io_u(td, io_u); if (!ret) continue; - if (td->o.continue_on_error && + if (td->o.continue_on_error & ERROR_TYPE_VERIFY && td_non_fatal_error(ret)) { update_error_count(td, ret); td_clear_error(td);