Lines Matching refs:mmap_ptr
26 void *mmap_ptr; member
47 fmd->mmap_ptr = mmap(NULL, length, flags, MAP_SHARED, f->fd, off); in fio_mmap_file()
48 if (fmd->mmap_ptr == MAP_FAILED) { in fio_mmap_file()
49 fmd->mmap_ptr = NULL; in fio_mmap_file()
55 if (posix_madvise(fmd->mmap_ptr, length, POSIX_MADV_SEQUENTIAL) < 0) { in fio_mmap_file()
60 if (posix_madvise(fmd->mmap_ptr, length, POSIX_MADV_RANDOM) < 0) { in fio_mmap_file()
65 if (posix_madvise(fmd->mmap_ptr, length, POSIX_MADV_DONTNEED) < 0) { in fio_mmap_file()
72 (void) posix_madvise(fmd->mmap_ptr, fmd->mmap_sz, FIO_MADV_FREE); in fio_mmap_file()
77 if (td->error && fmd->mmap_ptr) in fio_mmap_file()
78 munmap(fmd->mmap_ptr, length); in fio_mmap_file()
148 if (fmd->mmap_ptr) { in fio_mmapio_prep()
149 if (munmap(fmd->mmap_ptr, fmd->mmap_sz) < 0) in fio_mmapio_prep()
151 fmd->mmap_ptr = NULL; in fio_mmapio_prep()
162 io_u->mmap_data = fmd->mmap_ptr + io_u->offset - fmd->mmap_off - in fio_mmapio_prep()
179 if (msync(fmd->mmap_ptr, fmd->mmap_sz, MS_SYNC)) { in fio_mmapio_queue()