summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2011-01-14 15:32:30 +0100
committerJens Axboe <jaxboe@fusionio.com>2011-01-14 15:32:30 +0100
commitefda12bde9d13663e5cfe4ddf677bae54075fd92 (patch)
tree53b151ded6b73c57c151f085f791c75f96a3f52d
parent9a793c2f91a47df348237f1a9b778253ca87ec2e (diff)
downloadfio-efda12bde9d13663e5cfe4ddf677bae54075fd92.tar.gz
fio-efda12bde9d13663e5cfe4ddf677bae54075fd92.tar.bz2
Comment out ->buf_filled_len in pattern fill
It's buggy, needs to be debugged. Disable for now. It can cause verify failures. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
-rw-r--r--verify.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/verify.c b/verify.c
index eb8da58e..a7344e32 100644
--- a/verify.c
+++ b/verify.c
@@ -39,23 +39,38 @@ void fill_pattern(struct thread_data *td, void *p, unsigned int len, struct io_u
io_u->rand_seed = fill_random_buf(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);
@@ -66,6 +81,7 @@ 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;
}