perror("shmat");
return 1;
}
-#ifdef FIO_HAVE_SHM_ATTACH_REMOVED
- shmctl(shm_id, IPC_RMID, NULL);
-#endif
+ if (shm_attach_to_open_removed())
+ shmctl(shm_id, IPC_RMID, NULL);
#endif
memset(threads, 0, max_jobs * sizeof(struct thread_data));
struct thread_options *o = &td->o;
int ret = 0;
-#ifndef FIO_HAVE_PSHARED_MUTEX
+#ifndef CONFIG_PSHARED
if (!o->use_thread) {
log_info("fio: this platform does not support process shared"
" mutexes, forcing use of threads. Use the 'thread'"
/*
* Reads can do overwrites, we always need to pre-create the file
*/
- if (td_read(td) || td_rw(td))
+ if (td_read(td))
o->overwrite = 1;
if (!o->min_bs[DDIR_READ])
}
if (o->pre_read) {
- o->invalidate_cache = 0;
+ if (o->invalidate_cache) {
+ log_info("fio: ignore invalidate option for %s\n",
+ o->name);
+ o->invalidate_cache = 0;
+ }
if (td_ioengine_flagged(td, FIO_PIPEIO)) {
log_info("fio: cannot pre-read files with an IO engine"
" that isn't seekable. Pre-read disabled.\n");