Lines Matching refs:maxlen
59 size_t maxlen; /**< Maximum length of memory mapped region */ member
142 nlen = MIN(s->maxlen, impl->fsize - s->off); in _exfile_initmmap_slot_lw()
533 static iwrc _exfile_add_mmap_lw(struct IWFS_EXT *f, off_t off, size_t maxlen, iwfs_ext_mmap_opts_t … in _exfile_add_mmap_lw() argument
543 if (OFF_T_MAX - off < maxlen) { in _exfile_add_mmap_lw()
544 maxlen = (size_t) (OFF_T_MAX - off); in _exfile_add_mmap_lw()
546 tmp = IW_ROUNDUP(maxlen, impl->psize); in _exfile_add_mmap_lw()
547 if ((tmp < maxlen) || (OFF_T_MAX - off < tmp)) { in _exfile_add_mmap_lw()
548 maxlen = IW_ROUNDOWN(maxlen, impl->psize); in _exfile_add_mmap_lw()
550 maxlen = tmp; in _exfile_add_mmap_lw()
552 if (!maxlen) { in _exfile_add_mmap_lw()
556 assert(!(maxlen & (impl->psize - 1))); in _exfile_add_mmap_lw()
564 ns->maxlen = maxlen; in _exfile_add_mmap_lw()
575 off_t e1 = s->off + s->maxlen; in _exfile_add_mmap_lw()
576 off_t e2 = ns->off + ns->maxlen; in _exfile_add_mmap_lw()
615 static iwrc _exfile_add_mmap(struct IWFS_EXT *f, off_t off, size_t maxlen, iwfs_ext_mmap_opts_t mmo… in _exfile_add_mmap() argument
619 rc = _exfile_add_mmap_lw(f, off, maxlen, mmopts); in _exfile_add_mmap()