• Home
  • Raw
  • Download

Lines Matching refs:index

116 	s16 index;  member
184 static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key,
248 static struct dir_table_slot *find_index(struct inode *ip, u32 index, in find_index() argument
258 if (index < 2) { in find_index()
260 jfs_warn("find_entry called with index = %d", index); in find_index()
266 if (index >= jfs_ip->next_index) { in find_index()
276 slot = &jfs_ip->i_dirtable[index - 2]; in find_index()
278 offset = (index - 2) * sizeof(struct dir_table_slot); in find_index()
304 u32 index) in lock_index() argument
313 if (llck->index >= llck->maxcnt) in lock_index()
315 lv = &llck->lv[llck->index]; in lock_index()
321 lv->offset = ((index - 2) & 511) >> 1; in lock_index()
323 llck->index++; in lock_index()
340 u32 index; in add_index() local
357 index = jfs_ip->next_index++; in add_index()
359 if (index <= MAX_INLINE_DIRTABLE_ENTRY) { in add_index()
363 ip->i_size = (loff_t) (index - 1) << 3; in add_index()
368 dirtab_slot = &jfs_ip->i_dirtable[index-2]; in add_index()
375 return index; in add_index()
377 if (index == (MAX_INLINE_DIRTABLE_ENTRY + 1)) { in add_index()
426 ASSERT(llck->index == 0); in add_index()
431 llck->index++; in add_index()
444 offset = (index - 2) * sizeof(struct dir_table_slot); in add_index()
470 lock_index(tid, ip, mp, index); in add_index()
481 return index; in add_index()
495 static void free_index(tid_t tid, struct inode *ip, u32 index, u32 next) in free_index() argument
501 dirtab_slot = find_index(ip, index, &mp, &lblock); in free_index()
511 lock_index(tid, ip, mp, index); in free_index()
523 static void modify_index(tid_t tid, struct inode *ip, u32 index, s64 bn, in modify_index() argument
528 dirtab_slot = find_index(ip, index, mp, lblock); in modify_index()
537 lock_index(tid, ip, *mp, index); in modify_index()
548 static int read_index(struct inode *ip, u32 index, in read_index() argument
555 slot = find_index(ip, index, &mp, &lblock); in read_index()
588 int base, index, lim; in dtSearch() local
645 index = base + (lim >> 1); in dtSearch()
650 ciCompare(&ciKey, p, stbl[index], in dtSearch()
655 cmp = dtCompare(&ciKey, p, stbl[index]); in dtSearch()
668 ((struct ldtentry *) & p->slot[stbl[index]])->inumber); in dtSearch()
705 btsp->index = index; in dtSearch()
719 base = index + 1; in dtSearch()
754 btsp->index = base; in dtSearch()
767 index = base ? base - 1 : base; in dtSearch()
786 BT_PUSH(btstack, bn, index); in dtSearch()
789 pxd = (pxd_t *) & p->slot[stbl[index]]; in dtSearch()
827 int index; in dtInsert() local
842 DT_GETSEARCH(ip, btstack->top, bn, mp, p, index); in dtInsert()
870 split.index = index; in dtInsert()
889 ASSERT(dtlck->index == 0); in dtInsert()
895 dtlck->index++; in dtInsert()
897 dtInsertEntry(p, index, name, &data, &dtlck); in dtInsert()
901 if (dtlck->index >= dtlck->maxcnt) in dtInsert()
903 lv = & dtlck->lv[dtlck->index]; in dtInsert()
904 n = index >> L2DTSLOTSIZE; in dtInsert()
908 dtlck->index++; in dtInsert()
1149 skip = parent->index + 1; in dtSplitUp()
1235 split->index = skip; /* index at insert */ in dtSplitUp()
1267 ASSERT(dtlck->index == 0); in dtSplitUp()
1273 dtlck->index++; in dtSplitUp()
1283 dtlck->index++; in dtSplitUp()
1400 ASSERT(sdtlck->index == 0); in dtSplitPage()
1404 sdtlck->index++; in dtSplitPage()
1445 if (nextbn == 0 && split->index == sp->header.nextindex) { in dtSplitPage()
1447 rlv = & rdtlck->lv[rdtlck->index]; in dtSplitPage()
1450 rdtlck->index++; in dtSplitPage()
1490 lv = & dtlck->lv[dtlck->index]; in dtSplitPage()
1493 dtlck->index++; in dtSplitPage()
1503 skip = split->index; in dtSplitPage()
1559 rlv = & rdtlck->lv[rdtlck->index]; in dtSplitPage()
1562 rdtlck->index++; in dtSplitPage()
1587 modify_index(tid, ip, le32_to_cpu(ldtentry->index), in dtSplitPage()
1602 if (sdtlck->index >= sdtlck->maxcnt) in dtSplitPage()
1604 slv = & sdtlck->lv[sdtlck->index]; in dtSplitPage()
1609 sdtlck->index++; in dtSplitPage()
1699 pxdlock->index = 1; in dtExtendPage()
1713 le32_to_cpu(ldtentry->index), in dtExtendPage()
1758 dtlck->index++; in dtExtendPage()
1773 dtlck->index++; in dtExtendPage()
1820 dtInsertEntry(sp, split->index, split->key, split->data, &dtlck); in dtExtendPage()
1840 lv = & dtlck->lv[dtlck->index]; in dtExtendPage()
1845 dtlck->index++; in dtExtendPage()
1943 ASSERT(dtlck->index == 0); in dtSplitRoot()
1947 dtlck->index++; in dtSplitRoot()
2000 modify_index(tid, ip, le32_to_cpu(ldtentry->index), in dtSplitRoot()
2010 dtInsertEntry(rp, split->index, split->key, split->data, &dtlck); in dtSplitRoot()
2029 ASSERT(dtlck->index == 0); in dtSplitRoot()
2033 dtlck->index++; in dtSplitRoot()
2086 int index; in dtDelete() local
2107 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in dtDelete()
2116 ldtentry = (struct ldtentry *) & p->slot[stbl[index]]; in dtDelete()
2117 table_index = le32_to_cpu(ldtentry->index); in dtDelete()
2118 if (index == (p->header.nextindex - 1)) { in dtDelete()
2137 le32_to_cpu(ldtentry->index); in dtDelete()
2143 (struct ldtentry *) & p->slot[stbl[index + 1]]; in dtDelete()
2144 next_index = le32_to_cpu(ldtentry->index); in dtDelete()
2175 if (dtlck->index >= dtlck->maxcnt) in dtDelete()
2177 lv = & dtlck->lv[dtlck->index]; in dtDelete()
2180 dtlck->index++; in dtDelete()
2184 if (dtlck->index >= dtlck->maxcnt) in dtDelete()
2186 lv = & dtlck->lv[dtlck->index]; in dtDelete()
2187 i = index >> L2DTSLOTSIZE; in dtDelete()
2192 dtlck->index++; in dtDelete()
2196 dtDeleteEntry(p, index, &dtlck); in dtDelete()
2201 if (DO_INDEX(ip) && index < p->header.nextindex) { in dtDelete()
2206 for (i = index; i < p->header.nextindex; i++) { in dtDelete()
2210 le32_to_cpu(ldtentry->index), in dtDelete()
2240 int index, nextindex; in dtDeleteUp() local
2279 pxdlock->index = 1; in dtDeleteUp()
2312 index = parent->index; in dtDeleteUp()
2355 pxdlock->index = 1; in dtDeleteUp()
2391 if (dtlck->index >= dtlck->maxcnt) in dtDeleteUp()
2393 lv = & dtlck->lv[dtlck->index]; in dtDeleteUp()
2396 dtlck->index++; in dtDeleteUp()
2400 if (dtlck->index < dtlck->maxcnt) in dtDeleteUp()
2406 i = index >> L2DTSLOTSIZE; in dtDeleteUp()
2411 dtlck->index++; in dtDeleteUp()
2415 dtDeleteEntry(p, index, &dtlck); in dtDeleteUp()
2418 if (index == 0 && in dtDeleteUp()
2449 int index; in dtRelocate() local
2476 DT_GETSEARCH(ip, btstack.top, bn, pmp, pp, index); in dtRelocate()
2526 ASSERT(dtlck->index == 0); in dtRelocate()
2530 dtlck->index++; in dtRelocate()
2540 ASSERT(dtlck->index == 0); in dtRelocate()
2544 dtlck->index++; in dtRelocate()
2562 ASSERT(dtlck->index == 0); in dtRelocate()
2574 dtlck->index++; in dtRelocate()
2601 pxdlock->index = 1; in dtRelocate()
2612 lv = & dtlck->lv[dtlck->index]; in dtRelocate()
2616 pxd = (pxd_t *) & pp->slot[stbl[index]]; in dtRelocate()
2618 lv->offset = stbl[index]; in dtRelocate()
2620 dtlck->index++; in dtRelocate()
2706 btsp->index = i; in dtSearchNode()
2774 if (dtlck->index >= dtlck->maxcnt) in dtRelink()
2776 lv = & dtlck->lv[dtlck->index]; in dtRelink()
2779 dtlck->index++; in dtRelink()
2803 if (dtlck->index >= dtlck->maxcnt) in dtRelink()
2805 lv = & dtlck->lv[dtlck->index]; in dtRelink()
2808 dtlck->index++; in dtRelink()
2878 ASSERT(dtlck->index == 0); in dtInitRoot()
2882 dtlck->index++; in dtInitRoot()
2920 uint index; in add_missing_indices() local
2950 index = le32_to_cpu(d->index); in add_missing_indices()
2951 if ((index < 2) || (index >= JFS_IP(inode)->next_index)) { in add_missing_indices()
2952 d->index = cpu_to_le32(add_index(tid, inode, bn, i)); in add_missing_indices()
2953 if (dtlck->index >= dtlck->maxcnt) in add_missing_indices()
2955 lv = &dtlck->lv[dtlck->index]; in add_missing_indices()
2958 dtlck->index++; in add_missing_indices()
3010 s16 index; in jfs_readdir() member
3016 int index; in jfs_readdir() local
3077 index = dirtab_slot.slot; in jfs_readdir()
3117 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in jfs_readdir()
3135 dtoffset->index = 1; in jfs_readdir()
3140 if (dtoffset->index == 1) { in jfs_readdir()
3151 dtoffset->index = 0; in jfs_readdir()
3167 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in jfs_readdir()
3191 for (i = index; i < p->header.nextindex; i++) { in jfs_readdir()
3197 index = i; in jfs_readdir()
3208 jfs_dirent->position = le32_to_cpu(d->index); in jfs_readdir()
3228 index = i; in jfs_readdir()
3271 dtoffset->index++; in jfs_readdir()
3280 index = 0; in jfs_readdir()
3284 dtoffset->index = 0; in jfs_readdir()
3362 btsp->index = 0; in dtReadFirst()
3410 s16 index; in dtReadNext() member
3416 int index; in dtReadNext() local
3429 DT_GETSEARCH(ip, btstack->top, bn, mp, p, index); in dtReadNext()
3433 index = dtoffset->index; in dtReadNext()
3438 if (index < p->header.nextindex) in dtReadNext()
3448 dtoffset->index = index = 0; in dtReadNext()
3537 if (index >= p->header.nextindex) { in dtReadNext()
3556 dtoffset->index = 0; in dtReadNext()
3563 btsp->index = dtoffset->index; in dtReadNext()
3895 static void dtInsertEntry(dtpage_t * p, int index, struct component_name * key, in dtInsertEntry() argument
3922 if (dtlck->index >= dtlck->maxcnt) in dtInsertEntry()
3925 lv = & dtlck->lv[dtlck->index]; in dtInsertEntry()
3939 lh->index = cpu_to_le32(add_index(data->leaf.tid, in dtInsertEntry()
3941 bn, index)); in dtInsertEntry()
3973 dtlck->index++; in dtInsertEntry()
3976 if (dtlck->index < dtlck->maxcnt) in dtInsertEntry()
3998 dtlck->index++; in dtInsertEntry()
4016 if (index < nextindex) { in dtInsertEntry()
4017 memmove(stbl + index + 1, stbl + index, nextindex - index); in dtInsertEntry()
4027 for (n = index + 1; n <= nextindex; n++) { in dtInsertEntry()
4030 le32_to_cpu(lh->index), bn, n, in dtInsertEntry()
4038 stbl[index] = hsi; in dtInsertEntry()
4077 dlv = & ddtlck->lv[ddtlck->index]; in dtMoveEntry()
4081 slv = & sdtlck->lv[sdtlck->index]; in dtMoveEntry()
4097 sdtlck->index++; in dtMoveEntry()
4100 if (sdtlck->index < sdtlck->maxcnt) in dtMoveEntry()
4127 dlh->index = slh->index; /* little-endian */ in dtMoveEntry()
4169 sdtlck->index++; in dtMoveEntry()
4172 if (sdtlck->index < sdtlck->maxcnt) in dtMoveEntry()
4224 sdtlck->index++; in dtMoveEntry()
4228 ddtlck->index++; in dtMoveEntry()
4269 if (dtlck->index >= dtlck->maxcnt) in dtDeleteEntry()
4271 lv = & dtlck->lv[dtlck->index]; in dtDeleteEntry()
4293 dtlck->index++; in dtDeleteEntry()
4296 if (dtlck->index < dtlck->maxcnt) in dtDeleteEntry()
4318 dtlck->index++; in dtDeleteEntry()
4364 if (dtlck->index >= dtlck->maxcnt) in dtTruncateEntry()
4366 lv = & dtlck->lv[dtlck->index]; in dtTruncateEntry()
4388 dtlck->index++; in dtTruncateEntry()
4391 if (dtlck->index < dtlck->maxcnt) in dtTruncateEntry()
4413 dtlck->index++; in dtTruncateEntry()
4444 if (dtlck->index >= dtlck->maxcnt) in dtLinelockFreelist()
4446 lv = & dtlck->lv[dtlck->index]; in dtLinelockFreelist()
4462 dtlck->index++; in dtLinelockFreelist()
4465 if (dtlck->index < dtlck->maxcnt) in dtLinelockFreelist()
4485 dtlck->index++; in dtLinelockFreelist()
4516 int index; in dtModify() local
4534 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in dtModify()
4545 entry_si = stbl[index]; in dtModify()
4548 ASSERT(dtlck->index == 0); in dtModify()
4552 dtlck->index++; in dtModify()