Lines Matching refs:nslot
50 static size_t __sizeof_namespace_index(u32 nslot) in __sizeof_namespace_index() argument
52 return ALIGN(sizeof(struct nd_namespace_index) + DIV_ROUND_UP(nslot, 8), in __sizeof_namespace_index()
75 u32 nslot, space, size; in sizeof_namespace_index() local
83 nslot = nvdimm_num_label_slots(ndd); in sizeof_namespace_index()
84 space = ndd->nsarea.config_size - nslot * sizeof_namespace_label(ndd); in sizeof_namespace_index()
85 size = __sizeof_namespace_index(nslot) * 2; in sizeof_namespace_index()
86 if (size <= space && nslot >= 2) in sizeof_namespace_index()
134 u32 nslot; in __nd_label_validate() local
204 nslot = __le32_to_cpu(nsindex[i]->nslot); in __nd_label_validate()
205 if (nslot * sizeof_namespace_label(ndd) in __nd_label_validate()
209 i, nslot, ndd->nsarea.config_size); in __nd_label_validate()
317 unsigned long **free, u32 *nslot) in preamble_index() argument
326 *nslot = __le32_to_cpu(nsindex->nslot); in preamble_index()
343 unsigned long **free, u32 *nslot) in preamble_current() argument
346 free, nslot); in preamble_current()
351 unsigned long **free, u32 *nslot) in preamble_next() argument
354 free, nslot); in preamble_next()
402 u32 nslot, slot; in nd_label_reserve_dpa() local
404 if (!preamble_current(ndd, &nsindex, &free, &nslot)) in nd_label_reserve_dpa()
407 for_each_clear_bit_le(slot, free, nslot) { in nd_label_reserve_dpa()
440 u32 nslot; in nd_label_data_init() local
512 nslot = __le32_to_cpu(nsindex->nslot); in nd_label_data_init()
515 for (i = 0; i < nslot; i++, offset += ndd->nslabel_size) { in nd_label_data_init()
560 u32 nslot, slot; in nd_label_active_count() local
563 if (!preamble_current(ndd, &nsindex, &free, &nslot)) in nd_label_active_count()
566 for_each_clear_bit_le(slot, free, nslot) { in nd_label_active_count()
590 u32 nslot, slot; in nd_label_active() local
592 if (!preamble_current(ndd, &nsindex, &free, &nslot)) in nd_label_active()
595 for_each_clear_bit_le(slot, free, nslot) { in nd_label_active()
613 u32 nslot, slot; in nd_label_alloc_slot() local
615 if (!preamble_next(ndd, &nsindex, &free, &nslot)) in nd_label_alloc_slot()
620 slot = find_next_bit_le(free, nslot, 0); in nd_label_alloc_slot()
621 if (slot == nslot) in nd_label_alloc_slot()
633 u32 nslot; in nd_label_free_slot() local
635 if (!preamble_next(ndd, &nsindex, &free, &nslot)) in nd_label_free_slot()
640 if (slot < nslot) in nd_label_free_slot()
649 u32 nslot; in nd_label_nfree() local
653 if (!preamble_next(ndd, &nsindex, &free, &nslot)) in nd_label_nfree()
656 return bitmap_weight(free, nslot); in nd_label_nfree()
665 u32 nslot; in nd_label_write_index() local
670 nslot = nvdimm_num_label_slots(ndd); in nd_label_write_index()
672 nslot = __le32_to_cpu(nsindex->nslot); in nd_label_write_index()
689 nsindex->nslot = __cpu_to_le32(nslot); in nd_label_write_index()
698 u32 nfree = ALIGN(nslot, BITS_PER_LONG); in nd_label_write_index()
702 for (i = 0, last_bits = nfree - nslot; i < last_bits; i++) in nd_label_write_index()
703 clear_bit_le(nslot + i, free); in nd_label_write_index()
886 u32 nslot, slot; in __pmem_label_update() local
891 if (!preamble_next(ndd, &nsindex, &free, &nslot)) in __pmem_label_update()
1018 u32 nslot, slot; in del_labels() local
1025 if (!preamble_next(ndd, &nsindex, &free, &nslot)) in del_labels()