+}
+
+static int run_dedupe_threads(struct fio_file *f, uint64_t dev_size,
+ uint64_t *nextents, uint64_t *nchunks)
+{
+ struct worker_thread *threads;
+ unsigned long nitems, total_items;
+ int i, err = 0;
+
+ total_size = dev_size;
+ total_items = dev_size / blocksize;
+ cur_offset = 0;
+ size_lock = fio_sem_init(FIO_SEM_UNLOCKED);
+
+ threads = malloc(num_threads * sizeof(struct worker_thread));
+ for (i = 0; i < num_threads; i++) {
+ memset(&threads[i], 0, sizeof(struct worker_thread));
+ threads[i].fd = f->fd;
+
+ err = pthread_create(&threads[i].thread, NULL, thread_fn, &threads[i]);
+ if (err) {
+ log_err("fio: thread startup failed\n");
+ break;
+ }
+ }
+
+ show_progress(threads, total_items);