• Home
  • Raw
  • Download

Lines Matching refs:nsindex

115 	struct nd_namespace_index *nsindex[] = {  in __nd_label_validate()  local
119 const int num_index = ARRAY_SIZE(nsindex); in __nd_label_validate()
131 memcpy(sig, nsindex[i]->sig, NSINDEX_SIG_LEN); in __nd_label_validate()
138 version = __le16_to_cpu(nsindex[i]->major) * 100 in __nd_label_validate()
139 + __le16_to_cpu(nsindex[i]->minor); in __nd_label_validate()
141 labelsize = 1 << (7 + nsindex[i]->labelsize); in __nd_label_validate()
147 i, nsindex[i]->labelsize); in __nd_label_validate()
151 sum_save = __le64_to_cpu(nsindex[i]->checksum); in __nd_label_validate()
152 nsindex[i]->checksum = __cpu_to_le64(0); in __nd_label_validate()
153 sum = nd_fletcher64(nsindex[i], sizeof_namespace_index(ndd), 1); in __nd_label_validate()
154 nsindex[i]->checksum = __cpu_to_le64(sum_save); in __nd_label_validate()
160 seq = __le32_to_cpu(nsindex[i]->seq); in __nd_label_validate()
167 if (__le64_to_cpu(nsindex[i]->myoff) in __nd_label_validate()
171 __le64_to_cpu(nsindex[i]->myoff)); in __nd_label_validate()
174 if (__le64_to_cpu(nsindex[i]->otheroff) in __nd_label_validate()
178 __le64_to_cpu(nsindex[i]->otheroff)); in __nd_label_validate()
181 if (__le64_to_cpu(nsindex[i]->labeloff) in __nd_label_validate()
185 __le64_to_cpu(nsindex[i]->labeloff)); in __nd_label_validate()
189 size = __le64_to_cpu(nsindex[i]->mysize); in __nd_label_validate()
196 nslot = __le32_to_cpu(nsindex[i]->nslot); in __nd_label_validate()
220 seq = best_seq(__le32_to_cpu(nsindex[0]->seq), in __nd_label_validate()
221 __le32_to_cpu(nsindex[1]->seq)); in __nd_label_validate()
222 if (seq == (__le32_to_cpu(nsindex[1]->seq) & NSINDEX_SEQ_MASK)) in __nd_label_validate()
311 struct nd_namespace_index *nsindex; in preamble_index() local
313 nsindex = to_namespace_index(ndd, idx); in preamble_index()
314 if (nsindex == NULL) in preamble_index()
317 *free = (unsigned long *) nsindex->free; in preamble_index()
318 *nslot = __le32_to_cpu(nsindex->nslot); in preamble_index()
319 *nsindex_out = nsindex; in preamble_index()
334 struct nd_namespace_index **nsindex, in preamble_current() argument
337 return preamble_index(ndd, ndd->ns_current, nsindex, in preamble_current()
342 struct nd_namespace_index **nsindex, in preamble_next() argument
345 return preamble_index(ndd, ndd->ns_next, nsindex, in preamble_next()
392 struct nd_namespace_index *nsindex; in nd_label_reserve_dpa() local
396 if (!preamble_current(ndd, &nsindex, &free, &nslot)) in nd_label_reserve_dpa()
432 struct nd_namespace_index *nsindex; in nd_label_data_init() local
502 nsindex = to_current_namespace_index(ndd); in nd_label_data_init()
503 nd_label_copy(ndd, to_next_namespace_index(ndd), nsindex); in nd_label_data_init()
506 offset = __le64_to_cpu(nsindex->labeloff); in nd_label_data_init()
507 nslot = __le32_to_cpu(nsindex->nslot); in nd_label_data_init()
514 if (test_bit_le(i, nsindex->free)) { in nd_label_data_init()
553 struct nd_namespace_index *nsindex; in nd_label_active_count() local
558 if (!preamble_current(ndd, &nsindex, &free, &nslot)) in nd_label_active_count()
583 struct nd_namespace_index *nsindex; in nd_label_active() local
587 if (!preamble_current(ndd, &nsindex, &free, &nslot)) in nd_label_active()
606 struct nd_namespace_index *nsindex; in nd_label_alloc_slot() local
610 if (!preamble_next(ndd, &nsindex, &free, &nslot)) in nd_label_alloc_slot()
626 struct nd_namespace_index *nsindex; in nd_label_free_slot() local
630 if (!preamble_next(ndd, &nsindex, &free, &nslot)) in nd_label_free_slot()
642 struct nd_namespace_index *nsindex; in nd_label_nfree() local
648 if (!preamble_next(ndd, &nsindex, &free, &nslot)) in nd_label_nfree()
657 struct nd_namespace_index *nsindex; in nd_label_write_index() local
663 nsindex = to_namespace_index(ndd, index); in nd_label_write_index()
667 nslot = __le32_to_cpu(nsindex->nslot); in nd_label_write_index()
669 memcpy(nsindex->sig, NSINDEX_SIGNATURE, NSINDEX_SIG_LEN); in nd_label_write_index()
670 memset(&nsindex->flags, 0, 3); in nd_label_write_index()
671 nsindex->labelsize = sizeof_namespace_label(ndd) >> 8; in nd_label_write_index()
672 nsindex->seq = __cpu_to_le32(seq); in nd_label_write_index()
673 offset = (unsigned long) nsindex in nd_label_write_index()
675 nsindex->myoff = __cpu_to_le64(offset); in nd_label_write_index()
676 nsindex->mysize = __cpu_to_le64(sizeof_namespace_index(ndd)); in nd_label_write_index()
680 nsindex->otheroff = __cpu_to_le64(offset); in nd_label_write_index()
683 nsindex->labeloff = __cpu_to_le64(offset); in nd_label_write_index()
684 nsindex->nslot = __cpu_to_le32(nslot); in nd_label_write_index()
685 nsindex->major = __cpu_to_le16(1); in nd_label_write_index()
687 nsindex->minor = __cpu_to_le16(1); in nd_label_write_index()
689 nsindex->minor = __cpu_to_le16(2); in nd_label_write_index()
690 nsindex->checksum = __cpu_to_le64(0); in nd_label_write_index()
692 unsigned long *free = (unsigned long *) nsindex->free; in nd_label_write_index()
696 memset(nsindex->free, 0xff, nfree / 8); in nd_label_write_index()
700 checksum = nd_fletcher64(nsindex, sizeof_namespace_index(ndd), 1); in nd_label_write_index()
701 nsindex->checksum = __cpu_to_le64(checksum); in nd_label_write_index()
702 rc = nvdimm_set_config_data(ndd, __le64_to_cpu(nsindex->myoff), in nd_label_write_index()
703 nsindex, sizeof_namespace_index(ndd)); in nd_label_write_index()
712 nd_label_copy(ndd, to_current_namespace_index(ndd), nsindex); in nd_label_write_index()
822 struct nd_namespace_index *nsindex; in __pmem_label_update() local
832 if (!preamble_next(ndd, &nsindex, &free, &nslot)) in __pmem_label_update()
835 cookie = nd_region_interleave_set_cookie(nd_region, nsindex); in __pmem_label_update()
889 nd_inc_seq(__le32_to_cpu(nsindex->seq)), 0); in __pmem_label_update()
1004 struct nd_namespace_index *nsindex; in __blk_label_update() local
1013 if (!preamble_next(ndd, &nsindex, &free, &nslot)) in __blk_label_update()
1149 nd_inc_seq(__le32_to_cpu(nsindex->seq)), 0); in __blk_label_update()
1224 nd_label_copy(ndd, nsindex, to_current_namespace_index(ndd)); in __blk_label_update()
1236 struct nd_namespace_index *nsindex; in init_labels() local
1262 nsindex = to_namespace_index(ndd, 0); in init_labels()
1263 memset(nsindex, 0, ndd->nsarea.config_size); in init_labels()
1280 struct nd_namespace_index *nsindex; in del_labels() local
1291 if (!preamble_next(ndd, &nsindex, &free, &nslot)) in del_labels()
1320 nd_inc_seq(__le32_to_cpu(nsindex->seq)), 0); in del_labels()