Lines Matching refs:mp
116 struct metapage *mp; member
250 struct metapage ** mp, s64 *lblock) in find_index() argument
276 *mp = NULL; in find_index()
284 if (*mp && (*lblock != blkno)) { in find_index()
285 release_metapage(*mp); in find_index()
286 *mp = NULL; in find_index()
288 if (!(*mp)) { in find_index()
290 *mp = read_index_page(ip, blkno); in find_index()
292 if (!(*mp)) { in find_index()
298 (struct dir_table_slot *) ((char *) (*mp)->data + in find_index()
304 static inline void lock_index(tid_t tid, struct inode *ip, struct metapage * mp, in lock_index() argument
311 tlck = txLock(tid, ip, mp, tlckDATA); in lock_index()
344 struct metapage *mp; in add_index() local
417 mp = get_index_page(ip, 0); in add_index()
418 if (!mp) { in add_index()
425 tlck = txLock(tid, ip, mp, tlckDATA); in add_index()
434 memcpy(mp->data, temp_table, sizeof(temp_table)); in add_index()
436 mark_metapage_dirty(mp); in add_index()
437 release_metapage(mp); in add_index()
459 if ((mp = get_index_page(ip, blkno))) in add_index()
460 memset(mp->data, 0, PSIZE); /* Just looks better */ in add_index()
464 mp = read_index_page(ip, blkno); in add_index()
466 if (!mp) { in add_index()
471 lock_index(tid, ip, mp, index); in add_index()
474 (struct dir_table_slot *) ((char *) mp->data + page_offset); in add_index()
479 mark_metapage_dirty(mp); in add_index()
480 release_metapage(mp); in add_index()
500 struct metapage *mp = NULL; in free_index() local
502 dirtab_slot = find_index(ip, index, &mp, &lblock); in free_index()
511 if (mp) { in free_index()
512 lock_index(tid, ip, mp, index); in free_index()
513 mark_metapage_dirty(mp); in free_index()
514 release_metapage(mp); in free_index()
525 int slot, struct metapage ** mp, s64 *lblock) in modify_index() argument
529 dirtab_slot = find_index(ip, index, mp, lblock); in modify_index()
537 if (*mp) { in modify_index()
538 lock_index(tid, ip, *mp, index); in modify_index()
539 mark_metapage_dirty(*mp); in modify_index()
553 struct metapage *mp = NULL; in read_index() local
556 slot = find_index(ip, index, &mp, &lblock); in read_index()
563 if (mp) in read_index()
564 release_metapage(mp); in read_index()
586 struct metapage *mp; in dtSearch() local
635 DT_GETPAGE(ip, bn, mp, psize, p, rc); in dtSearch()
707 btsp->mp = mp; in dtSearch()
756 btsp->mp = mp; in dtSearch()
795 DT_PUTPAGE(mp); in dtSearch()
799 DT_PUTPAGE(mp); in dtSearch()
825 struct metapage *mp; /* meta-page buffer */ in dtInsert() local
843 DT_GETSEARCH(ip, btstack->top, bn, mp, p, index); in dtInsert()
850 DT_PUTPAGE(mp); in dtInsert()
870 split.mp = mp; in dtInsert()
884 BT_MARK_DIRTY(mp, ip); in dtInsert()
888 tlck = txLock(tid, ip, mp, tlckDTREE | tlckENTRY); in dtInsert()
913 DT_PUTPAGE(mp); in dtInsert()
957 smp = split->mp; in dtSplitUp()
1234 split->mp = smp; in dtSplitUp()
1339 struct metapage *mp; in dtSplitPage() local
1357 smp = split->mp; in dtSplitPage()
1475 DT_GETPAGE(ip, nextbn, mp, PSIZE, p, rc); in dtSplitPage()
1481 BT_MARK_DIRTY(mp, ip); in dtSplitPage()
1485 tlck = txLock(tid, ip, mp, tlckDTREE | tlckRELINK); in dtSplitPage()
1487 tlck, ip, mp); in dtSplitPage()
1498 DT_PUTPAGE(mp); in dtSplitPage()
1584 mp = NULL; in dtSplitPage()
1589 rbn, n, &mp, &lblock); in dtSplitPage()
1591 if (mp) in dtSplitPage()
1592 release_metapage(mp); in dtSplitPage()
1647 struct metapage *smp, *pmp, *mp; in dtExtendPage() local
1668 smp = split->mp; in dtExtendPage()
1708 mp = NULL; in dtExtendPage()
1715 xaddr, n, &mp, &lblock); in dtExtendPage()
1717 if (mp) in dtExtendPage()
1718 release_metapage(mp); in dtExtendPage()
1899 smp = split->mp; in dtSplitRoot()
1997 struct metapage *mp = NULL; in dtSplitRoot() local
2004 rbn, n, &mp, &lblock); in dtSplitRoot()
2006 if (mp) in dtSplitRoot()
2007 release_metapage(mp); in dtSplitRoot()
2087 struct metapage *mp, *imp; in dtDelete() local
2110 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in dtDelete()
2156 rc = dtDeleteUp(tid, ip, mp, p, &btstack); in dtDelete()
2164 BT_MARK_DIRTY(mp, ip); in dtDelete()
2168 tlck = txLock(tid, ip, mp, tlckDTREE | tlckENTRY); in dtDelete()
2220 DT_PUTPAGE(mp); in dtDelete()
2241 struct metapage *mp; in dtDeleteUp() local
2308 DT_GETPAGE(ip, parent->bn, mp, PSIZE, p, rc); in dtDeleteUp()
2339 DT_PUTPAGE(mp); in dtDeleteUp()
2362 DT_PUTPAGE(mp); in dtDeleteUp()
2372 discard_metapage(mp); in dtDeleteUp()
2384 BT_MARK_DIRTY(mp, ip); in dtDeleteUp()
2390 tlck = txLock(tid, ip, mp, tlckDTREE | tlckENTRY); in dtDeleteUp()
2426 DT_PUTPAGE(mp); in dtDeleteUp()
2449 struct metapage *mp, *pmp, *lmp, *rmp; in dtRelocate() local
2486 DT_GETPAGE(ip, oxaddr, mp, PSIZE, p, rc); in dtRelocate()
2501 DT_PUTPAGE(mp); in dtRelocate()
2512 DT_PUTPAGE(mp); in dtRelocate()
2562 tlck = txLock(tid, ip, mp, tlckDTREE | tlckNEW); in dtRelocate()
2583 DT_PUTPAGE(mp); in dtRelocate()
2647 struct metapage *mp; in dtSearchNode() local
2664 DT_GETPAGE(ip, bn, mp, psize, p, rc); in dtSearchNode()
2681 DT_PUTPAGE(mp); in dtSearchNode()
2693 DT_PUTPAGE(mp); in dtSearchNode()
2710 btsp->mp = mp; in dtSearchNode()
2720 DT_PUTPAGE(mp); in dtSearchNode()
2725 DT_PUTPAGE(mp); in dtSearchNode()
2728 DT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in dtSearchNode()
2750 struct metapage *mp; in dtRelink() local
2761 DT_GETPAGE(ip, nextbn, mp, PSIZE, p, rc); in dtRelink()
2765 BT_MARK_DIRTY(mp, ip); in dtRelink()
2771 tlck = txLock(tid, ip, mp, tlckDTREE | tlckRELINK); in dtRelink()
2773 tlck, ip, mp); in dtRelink()
2785 DT_PUTPAGE(mp); in dtRelink()
2790 DT_GETPAGE(ip, prevbn, mp, PSIZE, p, rc); in dtRelink()
2794 BT_MARK_DIRTY(mp, ip); in dtRelink()
2800 tlck = txLock(tid, ip, mp, tlckDTREE | tlckRELINK); in dtRelink()
2802 tlck, ip, mp); in dtRelink()
2814 DT_PUTPAGE(mp); in dtRelink()
2925 struct metapage *mp; in add_missing_indices() local
2934 DT_GETPAGE(inode, bn, mp, PSIZE, p, rc); in add_missing_indices()
2940 BT_MARK_DIRTY(mp, inode); in add_missing_indices()
2944 tlck = txLock(tid, inode, mp, tlckDTREE | tlckENTRY); in add_missing_indices()
2945 if (BT_IS_ROOT(mp)) in add_missing_indices()
2965 DT_PUTPAGE(mp); in add_missing_indices()
3017 struct metapage *mp; in jfs_readdir() local
3089 DT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in jfs_readdir()
3096 DT_PUTPAGE(mp); in jfs_readdir()
3127 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in jfs_readdir()
3174 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in jfs_readdir()
3185 DT_PUTPAGE(mp); in jfs_readdir()
3303 DT_PUTPAGE(mp); in jfs_readdir()
3325 DT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in jfs_readdir()
3349 struct metapage *mp; in dtReadFirst() local
3363 DT_GETPAGE(ip, bn, mp, psize, p, rc); in dtReadFirst()
3375 btsp->mp = mp; in dtReadFirst()
3384 DT_PUTPAGE(mp); in dtReadFirst()
3401 DT_PUTPAGE(mp); in dtReadFirst()
3426 struct metapage *mp; in dtReadNext() local
3441 DT_GETSEARCH(ip, btstack->top, bn, mp, p, index); in dtReadNext()
3479 DT_PUTPAGE(mp); in dtReadNext()
3494 DT_PUTPAGE(mp); in dtReadNext()
3500 DT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in dtReadNext()
3512 DT_PUTPAGE(mp); in dtReadNext()
3521 DT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in dtReadNext()
3535 DT_PUTPAGE(mp); in dtReadNext()
3541 DT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in dtReadNext()
3553 DT_PUTPAGE(mp); in dtReadNext()
3562 DT_GETPAGE(ip, bn, mp, PSIZE, p, rc); in dtReadNext()
3576 btsp->mp = mp; in dtReadNext()
3922 struct metapage *mp = NULL; in dtInsertEntry() local
4038 mp = NULL; in dtInsertEntry()
4043 &mp, &lblock); in dtInsertEntry()
4045 if (mp) in dtInsertEntry()
4046 release_metapage(mp); in dtInsertEntry()
4526 struct metapage *mp; in dtModify() local
4546 DT_GETSEARCH(ip, btstack.top, bn, mp, p, index); in dtModify()
4548 BT_MARK_DIRTY(mp, ip); in dtModify()
4552 tlck = txLock(tid, ip, mp, tlckDTREE | tlckENTRY); in dtModify()
4573 DT_PUTPAGE(mp); in dtModify()