+ int n = get_random(opt_filecount / thread_count);
+ n += thread_num * (opt_filecount / thread_count);
+ int n1 = n / opt_dirsize, n2 = n % opt_dirsize;
+ char filename[256];
+ sprintf(filename, "%d/%d", n1, n2);
+
+ /* If a smaller blocksize was requested, choose a random offset within the
+ * file to use. */
+ int offset = 0;
+ if (opt_blocksize > 0) {
+ offset = get_random(opt_filesize / opt_blocksize) * opt_blocksize;
+ }