Lines Matching refs:iagp

295 	struct iag *iagp;  in diRead()  local
322 iagp = (struct iag *) mp->data; in diRead()
328 if ((lengthPXD(&iagp->inoext[extno]) != imap->im_nbperiext) || in diRead()
329 (addressPXD(&iagp->inoext[extno]) == 0)) { in diRead()
337 blkno = INOPBLK(&iagp->inoext[extno], ino, sbi->l2nbperpage); in diRead()
340 agstart = le64_to_cpu(iagp->agstart); in diRead()
845 struct iag *iagp, *aiagp, *biagp, *ciagp, *diagp; in diFree() local
899 iagp = (struct iag *) mp->data; in diFree()
909 if (!(le32_to_cpu(iagp->wmap[extno]) & mask)) { in diFree()
913 if (!addressPXD(&iagp->inoext[extno])) { in diFree()
923 bitmap = le32_to_cpu(iagp->wmap[extno]) & ~mask; in diFree()
945 if (iagp->nfreeinos == 0) { in diFree()
973 iagp->inofreefwd = in diFree()
975 iagp->inofreeback = cpu_to_le32(-1); in diFree()
985 if (iagp->wmap[extno] == cpu_to_le32(ONES)) { in diFree()
988 iagp->inosmap[sword] &= in diFree()
994 iagp->wmap[extno] = cpu_to_le32(bitmap); in diFree()
999 le32_add_cpu(&iagp->nfreeinos, 1); in diFree()
1028 if (iagp->nfreeexts == 0) { in diFree()
1046 if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG - 1)) { in diFree()
1052 if ((fwd = le32_to_cpu(iagp->extfreefwd)) >= 0) { in diFree()
1058 if ((back = le32_to_cpu(iagp->extfreeback)) >= 0) { in diFree()
1069 if (iagp->nfreeinos == cpu_to_le32(INOSPEREXT - 1)) { in diFree()
1070 int inofreeback = le32_to_cpu(iagp->inofreeback); in diFree()
1071 int inofreefwd = le32_to_cpu(iagp->inofreefwd); in diFree()
1116 freepxd = iagp->inoext[extno]; in diFree()
1125 if (iagp->nfreeexts == 0) { in diFree()
1129 iagp->extfreefwd = in diFree()
1131 iagp->extfreeback = cpu_to_le32(-1); in diFree()
1137 if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG - 1)) { in diFree()
1139 aiagp->extfreeback = iagp->extfreeback; in diFree()
1142 biagp->extfreefwd = iagp->extfreefwd; in diFree()
1145 le32_to_cpu(iagp->extfreefwd); in diFree()
1147 iagp->extfreefwd = iagp->extfreeback = cpu_to_le32(-1); in diFree()
1150 iagp->iagfree = cpu_to_le32(imap->im_freeiag); in diFree()
1159 if (iagp->nfreeinos == cpu_to_le32(INOSPEREXT - 1)) { in diFree()
1160 if ((int) le32_to_cpu(iagp->inofreefwd) >= 0) in diFree()
1161 ciagp->inofreeback = iagp->inofreeback; in diFree()
1163 if ((int) le32_to_cpu(iagp->inofreeback) >= 0) in diFree()
1164 diagp->inofreefwd = iagp->inofreefwd; in diFree()
1167 le32_to_cpu(iagp->inofreefwd); in diFree()
1169 iagp->inofreefwd = iagp->inofreeback = cpu_to_le32(-1); in diFree()
1177 if (iagp->pmap[extno] != 0) { in diFree()
1180 iagp->wmap[extno] = 0; in diFree()
1181 PXDlength(&iagp->inoext[extno], 0); in diFree()
1182 PXDaddress(&iagp->inoext[extno], 0); in diFree()
1192 iagp->inosmap[sword] |= cpu_to_le32(mask); in diFree()
1193 iagp->extsmap[sword] &= cpu_to_le32(~mask); in diFree()
1198 le32_add_cpu(&iagp->nfreeinos, -(INOSPEREXT - 1)); in diFree()
1199 le32_add_cpu(&iagp->nfreeexts, 1); in diFree()
1292 diInitInode(struct inode *ip, int iagno, int ino, int extno, struct iag * iagp) in diInitInode() argument
1297 jfs_ip->ixpxd = iagp->inoext[extno]; in diInitInode()
1298 jfs_ip->agstart = le64_to_cpu(iagp->agstart); in diInitInode()
1327 struct iag *iagp; in diAlloc() local
1390 iagp = (struct iag *) mp->data; in diAlloc()
1396 addext = (imap->im_agctl[agno].numfree < 32 && iagp->nfreeexts); in diAlloc()
1404 if (iagp->nfreeinos || addext) { in diAlloc()
1412 if (addressPXD(&iagp->inoext[extno])) { in diAlloc()
1415 diFindFree(le32_to_cpu(iagp->wmap[extno]), in diAlloc()
1423 rc = diAllocBit(imap, iagp, ino); in diAlloc()
1432 iagp); in diAlloc()
1473 inosmap = le32_to_cpu(iagp->inosmap[sword]) | mask; in diAlloc()
1474 extsmap = le32_to_cpu(iagp->extsmap[sword]) | mask; in diAlloc()
1490 rem = diFindFree(le32_to_cpu(iagp->wmap[extno]), in diAlloc()
1506 rc = diAllocBit(imap, iagp, ino); in diAlloc()
1515 iagp); in diAlloc()
1540 if ((rc = diNewExt(imap, iagp, extno))) { in diAlloc()
1555 extno, iagp); in diAlloc()
1569 inosmap = le32_to_cpu(iagp->inosmap[sword]); in diAlloc()
1570 extsmap = le32_to_cpu(iagp->extsmap[sword]); in diAlloc()
1765 struct iag *iagp; in diAllocIno() local
1781 iagp = (struct iag *) mp->data; in diAllocIno()
1786 if (!iagp->nfreeinos) { in diAllocIno()
1805 if (~iagp->inosmap[sword]) in diAllocIno()
1812 rem = diFindFree(le32_to_cpu(iagp->inosmap[sword]), 0); in diAllocIno()
1823 rem = diFindFree(le32_to_cpu(iagp->wmap[extno]), 0); in diAllocIno()
1837 rc = diAllocBit(imap, iagp, ino); in diAllocIno()
1846 diInitInode(ip, iagno, ino, extno, iagp); in diAllocIno()
1889 struct iag *iagp; in diAllocExt() local
1901 iagp = (struct iag *) mp->data; in diAllocExt()
1905 iagp->agstart = in diAllocExt()
1916 iagp = (struct iag *) mp->data; in diAllocExt()
1928 if (~iagp->extsmap[sword]) in diAllocExt()
1934 rem = diFindFree(le32_to_cpu(iagp->extsmap[sword]), 0); in diAllocExt()
1945 rc = diNewExt(imap, iagp, extno); in diAllocExt()
1952 if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG)) { in diAllocExt()
1954 iagp->iagfree = cpu_to_le32(imap->im_freeiag); in diAllocExt()
1964 diInitInode(ip, iagno, extno << L2INOSPEREXT, extno, iagp); in diAllocExt()
2002 static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino) in diAllocBit() argument
2014 if (iagp->nfreeinos == cpu_to_le32(1)) { in diAllocBit()
2015 if ((int) le32_to_cpu(iagp->inofreefwd) >= 0) { in diAllocBit()
2017 diIAGRead(imap, le32_to_cpu(iagp->inofreefwd), in diAllocBit()
2023 if ((int) le32_to_cpu(iagp->inofreeback) >= 0) { in diAllocBit()
2026 le32_to_cpu(iagp->inofreeback), in diAllocBit()
2039 agno = BLKTOAG(le64_to_cpu(iagp->agstart), JFS_SBI(imap->im_ipimap->i_sb)); in diAllocBit()
2049 if (((le32_to_cpu(iagp->pmap[extno]) & mask) != 0) || in diAllocBit()
2050 ((le32_to_cpu(iagp->wmap[extno]) & mask) != 0) || in diAllocBit()
2051 (addressPXD(&iagp->inoext[extno]) == 0)) { in diAllocBit()
2063 iagp->wmap[extno] |= cpu_to_le32(mask); in diAllocBit()
2069 if (iagp->wmap[extno] == cpu_to_le32(ONES)) { in diAllocBit()
2072 iagp->inosmap[sword] |= cpu_to_le32(HIGHORDER >> bitno); in diAllocBit()
2078 if (iagp->nfreeinos == cpu_to_le32(1)) { in diAllocBit()
2080 aiagp->inofreeback = iagp->inofreeback; in diAllocBit()
2085 biagp->inofreefwd = iagp->inofreefwd; in diAllocBit()
2089 le32_to_cpu(iagp->inofreefwd); in diAllocBit()
2091 iagp->inofreefwd = iagp->inofreeback = cpu_to_le32(-1); in diAllocBit()
2097 le32_add_cpu(&iagp->nfreeinos, -1); in diAllocBit()
2148 static int diNewExt(struct inomap * imap, struct iag * iagp, int extno) in diNewExt() argument
2163 if (!iagp->nfreeexts) { in diNewExt()
2177 agno = BLKTOAG(le64_to_cpu(iagp->agstart), sbi); in diNewExt()
2178 iagno = le32_to_cpu(iagp->iagnum); in diNewExt()
2185 if (iagp->nfreeexts == cpu_to_le32(1)) { in diNewExt()
2186 if ((fwd = le32_to_cpu(iagp->extfreefwd)) >= 0) { in diNewExt()
2192 if ((back = le32_to_cpu(iagp->extfreeback)) >= 0) { in diNewExt()
2205 if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG)) { in diNewExt()
2221 if (iagp->nfreeinos == 0) { in diNewExt()
2245 if ((extno == 0) || (addressPXD(&iagp->inoext[extno - 1]) == 0)) in diNewExt()
2248 hint = addressPXD(&iagp->inoext[extno - 1]) + in diNewExt()
2249 lengthPXD(&iagp->inoext[extno - 1]) - 1; in diNewExt()
2290 if (iagp->nfreeexts == cpu_to_le32(1)) { in diNewExt()
2292 aiagp->extfreeback = iagp->extfreeback; in diNewExt()
2295 biagp->extfreefwd = iagp->extfreefwd; in diNewExt()
2298 le32_to_cpu(iagp->extfreefwd); in diNewExt()
2300 iagp->extfreefwd = iagp->extfreeback = cpu_to_le32(-1); in diNewExt()
2305 if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG)) { in diNewExt()
2309 iagp->extfreefwd = cpu_to_le32(fwd); in diNewExt()
2310 iagp->extfreeback = cpu_to_le32(-1); in diNewExt()
2318 if (iagp->nfreeinos == 0) { in diNewExt()
2322 iagp->inofreefwd = in diNewExt()
2324 iagp->inofreeback = cpu_to_le32(-1); in diNewExt()
2329 PXDlength(&iagp->inoext[extno], imap->im_nbperiext); in diNewExt()
2330 PXDaddress(&iagp->inoext[extno], blkno); in diNewExt()
2336 iagp->wmap[extno] = cpu_to_le32(HIGHORDER); in diNewExt()
2337 iagp->pmap[extno] = 0; in diNewExt()
2345 iagp->extsmap[sword] |= cpu_to_le32(mask); in diNewExt()
2346 iagp->inosmap[sword] &= cpu_to_le32(~mask); in diNewExt()
2351 le32_add_cpu(&iagp->nfreeinos, (INOSPEREXT - 1)); in diNewExt()
2352 le32_add_cpu(&iagp->nfreeexts, -1); in diNewExt()
2438 struct iag *iagp; in diNewIAG() local
2554 iagp = (struct iag *) mp->data; in diNewIAG()
2557 memset(iagp, 0, sizeof(struct iag)); in diNewIAG()
2558 iagp->iagnum = cpu_to_le32(iagno); in diNewIAG()
2559 iagp->inofreefwd = iagp->inofreeback = cpu_to_le32(-1); in diNewIAG()
2560 iagp->extfreefwd = iagp->extfreeback = cpu_to_le32(-1); in diNewIAG()
2561 iagp->iagfree = cpu_to_le32(-1); in diNewIAG()
2562 iagp->nfreeinos = 0; in diNewIAG()
2563 iagp->nfreeexts = cpu_to_le32(EXTSPERIAG); in diNewIAG()
2569 iagp->inosmap[i] = cpu_to_le32(ONES); in diNewIAG()
2615 iagp = (struct iag *) mp->data; in diNewIAG()
2618 imap->im_freeiag = le32_to_cpu(iagp->iagfree); in diNewIAG()
2619 iagp->iagfree = cpu_to_le32(-1); in diNewIAG()
2719 struct iag *iagp; in diUpdatePMap() local
2743 iagp = (struct iag *) mp->data; in diUpdatePMap()
2760 if (!(le32_to_cpu(iagp->wmap[extno]) & mask)) { in diUpdatePMap()
2765 if (!(le32_to_cpu(iagp->pmap[extno]) & mask)) { in diUpdatePMap()
2771 iagp->pmap[extno] &= cpu_to_le32(~mask); in diUpdatePMap()
2780 if (!(le32_to_cpu(iagp->wmap[extno]) & mask)) { in diUpdatePMap()
2786 if ((le32_to_cpu(iagp->pmap[extno]) & mask) != 0) { in diUpdatePMap()
2793 iagp->pmap[extno] |= cpu_to_le32(mask); in diUpdatePMap()
2841 struct iag *iagp = NULL, *hiagp = NULL; in diExtendFS() local
2878 iagp = (struct iag *) bp->data; in diExtendFS()
2879 if (le32_to_cpu(iagp->iagnum) != i) { in diExtendFS()
2886 if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG)) { in diExtendFS()
2891 agstart = le64_to_cpu(iagp->agstart); in diExtendFS()
2893 iagp->agstart = cpu_to_le64((s64)n << mp->db_agl2size); in diExtendFS()
2896 numinos = (EXTSPERIAG - le32_to_cpu(iagp->nfreeexts)) in diExtendFS()
2905 if ((int) le32_to_cpu(iagp->nfreeinos) > 0) { in diExtendFS()
2907 iagp->inofreefwd = cpu_to_le32(-1); in diExtendFS()
2908 iagp->inofreeback = cpu_to_le32(-1); in diExtendFS()
2915 hiagp->inofreeback = iagp->iagnum; in diExtendFS()
2916 iagp->inofreefwd = cpu_to_le32(head); in diExtendFS()
2917 iagp->inofreeback = cpu_to_le32(-1); in diExtendFS()
2922 le32_to_cpu(iagp->iagnum); in diExtendFS()
2926 le32_to_cpu(iagp->nfreeinos); in diExtendFS()
2927 xnumfree += le32_to_cpu(iagp->nfreeinos); in diExtendFS()
2931 if (le32_to_cpu(iagp->nfreeexts) > 0) { in diExtendFS()
2933 iagp->extfreefwd = cpu_to_le32(-1); in diExtendFS()
2934 iagp->extfreeback = cpu_to_le32(-1); in diExtendFS()
2941 hiagp->extfreeback = iagp->iagnum; in diExtendFS()
2942 iagp->extfreefwd = cpu_to_le32(head); in diExtendFS()
2943 iagp->extfreeback = cpu_to_le32(-1); in diExtendFS()
2948 le32_to_cpu(iagp->iagnum); in diExtendFS()