Lines Matching refs:iag

50 /* iag free list lock */
55 /* per ag iag list locks */
65 static int diAllocBit(struct inomap *, struct iag *, int);
69 static int diNewExt(struct inomap *, struct iag *, int);
144 /* allocate and init iag free list lock */
274 * for regular inodes, the iag describing the disk inode
296 struct iag *iagp;
310 /* determine the iag number for this inode (number) */
313 /* read the iag */
323 iagp = (struct iag *) mp->data;
340 /* get the ag for the iag */
811 * free inode within the iag, the iag will be placed on
817 * up the inode extent will be freed. in addition, the iag
819 * is the first free extent in the iag. if freeing the
821 * the iag, the iag will also be removed from the ag free
824 * the iag describing the inode will be freed if the extent
826 * the iag. in this case, the iag will be removed from the
828 * the inode map's free iag list.
846 struct iag *iagp, *aiagp, *biagp, *ciagp, *diagp;
865 /* get the iag number containing the inode.
869 /* make sure that the iag is contained within
893 /* read the iag.
900 iagp = (struct iag *) mp->data;
903 * the iag and the inode number within the extent.
942 /* if the iag currently has no free inodes (i.e.,
943 * the inode being freed is the first free inode of iag),
944 * insert the iag at head of the inode free list for the ag.
949 * we can link the current iag onto the list at
953 /* read the iag that currently is the head
962 aiagp = (struct iag *) amp->data;
964 /* make current head point back to the iag.
971 /* iag points forward to current head and iag
997 /* update the free inode counts at the iag, ag and
1008 /* write the iag */
1021 * prepare to update iag list(s) (careful update step 1)
1026 /* check if the iag currently has no free extents. if so,
1031 * if so, read the iag at the head of the list now.
1032 * this (head) iag will be updated later to reflect
1033 * the addition of the current iag at the head of
1039 aiagp = (struct iag *) amp->data;
1042 /* iag has free extents. check if the addition of a free
1044 * iag. if so, the iag will be removed from the ag extent
1045 * free list and placed on the inode map's free iag list.
1048 /* in preparation for removing the iag from the
1050 * and following the iag on the ag extent free
1056 aiagp = (struct iag *) amp->data;
1062 biagp = (struct iag *) bmp->data;
1067 /* remove the iag from the ag inode free list if freeing
1068 * this extent cause the iag to have no free inodes.
1074 /* in preparation for removing the iag from the
1076 * and following the iag on the ag inode free
1079 * from up above, since re-reading an iag (buffer)
1085 ciagp = (struct iag *) amp->data;
1087 ciagp = (struct iag *) bmp->data;
1092 ciagp = (struct iag *) cmp->data;
1099 diagp = (struct iag *) amp->data;
1101 diagp = (struct iag *) bmp->data;
1106 diagp = (struct iag *) dmp->data;
1121 * update iag list(s) (careful update step 2)
1123 /* add the iag to the ag extent free list if this is the
1124 * first free extent for the iag.
1135 /* remove the iag from the ag extent list if all extents
1136 * are now free and place it on the inode map iag free list.
1157 /* remove the iag from the ag inode free list if freeing
1158 * this extent causes the iag to have no free inodes.
1197 * for the iag.
1223 * N.B. AG_LOCK is released and iag will be released below, and
1231 /* acquire tlock of the iag page of the freed ixad
1233 * logged from the iag page) until NOREDOPAGE|FREEXTENT log
1293 diInitInode(struct inode *ip, int iagno, int ino, int extno, struct iag * iagp)
1328 struct iag *iagp;
1349 * the same iag containing the parent disk inode:
1354 * file system and the iag.
1357 /* get the ag number of this iag */
1377 /* back off the hint if it is outside of the iag */
1387 /* get the iag number and read the iag */
1394 iagp = (struct iag *) mp->data;
1396 /* determine if new inode extent is allowed to be added to the iag.
1397 * new inode extent can be added to the iag if the ag
1398 * has less than 32 free disk inodes and the iag has free extents.
1405 /* check if the inode may be allocated from the iag
1433 * and write the iag.
1506 * iag and allocate the inode from the
1516 * and write the iag.
1555 * and write the iag.
1580 /* nothing doing in this iag, so release it. */
1747 * allocation occurs from the first iag on the list using
1748 * the iag's free inode summary map to find the leftmost
1749 * free inode in the iag.
1769 struct iag *iagp;
1779 /* read the iag at the head of the list.
1785 iagp = (struct iag *) mp->data;
1787 /* better be free inodes in this iag if it is on the
1793 jfs_error(ip->i_sb, "nfreeinos = 0, but iag on freelist\n");
1835 /* compute the inode number within the iag.
1848 /* set the results of the allocation and write the iag.
1860 * FUNCTION: add a new extent of free inodes to an iag, allocating
1864 * this routine first tries to find an existing iag with free
1868 * empty), a new iag will be allocated for the ag to contain
1871 * once an iag has been selected, the free extent summary map
1872 * is used to locate a free extent within the iag and diNewExt()
1893 struct iag *iagp;
1896 * allocate a new iag for the ag.
1905 iagp = (struct iag *) mp->data;
1907 /* set the ag number if this a brand new iag
1912 /* read the iag.
1917 jfs_error(ip->i_sb, "error reading iag\n");
1920 iagp = (struct iag *) mp->data;
1952 /* something bad happened. if a new iag was allocated,
1953 * place it back on the inode map's iag free list, and
1966 /* set the results of the allocation and write the iag.
1979 * FUNCTION: allocate a backed inode from an iag.
1985 * inode within the iag, the iag will be removed from the
1998 * iagp - pointer to iag.
1999 * ino - inode number to be allocated within the iag.
2006 static int diAllocBit(struct inomap * imap, struct iag * iagp, int ino)
2010 struct iag *aiagp = NULL, *biagp = NULL;
2013 /* check if this is the last free inode within the iag.
2024 aiagp = (struct iag *) amp->data;
2036 biagp = (struct iag *) bmp->data;
2061 jfs_error(imap->im_ipimap->i_sb, "iag inconsistent\n");
2079 /* if this was the last free inode in the iag, remove the
2080 * iag from the ag free inode list.
2098 /* update the free inode count at the iag, ag, inode
2112 * FUNCTION: initialize a new extent of inodes for an iag, allocating
2122 * if the iag is new, it is not yet on an ag extent free list
2125 * if the allocation of the new extent causes the iag to
2126 * have no free extent, the iag will be removed from the
2129 * if the iag has no free backed inodes, it will be placed
2144 * iagp - pointer to iag.
2152 static int diNewExt(struct inomap * imap, struct iag * iagp, int extno)
2155 struct iag *aiagp = NULL, *biagp = NULL, *ciagp = NULL;
2179 /* get the ag and iag numbers for this iag.
2188 * iag. if so, the iag must be removed from the ag
2190 * following the iag on this list.
2196 aiagp = (struct iag *) amp->data;
2202 biagp = (struct iag *) bmp->data;
2205 /* the iag has free extents. if all extents are free
2206 * (as is the case for a newly allocated iag), the iag
2208 * the iag at the head of the list in preparation for
2209 * adding this iag to this list.
2216 aiagp = (struct iag *) amp->data;
2221 /* check if the iag has no free inodes. if so, the iag
2223 * the iag at the head of the list in preparation for
2224 * adding this iag to this list. in doing this, we must
2225 * check if we already have the iag at the head of
2239 ciagp = (struct iag *) cmp->data;
2294 /* if this is the last free extent within the iag, remove the
2295 * iag from the ag free extent list.
2309 /* if the iag has all free extents (newly allocated iag),
2310 * add the iag to the ag free extent list.
2322 /* if the iag has no free inodes, add the iag to the
2356 * iag.
2400 * FUNCTION: allocate a new iag for an allocation group.
2402 * first tries to allocate the iag from the inode map
2406 * if the inode map's iag free list is empty, the inode map
2407 * is extended to hold a new iag. this new iag is initialized
2412 * iagnop - pointer to an iag number set with the number of the
2413 * newly allocated iag upon successful return.
2427 * note: new iag transaction:
2428 * . synchronously write iag;
2432 * . at start of logredo(): init in-memory imap with one additional iag page;
2445 struct iag *iagp;
2456 /* acquire the free iag lock */
2459 /* if there are any iags on the inode map free iag list,
2460 * allocate the iag from the head of the list.
2463 /* pick up the iag number at the head of the list */
2466 /* determine the logical block number of the iag */
2470 * to include a new iag.
2485 /* get the next available iag number */
2500 * synchronously append new iag page.
2502 /* determine the logical address of iag page to append */
2505 /* Allocate extent for new iag page */
2516 * addressing structure pointing to the new iag page;
2526 /* Free the blocks allocated for the iag since it was
2561 iagp = (struct iag *) mp->data;
2563 /* init the iag */
2564 memset(iagp, 0, sizeof(struct iag));
2596 /* update the next available iag number */
2599 /* Add the iag to the iag free list so we don't lose the iag
2616 /* read the iag */
2622 iagp = (struct iag *) mp->data;
2624 /* remove the iag from the iag free list */
2628 /* set the return iag number and buffer pointer */
2633 /* release the iag free lock */
2642 * FUNCTION: get the buffer for the specified iag within a fileset
2647 * iagno - iag number.
2665 /* compute the logical block number of the iag. */
2668 /* read the iag. */
2726 struct iag *iagp;
2736 /* get the iag number containing the inode */
2738 /* make sure that the iag is contained within the map */
2740 jfs_error(ipimap->i_sb, "the iag is outside the map\n");
2743 /* read the iag */
2750 iagp = (struct iag *) mp->data;
2752 * the iag and the inode number within the extent.
2803 * update iag lsn
2848 struct iag *iagp = NULL, *hiagp = NULL;
2876 * process each iag page of the map.
2885 iagp = (struct iag *) bp->data;
2892 /* leave free iag in the free iag list */
2921 hiagp = (struct iag *) hbp->data;
2947 hiagp = (struct iag *) hbp->data;