Lines Matching refs:index

115 	s16 index;  member
183 static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key,
247 static struct dir_table_slot *find_index(struct inode *ip, u32 index, in find_index() argument
257 if (index < 2) { in find_index()
259 jfs_warn("find_entry called with index = %d", index); in find_index()
265 if (index >= jfs_ip->next_index) { in find_index()
275 slot = &jfs_ip->i_dirtable[index - 2]; in find_index()
277 offset = (index - 2) * sizeof(struct dir_table_slot); in find_index()
303 u32 index) in lock_index() argument
312 if (llck->index >= llck->maxcnt) in lock_index()
314 lv = &llck->lv[llck->index]; in lock_index()
320 lv->offset = ((index - 2) & 511) >> 1; in lock_index()
322 llck->index++; in lock_index()
339 u32 index; in add_index() local
356 index = jfs_ip->next_index++; in add_index()
358 if (index <= MAX_INLINE_DIRTABLE_ENTRY) { in add_index()
362 ip->i_size = (loff_t) (index - 1) << 3; in add_index()
367 dirtab_slot = &jfs_ip->i_dirtable[index-2]; in add_index()
374 return index; in add_index()
376 if (index == (MAX_INLINE_DIRTABLE_ENTRY + 1)) { in add_index()
419 ASSERT(llck->index == 0); in add_index()
424 llck->index++; in add_index()
437 offset = (index - 2) * sizeof(struct dir_table_slot); in add_index()
464 lock_index(tid, ip, mp, index); in add_index()
475 return index; in add_index()
489 static void free_index(tid_t tid, struct inode *ip, u32 index, u32 next) in free_index() argument
495 dirtab_slot = find_index(ip, index, &mp, &lblock); in free_index()
505 lock_index(tid, ip, mp, index); in free_index()
517 static void modify_index(tid_t tid, struct inode *ip, u32 index, s64 bn, in modify_index() argument
522 dirtab_slot = find_index(ip, index, mp, lblock); in modify_index()
531 lock_index(tid, ip, *mp, index); in modify_index()
542 static int read_index(struct inode *ip, u32 index, in read_index() argument
549 slot = find_index(ip, index, &mp, &lblock); in read_index()
582 int base, index, lim; in dtSearch() local
641 index = base + (lim >> 1); in dtSearch()
646 ciCompare(&ciKey, p, stbl[index], in dtSearch()
651 cmp = dtCompare(&ciKey, p, stbl[index]); in dtSearch()
664 ((struct ldtentry *) & p->slot[stbl[index]])->inumber); in dtSearch()
701 btsp->index = index; in dtSearch()
715 base = index + 1; in dtSearch()
750 btsp->index = base; in dtSearch()
763 index = base ? base - 1 : base; in dtSearch()
782 BT_PUSH(btstack, bn, index); in dtSearch()
785 pxd = (pxd_t *) & p->slot[stbl[index]]; in dtSearch()
823 int index; in dtInsert() local
838 DT_GETSEARCH(ip, btstack->top, bn, mp, p, index); in dtInsert()
866 split.index = index; in dtInsert()
885 ASSERT(dtlck->index == 0); in dtInsert()
891 dtlck->index++; in dtInsert()
893 dtInsertEntry(p, index, name, &data, &dtlck); in dtInsert()
897 if (dtlck->index >= dtlck->maxcnt) in dtInsert()
899 lv = & dtlck->lv[dtlck->index]; in dtInsert()
900 n = index >> L2DTSLOTSIZE; in dtInsert()
904 dtlck->index++; in dtInsert()
1128 skip = parent->index + 1; in dtSplitUp()
1214 split->index = skip; /* index at insert */ in dtSplitUp()
1246 ASSERT(dtlck->index == 0); in dtSplitUp()
1252 dtlck->index++; in dtSplitUp()
1262 dtlck->index++; in dtSplitUp()
1370 ASSERT(sdtlck->index == 0); in dtSplitPage()
1374 sdtlck->index++; in dtSplitPage()
1415 if (nextbn == 0 && split->index == sp->header.nextindex) { in dtSplitPage()
1417 rlv = & rdtlck->lv[rdtlck->index]; in dtSplitPage()
1420 rdtlck->index++; in dtSplitPage()
1460 lv = & dtlck->lv[dtlck->index]; in dtSplitPage()
1463 dtlck->index++; in dtSplitPage()
1473 skip = split->index; in dtSplitPage()
1529 rlv = & rdtlck->lv[rdtlck->index]; in dtSplitPage()
1532 rdtlck->index++; in dtSplitPage()
1557 modify_index(tid, ip, le32_to_cpu(ldtentry->index), in dtSplitPage()
1572 if (sdtlck->index >= sdtlck->maxcnt) in dtSplitPage()
1574 slv = & sdtlck->lv[sdtlck->index]; in dtSplitPage()
1579 sdtlck->index++; in dtSplitPage()
1671 pxdlock->index = 1; in dtExtendPage()
1685 le32_to_cpu(ldtentry->index), in dtExtendPage()
1733 dtlck->index++; in dtExtendPage()
1748 dtlck->index++; in dtExtendPage()
1795 dtInsertEntry(sp, split->index, split->key, split->data, &dtlck); in dtExtendPage()
1815 lv = & dtlck->lv[dtlck->index]; in dtExtendPage()
1820 dtlck->index++; in dtExtendPage()
1922 ASSERT(dtlck->index == 0); in dtSplitRoot()
1926 dtlck->index++; in dtSplitRoot()
1979 modify_index(tid, ip, le32_to_cpu(ldtentry->index), in dtSplitRoot()
1989 dtInsertEntry(rp, split->index, split->key, split->data, &dtlck); in dtSplitRoot()
2008 ASSERT(dtlck->index == 0); in dtSplitRoot()
2012 dtlck->index++; in dtSplitRoot()
2066 int index; in dtDelete() local
2087 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in dtDelete()
2096 ldtentry = (struct ldtentry *) & p->slot[stbl[index]]; in dtDelete()
2097 table_index = le32_to_cpu(ldtentry->index); in dtDelete()
2098 if (index == (p->header.nextindex - 1)) { in dtDelete()
2117 le32_to_cpu(ldtentry->index); in dtDelete()
2123 (struct ldtentry *) & p->slot[stbl[index + 1]]; in dtDelete()
2124 next_index = le32_to_cpu(ldtentry->index); in dtDelete()
2155 if (dtlck->index >= dtlck->maxcnt) in dtDelete()
2157 lv = & dtlck->lv[dtlck->index]; in dtDelete()
2160 dtlck->index++; in dtDelete()
2164 if (dtlck->index >= dtlck->maxcnt) in dtDelete()
2166 lv = & dtlck->lv[dtlck->index]; in dtDelete()
2167 i = index >> L2DTSLOTSIZE; in dtDelete()
2172 dtlck->index++; in dtDelete()
2176 dtDeleteEntry(p, index, &dtlck); in dtDelete()
2181 if (DO_INDEX(ip) && index < p->header.nextindex) { in dtDelete()
2186 for (i = index; i < p->header.nextindex; i++) { in dtDelete()
2190 le32_to_cpu(ldtentry->index), in dtDelete()
2220 int index, nextindex; in dtDeleteUp() local
2259 pxdlock->index = 1; in dtDeleteUp()
2290 index = parent->index; in dtDeleteUp()
2333 pxdlock->index = 1; in dtDeleteUp()
2367 if (dtlck->index >= dtlck->maxcnt) in dtDeleteUp()
2369 lv = & dtlck->lv[dtlck->index]; in dtDeleteUp()
2372 dtlck->index++; in dtDeleteUp()
2376 if (dtlck->index < dtlck->maxcnt) in dtDeleteUp()
2382 i = index >> L2DTSLOTSIZE; in dtDeleteUp()
2387 dtlck->index++; in dtDeleteUp()
2391 dtDeleteEntry(p, index, &dtlck); in dtDeleteUp()
2394 if (index == 0 && in dtDeleteUp()
2422 int index; in dtRelocate() local
2449 DT_GETSEARCH(ip, btstack.top, bn, pmp, pp, index); in dtRelocate()
2499 ASSERT(dtlck->index == 0); in dtRelocate()
2503 dtlck->index++; in dtRelocate()
2513 ASSERT(dtlck->index == 0); in dtRelocate()
2517 dtlck->index++; in dtRelocate()
2535 ASSERT(dtlck->index == 0); in dtRelocate()
2547 dtlck->index++; in dtRelocate()
2576 pxdlock->index = 1; in dtRelocate()
2587 lv = & dtlck->lv[dtlck->index]; in dtRelocate()
2591 pxd = (pxd_t *) & pp->slot[stbl[index]]; in dtRelocate()
2593 lv->offset = stbl[index]; in dtRelocate()
2595 dtlck->index++; in dtRelocate()
2681 btsp->index = i; in dtSearchNode()
2749 if (dtlck->index >= dtlck->maxcnt) in dtRelink()
2751 lv = & dtlck->lv[dtlck->index]; in dtRelink()
2754 dtlck->index++; in dtRelink()
2778 if (dtlck->index >= dtlck->maxcnt) in dtRelink()
2780 lv = & dtlck->lv[dtlck->index]; in dtRelink()
2783 dtlck->index++; in dtRelink()
2853 ASSERT(dtlck->index == 0); in dtInitRoot()
2857 dtlck->index++; in dtInitRoot()
2903 uint index; in add_missing_indices() local
2930 index = le32_to_cpu(d->index); in add_missing_indices()
2931 if ((index < 2) || (index >= JFS_IP(inode)->next_index)) { in add_missing_indices()
2932 d->index = cpu_to_le32(add_index(tid, inode, bn, i)); in add_missing_indices()
2933 if (dtlck->index >= dtlck->maxcnt) in add_missing_indices()
2935 lv = &dtlck->lv[dtlck->index]; in add_missing_indices()
2938 dtlck->index++; in add_missing_indices()
2990 s16 index; in jfs_readdir() member
2996 int index; in jfs_readdir() local
3057 index = dirtab_slot.slot; in jfs_readdir()
3097 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in jfs_readdir()
3115 dtoffset->index = 1; in jfs_readdir()
3120 if (dtoffset->index == 1) { in jfs_readdir()
3131 dtoffset->index = 0; in jfs_readdir()
3147 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in jfs_readdir()
3171 for (i = index; i < p->header.nextindex; i++) { in jfs_readdir()
3177 index = i; in jfs_readdir()
3188 jfs_dirent->position = le32_to_cpu(d->index); in jfs_readdir()
3208 index = i; in jfs_readdir()
3251 dtoffset->index++; in jfs_readdir()
3260 index = 0; in jfs_readdir()
3264 dtoffset->index = 0; in jfs_readdir()
3342 btsp->index = 0; in dtReadFirst()
3390 s16 index; in dtReadNext() member
3396 int index; in dtReadNext() local
3409 DT_GETSEARCH(ip, btstack->top, bn, mp, p, index); in dtReadNext()
3413 index = dtoffset->index; in dtReadNext()
3418 if (index < p->header.nextindex) in dtReadNext()
3428 dtoffset->index = index = 0; in dtReadNext()
3517 if (index >= p->header.nextindex) { in dtReadNext()
3536 dtoffset->index = 0; in dtReadNext()
3543 btsp->index = dtoffset->index; in dtReadNext()
3872 static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key, in dtInsertEntry() argument
3898 if (dtlck->index >= dtlck->maxcnt) in dtInsertEntry()
3901 lv = & dtlck->lv[dtlck->index]; in dtInsertEntry()
3915 lh->index = cpu_to_le32(add_index(data->leaf.tid, in dtInsertEntry()
3917 bn, index)); in dtInsertEntry()
3949 dtlck->index++; in dtInsertEntry()
3952 if (dtlck->index < dtlck->maxcnt) in dtInsertEntry()
3974 dtlck->index++; in dtInsertEntry()
3992 if (index < nextindex) { in dtInsertEntry()
3993 memmove(stbl + index + 1, stbl + index, nextindex - index); in dtInsertEntry()
4003 for (n = index + 1; n <= nextindex; n++) { in dtInsertEntry()
4006 le32_to_cpu(lh->index), bn, n, in dtInsertEntry()
4014 stbl[index] = hsi; in dtInsertEntry()
4053 dlv = & ddtlck->lv[ddtlck->index]; in dtMoveEntry()
4057 slv = & sdtlck->lv[sdtlck->index]; in dtMoveEntry()
4073 sdtlck->index++; in dtMoveEntry()
4076 if (sdtlck->index < sdtlck->maxcnt) in dtMoveEntry()
4103 dlh->index = slh->index; /* little-endian */ in dtMoveEntry()
4145 sdtlck->index++; in dtMoveEntry()
4148 if (sdtlck->index < sdtlck->maxcnt) in dtMoveEntry()
4200 sdtlck->index++; in dtMoveEntry()
4204 ddtlck->index++; in dtMoveEntry()
4245 if (dtlck->index >= dtlck->maxcnt) in dtDeleteEntry()
4247 lv = & dtlck->lv[dtlck->index]; in dtDeleteEntry()
4269 dtlck->index++; in dtDeleteEntry()
4272 if (dtlck->index < dtlck->maxcnt) in dtDeleteEntry()
4294 dtlck->index++; in dtDeleteEntry()
4340 if (dtlck->index >= dtlck->maxcnt) in dtTruncateEntry()
4342 lv = & dtlck->lv[dtlck->index]; in dtTruncateEntry()
4364 dtlck->index++; in dtTruncateEntry()
4367 if (dtlck->index < dtlck->maxcnt) in dtTruncateEntry()
4389 dtlck->index++; in dtTruncateEntry()
4420 if (dtlck->index >= dtlck->maxcnt) in dtLinelockFreelist()
4422 lv = & dtlck->lv[dtlck->index]; in dtLinelockFreelist()
4438 dtlck->index++; in dtLinelockFreelist()
4441 if (dtlck->index < dtlck->maxcnt) in dtLinelockFreelist()
4461 dtlck->index++; in dtLinelockFreelist()
4492 int index; in dtModify() local
4510 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in dtModify()
4521 entry_si = stbl[index]; in dtModify()
4524 ASSERT(dtlck->index == 0); in dtModify()
4528 dtlck->index++; in dtModify()
4554 int index, lastindex, v, h; in dtDisplayTree() local
4584 index = 0; in dtDisplayTree()
4627 if ((index = parent->index) == (lastindex = parent->lastindex)) { in dtDisplayTree()
4643 index++; in dtDisplayTree()
4651 btsp->index = index; in dtDisplayTree()
4659 xd = (pxd_t *) & p->slot[stbl[index]]; in dtDisplayTree()
4669 printk("traverse down 0x%Lx[%d]->0x%Lx\n", pbn, index, bn); in dtDisplayTree()
4671 h = index; in dtDisplayTree()