From: Radha Ramachandran Date: Wed, 14 Jul 2010 23:39:05 +0000 (-0600) Subject: No need to use specific flag for io_u fill length X-Git-Tag: fio-1.42~1 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=10e8a7b30ce2917df9f839d42596c7e3af9a904f;hp=808def7036ddfaf6f0ec2f5ecce031fd46ce40ef No need to use specific flag for io_u fill length The fill length already provides that information. Signed-off-by: Jens Axboe --- diff --git a/io_u.c b/io_u.c index 88b2b9f3..f27cddac 100644 --- a/io_u.c +++ b/io_u.c @@ -988,7 +988,6 @@ struct io_u *get_io_u(struct thread_data *td) * Reset the buf_filled parameters so next time if the * buffer is used for writes it is refilled. */ - io_u->flags &= ~IO_U_F_FILLED; io_u->buf_filled_len = 0; } } diff --git a/ioengine.h b/ioengine.h index 343b06fb..e9f5d927 100644 --- a/ioengine.h +++ b/ioengine.h @@ -8,7 +8,6 @@ enum { IO_U_F_FLIGHT = 1 << 1, IO_U_F_FREE_DEF = 1 << 2, IO_U_F_IN_CUR_DEPTH = 1 << 3, - IO_U_F_FILLED = 1 << 4, }; /* diff --git a/verify.c b/verify.c index 098c19bc..42ea462f 100644 --- a/verify.c +++ b/verify.c @@ -30,22 +30,19 @@ void fill_pattern(struct thread_data *td, void *p, unsigned int len, struct io_u fill_random_buf(p, len); break; case 1: - if ((io_u->flags & IO_U_F_FILLED) && - io_u->buf_filled_len >= len) { + if (io_u->buf_filled_len >= len) { dprint(FD_VERIFY, "using already filled verify pattern b=0 len=%u\n", len); return; } dprint(FD_VERIFY, "fill verify pattern b=0 len=%u\n", len); memset(p, td->o.verify_pattern[0], len); - io_u->flags |= IO_U_F_FILLED; io_u->buf_filled_len = len; break; default: { unsigned int i = 0, size = 0; unsigned char *b = p; - if ((io_u->flags & IO_U_F_FILLED) && - io_u->buf_filled_len >= len) { + 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; @@ -60,7 +57,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; } - io_u->flags |= IO_U_F_FILLED; io_u->buf_filled_len = len; break; }