• Home
  • Raw
  • Download

Lines Matching refs:bmlen

84   uint64_t bmlen;            /**< Free-space bitmap block length in bytes. */  member
142 if (sp < impl->bmoff + impl->bmlen) { in _fsm_bmptr()
147 if (sp < impl->bmlen) { in _fsm_bmptr()
295 assert(impl->bmlen * 8 >= offset_bits + length_bits); in _fsm_set_bit_status_lw()
296 if (impl->bmlen * 8 < offset_bits + length_bits) { in _fsm_set_bit_status_lw()
302 if (sp < impl->bmoff + impl->bmlen) { in _fsm_set_bit_status_lw()
310 if (sp < impl->bmlen) { in _fsm_set_bit_status_lw()
593 llv = impl->bmlen; in _fsm_write_meta_lw()
864 uint64_t maxoff = lfbkoff ? lfbkoff : (impl->bmlen << 3); in _fsm_blk_deallocate_lw()
905 static iwrc _fsm_init_lw(FSM *impl, uint64_t bmoff, uint64_t bmlen) { in _fsm_init_lw() argument
912 …if ((bmlen & ((1U << impl->bpow) - 1)) || (bmoff & ((1U << impl->bpow) - 1)) || (bmoff & (impl->au… in _fsm_init_lw()
915 if (bmlen < impl->bmlen) { in _fsm_init_lw()
919 bmlen, impl->bmlen); in _fsm_init_lw()
922 if (bmlen * 8 < ((bmoff + bmlen) >> impl->bpow) + 1) { in _fsm_init_lw()
926 bmlen); in _fsm_init_lw()
929 rc = _fsm_ensure_size_lw(impl, bmoff + bmlen); in _fsm_init_lw()
935 if (sp < bmoff + bmlen) { in _fsm_init_lw()
944 if (sp < bmlen) { in _fsm_init_lw()
948 if (impl->bmlen) { in _fsm_init_lw()
950 if (IW_RANGES_OVERLAP(impl->bmoff, impl->bmoff + impl->bmlen, bmoff, bmoff + bmlen)) { in _fsm_init_lw()
958 if (!rc && sp2 < impl->bmlen) { in _fsm_init_lw()
966 assert(!((impl->bmlen - bmlen) & ((1U << impl->bpow) - 1))); in _fsm_init_lw()
968 rc = impl->dlsnr->onwrite(impl->dlsnr, bmoff, mm2, impl->bmlen, 0); in _fsm_init_lw()
971 memcpy(mm, mm2, impl->bmlen); in _fsm_init_lw()
972 if (bmlen > impl->bmlen) { in _fsm_init_lw()
973 memset(mm + impl->bmlen, 0, bmlen - impl->bmlen); in _fsm_init_lw()
975 rc = impl->dlsnr->onset(impl->dlsnr, bmoff + impl->bmlen, 0, bmlen - impl->bmlen, 0); in _fsm_init_lw()
981 memset(mm, 0, bmlen); in _fsm_init_lw()
983 rc = impl->dlsnr->onset(impl->dlsnr, bmoff, 0, bmlen, 0); in _fsm_init_lw()
989 old_bmlen = impl->bmlen; in _fsm_init_lw()
992 impl->bmlen = bmlen; in _fsm_init_lw()
994 rc = _fsm_set_bit_status_lw(impl, (bmoff >> impl->bpow), (bmlen >> impl->bpow), 1, FSM_BM_NONE); in _fsm_init_lw()
1003 _fsm_load_fsm_lw(impl, mm, bmlen); in _fsm_init_lw()
1023 impl->bmlen = old_bmlen; in _fsm_init_lw()
1038 uint64_t bmoffset = 0, bmlen, sp; in _fsm_resize_fsm_bitmap_lw() local
1041 if (impl->bmlen >= size) { in _fsm_resize_fsm_bitmap_lw()
1044 bmlen = IW_ROUNDUP(size, impl->aunit); /* align to the system page size. */ in _fsm_resize_fsm_bitmap_lw()
1046 impl, (bmlen >> impl->bpow), &bmoffset, &sp, UINT64_MAX, in _fsm_resize_fsm_bitmap_lw()
1050 bmlen = sp << impl->bpow; in _fsm_resize_fsm_bitmap_lw()
1052 bmoffset = impl->bmlen * (1 << impl->bpow) * 8; in _fsm_resize_fsm_bitmap_lw()
1056 rc = pool->add_mmap(pool, bmoffset, bmlen, impl->mmap_opts); in _fsm_resize_fsm_bitmap_lw()
1059 rc = _fsm_init_lw(impl, bmoffset, bmlen); in _fsm_resize_fsm_bitmap_lw()
1092 rc = _fsm_resize_fsm_bitmap_lw(impl, impl->bmlen << 1); in _fsm_blk_allocate_lw()
1135 rc = _fsm_resize_fsm_bitmap_lw(impl, impl->bmlen << 1); in _fsm_blk_allocate_lw()
1188 impl, (impl->bmlen >> impl->bpow), &offset, &length, (impl->bmoff >> impl->bpow), in _fsm_trim_tail_lw()
1213 lastblk = (impl->bmoff + impl->bmlen) >> impl->bpow; in _fsm_trim_tail_lw()
1214 offset = _fsm_find_prev_set_bit(bmptr, (impl->bmlen << 3), lastblk, &hasleft); in _fsm_trim_tail_lw()
1329 impl->bmlen = llv; in _fsm_read_meta_lr()
1332 … iwlog_ecode_error(rc, "Free-space bitmap length is not 64bit aligned: %" PRIuMAX "", impl->bmlen); in _fsm_read_meta_lr()
1370 uint64_t bmlen, bmoff; in _fsm_init_new_lw() local
1376 bmlen = opts->bmlen > 0 ? IW_ROUNDUP(opts->bmlen, impl->aunit) : impl->aunit; in _fsm_init_new_lw()
1388 rc = pool->add_mmap(pool, bmoff, bmlen, impl->mmap_opts); in _fsm_init_new_lw()
1391 return _fsm_init_lw(impl, bmoff, bmlen); in _fsm_init_new_lw()
1410 if (sp < impl->bmoff + impl->bmlen) { in _fsm_init_existing_lw()
1421 rc = pool->add_mmap(pool, impl->bmoff, impl->bmlen, impl->mmap_opts); in _fsm_init_existing_lw()
1425 if (sp < impl->bmlen) { in _fsm_init_existing_lw()
1431 _fsm_load_fsm_lw(impl, mm, impl->bmlen); in _fsm_init_existing_lw()
1448 if (length_blk < 1 || end < offset_blk || end > (impl->bmlen << 3)) { in _fsm_is_fully_allocated_lr()
1560 if (f->impl->bmoff + f->impl->bmlen > size) { in _fsm_ensure_size()
1695 (impl->bmoff >> impl->bpow) + (impl->bmlen >> impl->bpow))) { in _fsm_deallocate()
1716 (impl->bmoff >> impl->bpow) + (impl->bmlen >> impl->bpow))) { in _fsm_check_allocation_status()
1766 uint64_t bmoff, bmlen; in _fsm_clear() local
1768 bmlen = impl->bmlen; in _fsm_clear()
1769 if (!bmlen) { in _fsm_clear()
1777 IWRC(impl->pool.add_mmap(&impl->pool, bmoff, bmlen, impl->mmap_opts), rc); in _fsm_clear()
1780 impl->bmlen = 0; in _fsm_clear()
1782 rc = _fsm_init_lw(impl, bmoff, bmlen); in _fsm_clear()
1807 state->blocks_num = impl->bmlen << 3; in _fsm_state()
2012 for (; i < sp && i < impl->bmlen; ++i) { in iwfs_fsmdb_dump_fsm_bitmap()
2030 d->state.blocks_num = impl->bmlen << 3; in iwfs_fsmdbg_state()
2035 d->bmlen = impl->bmlen; in iwfs_fsmdbg_state()