Lines Matching defs:ucpi

43 	struct ufs_cg_private_info * ucpi;
66 ucpi = ufs_load_cylinder (sb, cgno);
67 if (!ucpi)
69 ucg = ubh_get_ucg (UCPI_UBH(ucpi));
77 blkmap = ubh_blkmap (UCPI_UBH(ucpi), ucpi->c_freeoff, bbase);
80 if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_freeoff, i))
81 ubh_setbit (UCPI_UBH(ucpi), ucpi->c_freeoff, i);
91 blkmap = ubh_blkmap (UCPI_UBH(ucpi), ucpi->c_freeoff, bbase);
98 if (ubh_isblockset(UCPI_UBH(ucpi), ucpi->c_freeoff, blkno)) {
103 ufs_clusteracct (sb, ucpi, blkno, 1);
110 fs16_add(sb, &ubh_cg_blks(ucpi, cylno,
112 fs32_add(sb, &ubh_cg_blktot(ucpi, cylno), 1);
117 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
119 ubh_sync_block(UCPI_UBH(ucpi));
139 struct ufs_cg_private_info * ucpi;
174 ucpi = ufs_load_cylinder (sb, cgno);
175 if (!ucpi)
177 ucg = ubh_get_ucg (UCPI_UBH(ucpi));
185 if (ubh_isblockset(UCPI_UBH(ucpi), ucpi->c_freeoff, blkno)) {
188 ubh_setblock(UCPI_UBH(ucpi), ucpi->c_freeoff, blkno);
191 ufs_clusteracct (sb, ucpi, blkno, 1);
200 fs16_add(sb, &ubh_cg_blks(ucpi, cylno,
202 fs32_add(sb, &ubh_cg_blktot(ucpi, cylno), 1);
207 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
209 ubh_sync_block(UCPI_UBH(ucpi));
509 struct ufs_cg_private_info * ucpi;
525 ucpi = ufs_load_cylinder (sb, cgno);
526 if (!ucpi)
528 ucg = ubh_get_ucg (UCPI_UBH(ucpi));
538 if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_freeoff, fragno + i))
548 if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_freeoff, fragno + i))
558 ubh_clrbit (UCPI_UBH(ucpi), ucpi->c_freeoff, fragno + i);
565 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
567 ubh_sync_block(UCPI_UBH(ucpi));
588 struct ufs_cg_private_info * ucpi;
631 ucpi = ufs_load_cylinder (sb, cgno);
632 if (!ucpi)
634 ucg = ubh_get_ucg (UCPI_UBH(ucpi));
641 result = ufs_alloccg_block (inode, ucpi, goal, err);
652 result = ufs_alloccg_block (inode, ucpi, goal, err);
657 ubh_setbit (UCPI_UBH(ucpi), ucpi->c_freeoff, goal + i);
668 result = ufs_bitmap_search (sb, ucpi, goal, allocsize);
674 ubh_clrbit (UCPI_UBH(ucpi), ucpi->c_freeoff, result + i);
686 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
688 ubh_sync_block(UCPI_UBH(ucpi));
697 struct ufs_cg_private_info *ucpi,
709 ucg = ubh_get_ucg(UCPI_UBH(ucpi));
712 goal = ucpi->c_rotor;
721 if (ubh_isblockset(UCPI_UBH(ucpi), ucpi->c_freeoff, ufs_fragstoblks(goal))) {
727 result = ufs_bitmap_search (sb, ucpi, goal, uspi->s_fpb);
730 ucpi->c_rotor = result;
735 ubh_clrblock (UCPI_UBH(ucpi), ucpi->c_freeoff, blkno);
737 ufs_clusteracct (sb, ucpi, blkno, -1);
741 fs32_sub(sb, &UFS_SB(sb)->fs_cs(ucpi->c_cgx).cs_nbfree, 1);
746 fs16_sub(sb, &ubh_cg_blks(ucpi, cylno,
748 fs32_sub(sb, &ubh_cg_blktot(ucpi, cylno), 1);
787 * @ucpi: pointer to cylinder group info
792 struct ufs_cg_private_info *ucpi,
810 UFSD("ENTER, cg %u, goal %llu, count %u\n", ucpi->c_cgx,
816 start = ucpi->c_frotor >> 3;
819 loc = ubh_scanc(uspi, UCPI_UBH(ucpi), ucpi->c_freeoff + start, length,
824 loc = ubh_scanc(uspi, UCPI_UBH(ucpi), ucpi->c_freeoff, length,
832 ucpi->c_cgx, start, length, count,
833 ucpi->c_freeoff);
839 ucpi->c_frotor = result;
846 blockmap = ubh_blkmap(UCPI_UBH(ucpi), ucpi->c_freeoff, result);
862 ucpi->c_cgx);
868 struct ufs_cg_private_info * ucpi, unsigned blkno, int cnt)
878 ubh_setbit(UCPI_UBH(ucpi), ucpi->c_clusteroff, blkno);
880 ubh_clrbit(UCPI_UBH(ucpi), ucpi->c_clusteroff, blkno);
887 if ( end >= ucpi->c_nclusterblks)
888 end = ucpi->c_nclusterblks;
889 i = ubh_find_next_zero_bit (UCPI_UBH(ucpi), ucpi->c_clusteroff, end, start);
901 i = ubh_find_last_zero_bit (UCPI_UBH(ucpi), ucpi->c_clusteroff, start, end);
913 fs32_add(sb, (__fs32*)ubh_get_addr(UCPI_UBH(ucpi), ucpi->c_clustersumoff + (i << 2)), cnt);
915 fs32_sub(sb, (__fs32*)ubh_get_addr(UCPI_UBH(ucpi), ucpi->c_clustersumoff + (back << 2)), cnt);
917 fs32_sub(sb, (__fs32*)ubh_get_addr(UCPI_UBH(ucpi), ucpi->c_clustersumoff + (forw << 2)), cnt);