• Home
  • Raw
  • Download

Lines Matching refs:index

104 	s16 index;  member
172 static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key,
236 static struct dir_table_slot *find_index(struct inode *ip, u32 index, in find_index() argument
246 if (index < 2) { in find_index()
248 jfs_warn("find_entry called with index = %d", index); in find_index()
254 if (index >= jfs_ip->next_index) { in find_index()
264 slot = &jfs_ip->i_dirtable[index - 2]; in find_index()
266 offset = (index - 2) * sizeof(struct dir_table_slot); in find_index()
292 u32 index) in lock_index() argument
301 if (llck->index >= llck->maxcnt) in lock_index()
303 lv = &llck->lv[llck->index]; in lock_index()
309 lv->offset = ((index - 2) & 511) >> 1; in lock_index()
311 llck->index++; in lock_index()
328 u32 index; in add_index() local
345 index = jfs_ip->next_index++; in add_index()
347 if (index <= MAX_INLINE_DIRTABLE_ENTRY) { in add_index()
351 ip->i_size = (loff_t) (index - 1) << 3; in add_index()
356 dirtab_slot = &jfs_ip->i_dirtable[index-2]; in add_index()
363 return index; in add_index()
365 if (index == (MAX_INLINE_DIRTABLE_ENTRY + 1)) { in add_index()
414 ASSERT(llck->index == 0); in add_index()
419 llck->index++; in add_index()
432 offset = (index - 2) * sizeof(struct dir_table_slot); in add_index()
458 lock_index(tid, ip, mp, index); in add_index()
469 return index; in add_index()
483 static void free_index(tid_t tid, struct inode *ip, u32 index, u32 next) in free_index() argument
489 dirtab_slot = find_index(ip, index, &mp, &lblock); in free_index()
499 lock_index(tid, ip, mp, index); in free_index()
511 static void modify_index(tid_t tid, struct inode *ip, u32 index, s64 bn, in modify_index() argument
516 dirtab_slot = find_index(ip, index, mp, lblock); in modify_index()
525 lock_index(tid, ip, *mp, index); in modify_index()
536 static int read_index(struct inode *ip, u32 index, in read_index() argument
543 slot = find_index(ip, index, &mp, &lblock); in read_index()
576 int base, index, lim; in dtSearch() local
634 index = base + (lim >> 1); in dtSearch()
639 ciCompare(&ciKey, p, stbl[index], in dtSearch()
644 cmp = dtCompare(&ciKey, p, stbl[index]); in dtSearch()
657 ((struct ldtentry *) & p->slot[stbl[index]])->inumber); in dtSearch()
694 btsp->index = index; in dtSearch()
708 base = index + 1; in dtSearch()
743 btsp->index = base; in dtSearch()
756 index = base ? base - 1 : base; in dtSearch()
775 BT_PUSH(btstack, bn, index); in dtSearch()
778 pxd = (pxd_t *) & p->slot[stbl[index]]; in dtSearch()
816 int index; in dtInsert() local
831 DT_GETSEARCH(ip, btstack->top, bn, mp, p, index); in dtInsert()
859 split.index = index; in dtInsert()
878 ASSERT(dtlck->index == 0); in dtInsert()
884 dtlck->index++; in dtInsert()
886 dtInsertEntry(p, index, name, &data, &dtlck); in dtInsert()
890 if (dtlck->index >= dtlck->maxcnt) in dtInsert()
892 lv = & dtlck->lv[dtlck->index]; in dtInsert()
893 n = index >> L2DTSLOTSIZE; in dtInsert()
897 dtlck->index++; in dtInsert()
1137 skip = parent->index + 1; in dtSplitUp()
1223 split->index = skip; /* index at insert */ in dtSplitUp()
1255 ASSERT(dtlck->index == 0); in dtSplitUp()
1261 dtlck->index++; in dtSplitUp()
1271 dtlck->index++; in dtSplitUp()
1389 ASSERT(sdtlck->index == 0); in dtSplitPage()
1393 sdtlck->index++; in dtSplitPage()
1434 if (nextbn == 0 && split->index == sp->header.nextindex) { in dtSplitPage()
1436 rlv = & rdtlck->lv[rdtlck->index]; in dtSplitPage()
1439 rdtlck->index++; in dtSplitPage()
1479 lv = & dtlck->lv[dtlck->index]; in dtSplitPage()
1482 dtlck->index++; in dtSplitPage()
1492 skip = split->index; in dtSplitPage()
1548 rlv = & rdtlck->lv[rdtlck->index]; in dtSplitPage()
1551 rdtlck->index++; in dtSplitPage()
1576 modify_index(tid, ip, le32_to_cpu(ldtentry->index), in dtSplitPage()
1591 if (sdtlck->index >= sdtlck->maxcnt) in dtSplitPage()
1593 slv = & sdtlck->lv[sdtlck->index]; in dtSplitPage()
1598 sdtlck->index++; in dtSplitPage()
1688 pxdlock->index = 1; in dtExtendPage()
1702 le32_to_cpu(ldtentry->index), in dtExtendPage()
1747 dtlck->index++; in dtExtendPage()
1762 dtlck->index++; in dtExtendPage()
1809 dtInsertEntry(sp, split->index, split->key, split->data, &dtlck); in dtExtendPage()
1829 lv = & dtlck->lv[dtlck->index]; in dtExtendPage()
1834 dtlck->index++; in dtExtendPage()
1934 ASSERT(dtlck->index == 0); in dtSplitRoot()
1938 dtlck->index++; in dtSplitRoot()
1991 modify_index(tid, ip, le32_to_cpu(ldtentry->index), in dtSplitRoot()
2001 dtInsertEntry(rp, split->index, split->key, split->data, &dtlck); in dtSplitRoot()
2020 ASSERT(dtlck->index == 0); in dtSplitRoot()
2024 dtlck->index++; in dtSplitRoot()
2077 int index; in dtDelete() local
2098 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in dtDelete()
2107 ldtentry = (struct ldtentry *) & p->slot[stbl[index]]; in dtDelete()
2108 table_index = le32_to_cpu(ldtentry->index); in dtDelete()
2109 if (index == (p->header.nextindex - 1)) { in dtDelete()
2128 le32_to_cpu(ldtentry->index); in dtDelete()
2134 (struct ldtentry *) & p->slot[stbl[index + 1]]; in dtDelete()
2135 next_index = le32_to_cpu(ldtentry->index); in dtDelete()
2166 if (dtlck->index >= dtlck->maxcnt) in dtDelete()
2168 lv = & dtlck->lv[dtlck->index]; in dtDelete()
2171 dtlck->index++; in dtDelete()
2175 if (dtlck->index >= dtlck->maxcnt) in dtDelete()
2177 lv = & dtlck->lv[dtlck->index]; in dtDelete()
2178 i = index >> L2DTSLOTSIZE; in dtDelete()
2183 dtlck->index++; in dtDelete()
2187 dtDeleteEntry(p, index, &dtlck); in dtDelete()
2192 if (DO_INDEX(ip) && index < p->header.nextindex) { in dtDelete()
2197 for (i = index; i < p->header.nextindex; i++) { in dtDelete()
2201 le32_to_cpu(ldtentry->index), in dtDelete()
2231 int index, nextindex; in dtDeleteUp() local
2270 pxdlock->index = 1; in dtDeleteUp()
2303 index = parent->index; in dtDeleteUp()
2346 pxdlock->index = 1; in dtDeleteUp()
2382 if (dtlck->index >= dtlck->maxcnt) in dtDeleteUp()
2384 lv = & dtlck->lv[dtlck->index]; in dtDeleteUp()
2387 dtlck->index++; in dtDeleteUp()
2391 if (dtlck->index < dtlck->maxcnt) in dtDeleteUp()
2397 i = index >> L2DTSLOTSIZE; in dtDeleteUp()
2402 dtlck->index++; in dtDeleteUp()
2406 dtDeleteEntry(p, index, &dtlck); in dtDeleteUp()
2409 if (index == 0 && in dtDeleteUp()
2440 int index; in dtRelocate() local
2467 DT_GETSEARCH(ip, btstack.top, bn, pmp, pp, index); in dtRelocate()
2517 ASSERT(dtlck->index == 0); in dtRelocate()
2521 dtlck->index++; in dtRelocate()
2531 ASSERT(dtlck->index == 0); in dtRelocate()
2535 dtlck->index++; in dtRelocate()
2553 ASSERT(dtlck->index == 0); in dtRelocate()
2565 dtlck->index++; in dtRelocate()
2592 pxdlock->index = 1; in dtRelocate()
2603 lv = & dtlck->lv[dtlck->index]; in dtRelocate()
2607 pxd = (pxd_t *) & pp->slot[stbl[index]]; in dtRelocate()
2609 lv->offset = stbl[index]; in dtRelocate()
2611 dtlck->index++; in dtRelocate()
2697 btsp->index = i; in dtSearchNode()
2765 if (dtlck->index >= dtlck->maxcnt) in dtRelink()
2767 lv = & dtlck->lv[dtlck->index]; in dtRelink()
2770 dtlck->index++; in dtRelink()
2794 if (dtlck->index >= dtlck->maxcnt) in dtRelink()
2796 lv = & dtlck->lv[dtlck->index]; in dtRelink()
2799 dtlck->index++; in dtRelink()
2869 ASSERT(dtlck->index == 0); in dtInitRoot()
2873 dtlck->index++; in dtInitRoot()
2911 uint index; in add_missing_indices() local
2941 index = le32_to_cpu(d->index); in add_missing_indices()
2942 if ((index < 2) || (index >= JFS_IP(inode)->next_index)) { in add_missing_indices()
2943 d->index = cpu_to_le32(add_index(tid, inode, bn, i)); in add_missing_indices()
2944 if (dtlck->index >= dtlck->maxcnt) in add_missing_indices()
2946 lv = &dtlck->lv[dtlck->index]; in add_missing_indices()
2949 dtlck->index++; in add_missing_indices()
3001 s16 index; in jfs_readdir() member
3007 int index; in jfs_readdir() local
3075 index = dirtab_slot.slot; in jfs_readdir()
3114 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in jfs_readdir()
3131 dtoffset->index = 2; in jfs_readdir()
3136 if (dtoffset->index == 2) { in jfs_readdir()
3144 dtoffset->index = 0; in jfs_readdir()
3160 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in jfs_readdir()
3184 for (i = index; i < p->header.nextindex; i++) { in jfs_readdir()
3190 index = i; in jfs_readdir()
3201 jfs_dirent->position = le32_to_cpu(d->index); in jfs_readdir()
3221 index = i; in jfs_readdir()
3269 dtoffset->index++; in jfs_readdir()
3278 index = 0; in jfs_readdir()
3282 dtoffset->index = 0; in jfs_readdir()
3360 btsp->index = 0; in dtReadFirst()
3408 s16 index; in dtReadNext() member
3414 int index; in dtReadNext() local
3427 DT_GETSEARCH(ip, btstack->top, bn, mp, p, index); in dtReadNext()
3431 index = dtoffset->index; in dtReadNext()
3436 if (index < p->header.nextindex) in dtReadNext()
3446 dtoffset->index = index = 0; in dtReadNext()
3535 if (index >= p->header.nextindex) { in dtReadNext()
3554 dtoffset->index = 0; in dtReadNext()
3561 btsp->index = dtoffset->index; in dtReadNext()
3893 static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key, in dtInsertEntry() argument
3920 if (dtlck->index >= dtlck->maxcnt) in dtInsertEntry()
3923 lv = & dtlck->lv[dtlck->index]; in dtInsertEntry()
3937 lh->index = cpu_to_le32(add_index(data->leaf.tid, in dtInsertEntry()
3939 bn, index)); in dtInsertEntry()
3971 dtlck->index++; in dtInsertEntry()
3974 if (dtlck->index < dtlck->maxcnt) in dtInsertEntry()
3996 dtlck->index++; in dtInsertEntry()
4014 if (index < nextindex) { in dtInsertEntry()
4015 memmove(stbl + index + 1, stbl + index, nextindex - index); in dtInsertEntry()
4025 for (n = index + 1; n <= nextindex; n++) { in dtInsertEntry()
4028 le32_to_cpu(lh->index), bn, n, in dtInsertEntry()
4036 stbl[index] = hsi; in dtInsertEntry()
4075 dlv = & ddtlck->lv[ddtlck->index]; in dtMoveEntry()
4079 slv = & sdtlck->lv[sdtlck->index]; in dtMoveEntry()
4095 sdtlck->index++; in dtMoveEntry()
4098 if (sdtlck->index < sdtlck->maxcnt) in dtMoveEntry()
4125 dlh->index = slh->index; /* little-endian */ in dtMoveEntry()
4167 sdtlck->index++; in dtMoveEntry()
4170 if (sdtlck->index < sdtlck->maxcnt) in dtMoveEntry()
4222 sdtlck->index++; in dtMoveEntry()
4226 ddtlck->index++; in dtMoveEntry()
4267 if (dtlck->index >= dtlck->maxcnt) in dtDeleteEntry()
4269 lv = & dtlck->lv[dtlck->index]; in dtDeleteEntry()
4291 dtlck->index++; in dtDeleteEntry()
4294 if (dtlck->index < dtlck->maxcnt) in dtDeleteEntry()
4316 dtlck->index++; in dtDeleteEntry()
4362 if (dtlck->index >= dtlck->maxcnt) in dtTruncateEntry()
4364 lv = & dtlck->lv[dtlck->index]; in dtTruncateEntry()
4386 dtlck->index++; in dtTruncateEntry()
4389 if (dtlck->index < dtlck->maxcnt) in dtTruncateEntry()
4411 dtlck->index++; in dtTruncateEntry()
4442 if (dtlck->index >= dtlck->maxcnt) in dtLinelockFreelist()
4444 lv = & dtlck->lv[dtlck->index]; in dtLinelockFreelist()
4460 dtlck->index++; in dtLinelockFreelist()
4463 if (dtlck->index < dtlck->maxcnt) in dtLinelockFreelist()
4483 dtlck->index++; in dtLinelockFreelist()
4514 int index; in dtModify() local
4532 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in dtModify()
4543 entry_si = stbl[index]; in dtModify()
4546 ASSERT(dtlck->index == 0); in dtModify()
4550 dtlck->index++; in dtModify()