/* We don't need msyncing on Linux, since the mappings are guaranteed to be coherent */
len += (start % PAGE_SIZE);
start -= start % PAGE_SIZE;
/* We don't need msyncing on Linux, since the mappings are guaranteed to be coherent */
len += (start % PAGE_SIZE);
start -= start % PAGE_SIZE;
if (msync(q->mmap_data + start, len, MS_ASYNC | MS_INVALIDATE) < 0)
log(L_ERROR, "Cache %s: msync failed: %m", q->file_name);
#endif
if (msync(q->mmap_data + start, len, MS_ASYNC | MS_INVALIDATE) < 0)
log(L_ERROR, "Cache %s: msync failed: %m", q->file_name);
#endif
q->file_name = xstrdup(par->file_name);
ASSERT(par->block_size >= 8 && !(par->block_size & (par->block_size-1)));
q->file_name = xstrdup(par->file_name);
ASSERT(par->block_size >= 8 && !(par->block_size & (par->block_size-1)));