Lines Matching refs:index

117 	s16 index;  member
185 static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key,
249 static struct dir_table_slot *find_index(struct inode *ip, u32 index, in find_index() argument
259 if (index < 2) { in find_index()
261 jfs_warn("find_entry called with index = %d", index); in find_index()
267 if (index >= jfs_ip->next_index) { in find_index()
277 slot = &jfs_ip->i_dirtable[index - 2]; in find_index()
279 offset = (index - 2) * sizeof(struct dir_table_slot); in find_index()
305 u32 index) in lock_index() argument
314 if (llck->index >= llck->maxcnt) in lock_index()
316 lv = &llck->lv[llck->index]; in lock_index()
322 lv->offset = ((index - 2) & 511) >> 1; in lock_index()
324 llck->index++; in lock_index()
341 u32 index; in add_index() local
358 index = jfs_ip->next_index++; in add_index()
360 if (index <= MAX_INLINE_DIRTABLE_ENTRY) { in add_index()
364 ip->i_size = (loff_t) (index - 1) << 3; in add_index()
369 dirtab_slot = &jfs_ip->i_dirtable[index-2]; in add_index()
376 return index; in add_index()
378 if (index == (MAX_INLINE_DIRTABLE_ENTRY + 1)) { in add_index()
427 ASSERT(llck->index == 0); in add_index()
432 llck->index++; in add_index()
445 offset = (index - 2) * sizeof(struct dir_table_slot); in add_index()
471 lock_index(tid, ip, mp, index); in add_index()
482 return index; in add_index()
496 static void free_index(tid_t tid, struct inode *ip, u32 index, u32 next) in free_index() argument
502 dirtab_slot = find_index(ip, index, &mp, &lblock); in free_index()
512 lock_index(tid, ip, mp, index); in free_index()
524 static void modify_index(tid_t tid, struct inode *ip, u32 index, s64 bn, in modify_index() argument
529 dirtab_slot = find_index(ip, index, mp, lblock); in modify_index()
538 lock_index(tid, ip, *mp, index); in modify_index()
549 static int read_index(struct inode *ip, u32 index, in read_index() argument
556 slot = find_index(ip, index, &mp, &lblock); in read_index()
589 int base, index, lim; in dtSearch() local
647 index = base + (lim >> 1); in dtSearch()
652 ciCompare(&ciKey, p, stbl[index], in dtSearch()
657 cmp = dtCompare(&ciKey, p, stbl[index]); in dtSearch()
670 ((struct ldtentry *) & p->slot[stbl[index]])->inumber); in dtSearch()
707 btsp->index = index; in dtSearch()
721 base = index + 1; in dtSearch()
756 btsp->index = base; in dtSearch()
769 index = base ? base - 1 : base; in dtSearch()
788 BT_PUSH(btstack, bn, index); in dtSearch()
791 pxd = (pxd_t *) & p->slot[stbl[index]]; in dtSearch()
829 int index; in dtInsert() local
844 DT_GETSEARCH(ip, btstack->top, bn, mp, p, index); in dtInsert()
872 split.index = index; in dtInsert()
891 ASSERT(dtlck->index == 0); in dtInsert()
897 dtlck->index++; in dtInsert()
899 dtInsertEntry(p, index, name, &data, &dtlck); in dtInsert()
903 if (dtlck->index >= dtlck->maxcnt) in dtInsert()
905 lv = & dtlck->lv[dtlck->index]; in dtInsert()
906 n = index >> L2DTSLOTSIZE; in dtInsert()
910 dtlck->index++; in dtInsert()
1150 skip = parent->index + 1; in dtSplitUp()
1236 split->index = skip; /* index at insert */ in dtSplitUp()
1268 ASSERT(dtlck->index == 0); in dtSplitUp()
1274 dtlck->index++; in dtSplitUp()
1284 dtlck->index++; in dtSplitUp()
1402 ASSERT(sdtlck->index == 0); in dtSplitPage()
1406 sdtlck->index++; in dtSplitPage()
1447 if (nextbn == 0 && split->index == sp->header.nextindex) { in dtSplitPage()
1449 rlv = & rdtlck->lv[rdtlck->index]; in dtSplitPage()
1452 rdtlck->index++; in dtSplitPage()
1492 lv = & dtlck->lv[dtlck->index]; in dtSplitPage()
1495 dtlck->index++; in dtSplitPage()
1505 skip = split->index; in dtSplitPage()
1561 rlv = & rdtlck->lv[rdtlck->index]; in dtSplitPage()
1564 rdtlck->index++; in dtSplitPage()
1589 modify_index(tid, ip, le32_to_cpu(ldtentry->index), in dtSplitPage()
1604 if (sdtlck->index >= sdtlck->maxcnt) in dtSplitPage()
1606 slv = & sdtlck->lv[sdtlck->index]; in dtSplitPage()
1611 sdtlck->index++; in dtSplitPage()
1701 pxdlock->index = 1; in dtExtendPage()
1715 le32_to_cpu(ldtentry->index), in dtExtendPage()
1760 dtlck->index++; in dtExtendPage()
1775 dtlck->index++; in dtExtendPage()
1822 dtInsertEntry(sp, split->index, split->key, split->data, &dtlck); in dtExtendPage()
1842 lv = & dtlck->lv[dtlck->index]; in dtExtendPage()
1847 dtlck->index++; in dtExtendPage()
1947 ASSERT(dtlck->index == 0); in dtSplitRoot()
1951 dtlck->index++; in dtSplitRoot()
2004 modify_index(tid, ip, le32_to_cpu(ldtentry->index), in dtSplitRoot()
2014 dtInsertEntry(rp, split->index, split->key, split->data, &dtlck); in dtSplitRoot()
2033 ASSERT(dtlck->index == 0); in dtSplitRoot()
2037 dtlck->index++; in dtSplitRoot()
2090 int index; in dtDelete() local
2111 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in dtDelete()
2120 ldtentry = (struct ldtentry *) & p->slot[stbl[index]]; in dtDelete()
2121 table_index = le32_to_cpu(ldtentry->index); in dtDelete()
2122 if (index == (p->header.nextindex - 1)) { in dtDelete()
2141 le32_to_cpu(ldtentry->index); in dtDelete()
2147 (struct ldtentry *) & p->slot[stbl[index + 1]]; in dtDelete()
2148 next_index = le32_to_cpu(ldtentry->index); in dtDelete()
2179 if (dtlck->index >= dtlck->maxcnt) in dtDelete()
2181 lv = & dtlck->lv[dtlck->index]; in dtDelete()
2184 dtlck->index++; in dtDelete()
2188 if (dtlck->index >= dtlck->maxcnt) in dtDelete()
2190 lv = & dtlck->lv[dtlck->index]; in dtDelete()
2191 i = index >> L2DTSLOTSIZE; in dtDelete()
2196 dtlck->index++; in dtDelete()
2200 dtDeleteEntry(p, index, &dtlck); in dtDelete()
2205 if (DO_INDEX(ip) && index < p->header.nextindex) { in dtDelete()
2210 for (i = index; i < p->header.nextindex; i++) { in dtDelete()
2214 le32_to_cpu(ldtentry->index), in dtDelete()
2244 int index, nextindex; in dtDeleteUp() local
2283 pxdlock->index = 1; in dtDeleteUp()
2316 index = parent->index; in dtDeleteUp()
2359 pxdlock->index = 1; in dtDeleteUp()
2395 if (dtlck->index >= dtlck->maxcnt) in dtDeleteUp()
2397 lv = & dtlck->lv[dtlck->index]; in dtDeleteUp()
2400 dtlck->index++; in dtDeleteUp()
2404 if (dtlck->index < dtlck->maxcnt) in dtDeleteUp()
2410 i = index >> L2DTSLOTSIZE; in dtDeleteUp()
2415 dtlck->index++; in dtDeleteUp()
2419 dtDeleteEntry(p, index, &dtlck); in dtDeleteUp()
2422 if (index == 0 && in dtDeleteUp()
2453 int index; in dtRelocate() local
2480 DT_GETSEARCH(ip, btstack.top, bn, pmp, pp, index); in dtRelocate()
2530 ASSERT(dtlck->index == 0); in dtRelocate()
2534 dtlck->index++; in dtRelocate()
2544 ASSERT(dtlck->index == 0); in dtRelocate()
2548 dtlck->index++; in dtRelocate()
2566 ASSERT(dtlck->index == 0); in dtRelocate()
2578 dtlck->index++; in dtRelocate()
2605 pxdlock->index = 1; in dtRelocate()
2616 lv = & dtlck->lv[dtlck->index]; in dtRelocate()
2620 pxd = (pxd_t *) & pp->slot[stbl[index]]; in dtRelocate()
2622 lv->offset = stbl[index]; in dtRelocate()
2624 dtlck->index++; in dtRelocate()
2710 btsp->index = i; in dtSearchNode()
2778 if (dtlck->index >= dtlck->maxcnt) in dtRelink()
2780 lv = & dtlck->lv[dtlck->index]; in dtRelink()
2783 dtlck->index++; in dtRelink()
2807 if (dtlck->index >= dtlck->maxcnt) in dtRelink()
2809 lv = & dtlck->lv[dtlck->index]; in dtRelink()
2812 dtlck->index++; in dtRelink()
2882 ASSERT(dtlck->index == 0); in dtInitRoot()
2886 dtlck->index++; in dtInitRoot()
2924 uint index; in add_missing_indices() local
2954 index = le32_to_cpu(d->index); in add_missing_indices()
2955 if ((index < 2) || (index >= JFS_IP(inode)->next_index)) { in add_missing_indices()
2956 d->index = cpu_to_le32(add_index(tid, inode, bn, i)); in add_missing_indices()
2957 if (dtlck->index >= dtlck->maxcnt) in add_missing_indices()
2959 lv = &dtlck->lv[dtlck->index]; in add_missing_indices()
2962 dtlck->index++; in add_missing_indices()
3014 s16 index; in jfs_readdir() member
3020 int index; in jfs_readdir() local
3088 index = dirtab_slot.slot; in jfs_readdir()
3127 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in jfs_readdir()
3144 dtoffset->index = 2; in jfs_readdir()
3149 if (dtoffset->index == 2) { in jfs_readdir()
3157 dtoffset->index = 0; in jfs_readdir()
3173 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in jfs_readdir()
3197 for (i = index; i < p->header.nextindex; i++) { in jfs_readdir()
3203 index = i; in jfs_readdir()
3214 jfs_dirent->position = le32_to_cpu(d->index); in jfs_readdir()
3234 index = i; in jfs_readdir()
3282 dtoffset->index++; in jfs_readdir()
3291 index = 0; in jfs_readdir()
3295 dtoffset->index = 0; in jfs_readdir()
3373 btsp->index = 0; in dtReadFirst()
3421 s16 index; in dtReadNext() member
3427 int index; in dtReadNext() local
3440 DT_GETSEARCH(ip, btstack->top, bn, mp, p, index); in dtReadNext()
3444 index = dtoffset->index; in dtReadNext()
3449 if (index < p->header.nextindex) in dtReadNext()
3459 dtoffset->index = index = 0; in dtReadNext()
3548 if (index >= p->header.nextindex) { in dtReadNext()
3567 dtoffset->index = 0; in dtReadNext()
3574 btsp->index = dtoffset->index; in dtReadNext()
3906 static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key, in dtInsertEntry() argument
3933 if (dtlck->index >= dtlck->maxcnt) in dtInsertEntry()
3936 lv = & dtlck->lv[dtlck->index]; in dtInsertEntry()
3950 lh->index = cpu_to_le32(add_index(data->leaf.tid, in dtInsertEntry()
3952 bn, index)); in dtInsertEntry()
3984 dtlck->index++; in dtInsertEntry()
3987 if (dtlck->index < dtlck->maxcnt) in dtInsertEntry()
4009 dtlck->index++; in dtInsertEntry()
4027 if (index < nextindex) { in dtInsertEntry()
4028 memmove(stbl + index + 1, stbl + index, nextindex - index); in dtInsertEntry()
4038 for (n = index + 1; n <= nextindex; n++) { in dtInsertEntry()
4041 le32_to_cpu(lh->index), bn, n, in dtInsertEntry()
4049 stbl[index] = hsi; in dtInsertEntry()
4088 dlv = & ddtlck->lv[ddtlck->index]; in dtMoveEntry()
4092 slv = & sdtlck->lv[sdtlck->index]; in dtMoveEntry()
4108 sdtlck->index++; in dtMoveEntry()
4111 if (sdtlck->index < sdtlck->maxcnt) in dtMoveEntry()
4138 dlh->index = slh->index; /* little-endian */ in dtMoveEntry()
4180 sdtlck->index++; in dtMoveEntry()
4183 if (sdtlck->index < sdtlck->maxcnt) in dtMoveEntry()
4235 sdtlck->index++; in dtMoveEntry()
4239 ddtlck->index++; in dtMoveEntry()
4280 if (dtlck->index >= dtlck->maxcnt) in dtDeleteEntry()
4282 lv = & dtlck->lv[dtlck->index]; in dtDeleteEntry()
4304 dtlck->index++; in dtDeleteEntry()
4307 if (dtlck->index < dtlck->maxcnt) in dtDeleteEntry()
4329 dtlck->index++; in dtDeleteEntry()
4375 if (dtlck->index >= dtlck->maxcnt) in dtTruncateEntry()
4377 lv = & dtlck->lv[dtlck->index]; in dtTruncateEntry()
4399 dtlck->index++; in dtTruncateEntry()
4402 if (dtlck->index < dtlck->maxcnt) in dtTruncateEntry()
4424 dtlck->index++; in dtTruncateEntry()
4455 if (dtlck->index >= dtlck->maxcnt) in dtLinelockFreelist()
4457 lv = & dtlck->lv[dtlck->index]; in dtLinelockFreelist()
4473 dtlck->index++; in dtLinelockFreelist()
4476 if (dtlck->index < dtlck->maxcnt) in dtLinelockFreelist()
4496 dtlck->index++; in dtLinelockFreelist()
4527 int index; in dtModify() local
4545 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in dtModify()
4556 entry_si = stbl[index]; in dtModify()
4559 ASSERT(dtlck->index == 0); in dtModify()
4563 dtlck->index++; in dtModify()