Lines Matching refs:iagp
331 struct iag *iagp; in diRead() local
358 iagp = (struct iag *) mp->data; in diRead()
364 if ((lengthPXD(&iagp->inoext[extno]) != imap->im_nbperiext) || in diRead()
365 (addressPXD(&iagp->inoext[extno]) == 0)) { in diRead()
373 blkno = INOPBLK(&iagp->inoext[extno], ino, sbi->l2nbperpage); in diRead()
376 agstart = le64_to_cpu(iagp->agstart); in diRead()
899 struct iag *iagp, *aiagp, *biagp, *ciagp, *diagp; in diFree() local
953 iagp = (struct iag *) mp->data; in diFree()
963 if (!(le32_to_cpu(iagp->wmap[extno]) & mask)) { in diFree()
968 if (!addressPXD(&iagp->inoext[extno])) { in diFree()
978 bitmap = le32_to_cpu(iagp->wmap[extno]) & ~mask; in diFree()
1000 if (iagp->nfreeinos == 0) { in diFree()
1028 iagp->inofreefwd = in diFree()
1030 iagp->inofreeback = -1; in diFree()
1040 if (iagp->wmap[extno] == ONES) { in diFree()
1043 iagp->inosmap[sword] &= in diFree()
1049 iagp->wmap[extno] = cpu_to_le32(bitmap); in diFree()
1055 iagp->nfreeinos = in diFree()
1056 cpu_to_le32(le32_to_cpu(iagp->nfreeinos) + 1); in diFree()
1085 if (iagp->nfreeexts == 0) { in diFree()
1103 if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG - 1)) { in diFree()
1109 if ((fwd = le32_to_cpu(iagp->extfreefwd)) >= 0) { in diFree()
1115 if ((back = le32_to_cpu(iagp->extfreeback)) >= 0) { in diFree()
1126 if (iagp->nfreeinos == cpu_to_le32(INOSPEREXT - 1)) { in diFree()
1127 int inofreeback = le32_to_cpu(iagp->inofreeback); in diFree()
1128 int inofreefwd = le32_to_cpu(iagp->inofreefwd); in diFree()
1173 freepxd = iagp->inoext[extno]; in diFree()
1182 if (iagp->nfreeexts == 0) { in diFree()
1186 iagp->extfreefwd = in diFree()
1188 iagp->extfreeback = -1; in diFree()
1194 if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG - 1)) { in diFree()
1196 aiagp->extfreeback = iagp->extfreeback; in diFree()
1199 biagp->extfreefwd = iagp->extfreefwd; in diFree()
1202 le32_to_cpu(iagp->extfreefwd); in diFree()
1204 iagp->extfreefwd = iagp->extfreeback = -1; in diFree()
1207 iagp->iagfree = cpu_to_le32(imap->im_freeiag); in diFree()
1216 if (iagp->nfreeinos == cpu_to_le32(INOSPEREXT - 1)) { in diFree()
1217 if ((int) le32_to_cpu(iagp->inofreefwd) >= 0) in diFree()
1218 ciagp->inofreeback = iagp->inofreeback; in diFree()
1220 if ((int) le32_to_cpu(iagp->inofreeback) >= 0) in diFree()
1221 diagp->inofreefwd = iagp->inofreefwd; in diFree()
1224 le32_to_cpu(iagp->inofreefwd); in diFree()
1226 iagp->inofreefwd = iagp->inofreeback = -1; in diFree()
1234 if (iagp->pmap[extno] != 0) { in diFree()
1237 iagp->wmap[extno] = 0; in diFree()
1239 PXDlength(&iagp->inoext[extno], 0); in diFree()
1240 PXDaddress(&iagp->inoext[extno], 0); in diFree()
1250 iagp->inosmap[sword] |= cpu_to_le32(mask); in diFree()
1251 iagp->extsmap[sword] &= cpu_to_le32(~mask); in diFree()
1256 iagp->nfreeinos = cpu_to_le32(le32_to_cpu(iagp->nfreeinos) - in diFree()
1258 iagp->nfreeexts = cpu_to_le32(le32_to_cpu(iagp->nfreeexts) + 1); in diFree()
1351 diInitInode(struct inode *ip, int iagno, int ino, int extno, struct iag * iagp) in diInitInode() argument
1358 jfs_ip->ixpxd = iagp->inoext[extno]; in diInitInode()
1359 jfs_ip->agno = BLKTOAG(le64_to_cpu(iagp->agstart), sbi); in diInitInode()
1388 struct iag *iagp; in diAlloc() local
1451 iagp = (struct iag *) mp->data; in diAlloc()
1457 addext = (imap->im_agctl[agno].numfree < 32 && iagp->nfreeexts); in diAlloc()
1465 if (iagp->nfreeinos || addext) { in diAlloc()
1473 if (addressPXD(&iagp->inoext[extno])) { in diAlloc()
1476 diFindFree(le32_to_cpu(iagp->wmap[extno]), in diAlloc()
1484 rc = diAllocBit(imap, iagp, ino); in diAlloc()
1493 iagp); in diAlloc()
1534 inosmap = le32_to_cpu(iagp->inosmap[sword]) | mask; in diAlloc()
1535 extsmap = le32_to_cpu(iagp->extsmap[sword]) | mask; in diAlloc()
1551 rem = diFindFree(le32_to_cpu(iagp->wmap[extno]), in diAlloc()
1568 rc = diAllocBit(imap, iagp, ino); in diAlloc()
1577 iagp); in diAlloc()
1602 if ((rc = diNewExt(imap, iagp, extno))) { in diAlloc()
1617 extno, iagp); in diAlloc()
1631 inosmap = le32_to_cpu(iagp->inosmap[sword]); in diAlloc()
1632 extsmap = le32_to_cpu(iagp->extsmap[sword]); in diAlloc()
1827 struct iag *iagp; in diAllocIno() local
1843 iagp = (struct iag *) mp->data; in diAllocIno()
1848 if (!iagp->nfreeinos) { in diAllocIno()
1868 if (~iagp->inosmap[sword]) in diAllocIno()
1875 rem = diFindFree(le32_to_cpu(iagp->inosmap[sword]), 0); in diAllocIno()
1886 rem = diFindFree(le32_to_cpu(iagp->wmap[extno]), 0); in diAllocIno()
1900 rc = diAllocBit(imap, iagp, ino); in diAllocIno()
1909 diInitInode(ip, iagno, ino, extno, iagp); in diAllocIno()
1952 struct iag *iagp; in diAllocExt() local
1964 iagp = (struct iag *) mp->data; in diAllocExt()
1968 iagp->agstart = in diAllocExt()
1979 iagp = (struct iag *) mp->data; in diAllocExt()
1992 if (~iagp->extsmap[sword]) in diAllocExt()
1998 rem = diFindFree(le32_to_cpu(iagp->extsmap[sword]), 0); in diAllocExt()
2009 rc = diNewExt(imap, iagp, extno); in diAllocExt()
2016 if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG)) { in diAllocExt()
2018 iagp->iagfree = cpu_to_le32(imap->im_freeiag); in diAllocExt()
2028 diInitInode(ip, iagno, extno << L2INOSPEREXT, extno, iagp); in diAllocExt()
2066 static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino) in diAllocBit() argument
2078 if (iagp->nfreeinos == cpu_to_le32(1)) { in diAllocBit()
2081 if ((int) le32_to_cpu(iagp->inofreefwd) >= 0) { in diAllocBit()
2083 diIAGRead(imap, le32_to_cpu(iagp->inofreefwd), in diAllocBit()
2089 if ((int) le32_to_cpu(iagp->inofreeback) >= 0) { in diAllocBit()
2092 le32_to_cpu(iagp->inofreeback), in diAllocBit()
2105 agno = BLKTOAG(le64_to_cpu(iagp->agstart), JFS_SBI(imap->im_ipimap->i_sb)); in diAllocBit()
2115 if (((le32_to_cpu(iagp->pmap[extno]) & mask) != 0) || in diAllocBit()
2116 ((le32_to_cpu(iagp->wmap[extno]) & mask) != 0) || in diAllocBit()
2117 (addressPXD(&iagp->inoext[extno]) == 0)) { in diAllocBit()
2130 iagp->wmap[extno] |= cpu_to_le32(mask); in diAllocBit()
2136 if (iagp->wmap[extno] == ONES) { in diAllocBit()
2139 iagp->inosmap[sword] |= cpu_to_le32(HIGHORDER >> bitno); in diAllocBit()
2145 if (iagp->nfreeinos == cpu_to_le32(1)) { in diAllocBit()
2147 aiagp->inofreeback = iagp->inofreeback; in diAllocBit()
2152 biagp->inofreefwd = iagp->inofreefwd; in diAllocBit()
2156 le32_to_cpu(iagp->inofreefwd); in diAllocBit()
2158 iagp->inofreefwd = iagp->inofreeback = -1; in diAllocBit()
2164 iagp->nfreeinos = cpu_to_le32(le32_to_cpu(iagp->nfreeinos) - 1); in diAllocBit()
2215 static int diNewExt(struct inomap * imap, struct iag * iagp, int extno) in diNewExt() argument
2230 if (!iagp->nfreeexts) { in diNewExt()
2244 agno = BLKTOAG(le64_to_cpu(iagp->agstart), sbi); in diNewExt()
2245 iagno = le32_to_cpu(iagp->iagnum); in diNewExt()
2252 if (iagp->nfreeexts == cpu_to_le32(1)) { in diNewExt()
2253 if ((fwd = le32_to_cpu(iagp->extfreefwd)) >= 0) { in diNewExt()
2259 if ((back = le32_to_cpu(iagp->extfreeback)) >= 0) { in diNewExt()
2272 if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG)) { in diNewExt()
2288 if (iagp->nfreeinos == 0) { in diNewExt()
2312 if ((extno == 0) || (addressPXD(&iagp->inoext[extno - 1]) == 0)) in diNewExt()
2315 hint = addressPXD(&iagp->inoext[extno - 1]) + in diNewExt()
2316 lengthPXD(&iagp->inoext[extno - 1]) - 1; in diNewExt()
2357 if (iagp->nfreeexts == cpu_to_le32(1)) { in diNewExt()
2359 aiagp->extfreeback = iagp->extfreeback; in diNewExt()
2362 biagp->extfreefwd = iagp->extfreefwd; in diNewExt()
2365 le32_to_cpu(iagp->extfreefwd); in diNewExt()
2367 iagp->extfreefwd = iagp->extfreeback = -1; in diNewExt()
2372 if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG)) { in diNewExt()
2376 iagp->extfreefwd = cpu_to_le32(fwd); in diNewExt()
2377 iagp->extfreeback = -1; in diNewExt()
2385 if (iagp->nfreeinos == 0) { in diNewExt()
2389 iagp->inofreefwd = in diNewExt()
2391 iagp->inofreeback = -1; in diNewExt()
2396 PXDlength(&iagp->inoext[extno], imap->im_nbperiext); in diNewExt()
2397 PXDaddress(&iagp->inoext[extno], blkno); in diNewExt()
2403 iagp->wmap[extno] = cpu_to_le32(HIGHORDER); in diNewExt()
2404 iagp->pmap[extno] = 0; in diNewExt()
2412 iagp->extsmap[sword] |= cpu_to_le32(mask); in diNewExt()
2413 iagp->inosmap[sword] &= cpu_to_le32(~mask); in diNewExt()
2418 iagp->nfreeinos = cpu_to_le32(le32_to_cpu(iagp->nfreeinos) + in diNewExt()
2420 iagp->nfreeexts = cpu_to_le32(le32_to_cpu(iagp->nfreeexts) - 1); in diNewExt()
2506 struct iag *iagp; in diNewIAG() local
2592 iagp = (struct iag *) mp->data; in diNewIAG()
2595 memset(iagp, 0, sizeof(struct iag)); in diNewIAG()
2596 iagp->iagnum = cpu_to_le32(iagno); in diNewIAG()
2597 iagp->inofreefwd = iagp->inofreeback = -1; in diNewIAG()
2598 iagp->extfreefwd = iagp->extfreeback = -1; in diNewIAG()
2599 iagp->iagfree = -1; in diNewIAG()
2600 iagp->nfreeinos = 0; in diNewIAG()
2601 iagp->nfreeexts = cpu_to_le32(EXTSPERIAG); in diNewIAG()
2607 iagp->inosmap[i] = ONES; in diNewIAG()
2694 iagp = (struct iag *) mp->data; in diNewIAG()
2697 imap->im_freeiag = le32_to_cpu(iagp->iagfree); in diNewIAG()
2698 iagp->iagfree = -1; in diNewIAG()
2798 struct iag *iagp; in diUpdatePMap() local
2821 iagp = (struct iag *) mp->data; in diUpdatePMap()
2838 if (!(le32_to_cpu(iagp->wmap[extno]) & mask)) { in diUpdatePMap()
2843 if (!(le32_to_cpu(iagp->pmap[extno]) & mask)) { in diUpdatePMap()
2849 iagp->pmap[extno] &= cpu_to_le32(~mask); in diUpdatePMap()
2858 if (!(le32_to_cpu(iagp->wmap[extno]) & mask)) { in diUpdatePMap()
2865 if ((le32_to_cpu(iagp->pmap[extno]) & mask) != 0) { in diUpdatePMap()
2873 iagp->pmap[extno] |= cpu_to_le32(mask); in diUpdatePMap()
2926 struct iag *iagp = 0, *hiagp = 0; in diExtendFS() local
2963 iagp = (struct iag *) bp->data; in diExtendFS()
2964 if (le32_to_cpu(iagp->iagnum) != i) { in diExtendFS()
2972 if (iagp->nfreeexts == cpu_to_le32(EXTSPERIAG)) { in diExtendFS()
2978 agstart = le64_to_cpu(iagp->agstart); in diExtendFS()
2983 numinos = (EXTSPERIAG - le32_to_cpu(iagp->nfreeexts)) in diExtendFS()
2992 if ((int) le32_to_cpu(iagp->nfreeinos) > 0) { in diExtendFS()
2994 iagp->inofreefwd = iagp->inofreeback = -1; in diExtendFS()
3001 hiagp->inofreeback = iagp->iagnum; in diExtendFS()
3002 iagp->inofreefwd = cpu_to_le32(head); in diExtendFS()
3003 iagp->inofreeback = -1; in diExtendFS()
3008 le32_to_cpu(iagp->iagnum); in diExtendFS()
3012 le32_to_cpu(iagp->nfreeinos); in diExtendFS()
3013 xnumfree += le32_to_cpu(iagp->nfreeinos); in diExtendFS()
3017 if (le32_to_cpu(iagp->nfreeexts) > 0) { in diExtendFS()
3019 iagp->extfreefwd = iagp->extfreeback = -1; in diExtendFS()
3026 hiagp->extfreeback = iagp->iagnum; in diExtendFS()
3027 iagp->extfreefwd = cpu_to_le32(head); in diExtendFS()
3028 iagp->extfreeback = -1; in diExtendFS()
3033 le32_to_cpu(iagp->iagnum); in diExtendFS()