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));
513 struct ufs_cg_private_info * ucpi;
529 ucpi = ufs_load_cylinder (sb, cgno);
530 if (!ucpi)
532 ucg = ubh_get_ucg (UCPI_UBH(ucpi));
542 if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_freeoff, fragno + i))
552 if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_freeoff, fragno + i))
562 ubh_clrbit (UCPI_UBH(ucpi), ucpi->c_freeoff, fragno + i);
569 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
571 ubh_sync_block(UCPI_UBH(ucpi));
592 struct ufs_cg_private_info * ucpi;
635 ucpi = ufs_load_cylinder (sb, cgno);
636 if (!ucpi)
638 ucg = ubh_get_ucg (UCPI_UBH(ucpi));
645 result = ufs_alloccg_block (inode, ucpi, goal, err);
656 result = ufs_alloccg_block (inode, ucpi, goal, err);
661 ubh_setbit (UCPI_UBH(ucpi), ucpi->c_freeoff, goal + i);
672 result = ufs_bitmap_search (sb, ucpi, goal, allocsize);
678 ubh_clrbit (UCPI_UBH(ucpi), ucpi->c_freeoff, result + i);
690 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
692 ubh_sync_block(UCPI_UBH(ucpi));
701 struct ufs_cg_private_info *ucpi,
713 ucg = ubh_get_ucg(UCPI_UBH(ucpi));
716 goal = ucpi->c_rotor;
725 if (ubh_isblockset(UCPI_UBH(ucpi), ucpi->c_freeoff, ufs_fragstoblks(goal))) {
731 result = ufs_bitmap_search (sb, ucpi, goal, uspi->s_fpb);
734 ucpi->c_rotor = result;
739 ubh_clrblock (UCPI_UBH(ucpi), ucpi->c_freeoff, blkno);
741 ufs_clusteracct (sb, ucpi, blkno, -1);
745 fs32_sub(sb, &UFS_SB(sb)->fs_cs(ucpi->c_cgx).cs_nbfree, 1);
750 fs16_sub(sb, &ubh_cg_blks(ucpi, cylno,
752 fs32_sub(sb, &ubh_cg_blktot(ucpi, cylno), 1);
791 * @ucpi: pointer to cylinder group info
796 struct ufs_cg_private_info *ucpi,
814 UFSD("ENTER, cg %u, goal %llu, count %u\n", ucpi->c_cgx,
820 start = ucpi->c_frotor >> 3;
823 loc = ubh_scanc(uspi, UCPI_UBH(ucpi), ucpi->c_freeoff + start, length,
828 loc = ubh_scanc(uspi, UCPI_UBH(ucpi), ucpi->c_freeoff, length,
836 ucpi->c_cgx, start, length, count,
837 ucpi->c_freeoff);
843 ucpi->c_frotor = result;
850 blockmap = ubh_blkmap(UCPI_UBH(ucpi), ucpi->c_freeoff, result);
866 ucpi->c_cgx);
872 struct ufs_cg_private_info * ucpi, unsigned blkno, int cnt)
882 ubh_setbit(UCPI_UBH(ucpi), ucpi->c_clusteroff, blkno);
884 ubh_clrbit(UCPI_UBH(ucpi), ucpi->c_clusteroff, blkno);
891 if ( end >= ucpi->c_nclusterblks)
892 end = ucpi->c_nclusterblks;
893 i = ubh_find_next_zero_bit (UCPI_UBH(ucpi), ucpi->c_clusteroff, end, start);
905 i = ubh_find_last_zero_bit (UCPI_UBH(ucpi), ucpi->c_clusteroff, start, end);
917 fs32_add(sb, (__fs32*)ubh_get_addr(UCPI_UBH(ucpi), ucpi->c_clustersumoff + (i << 2)), cnt);
919 fs32_sub(sb, (__fs32*)ubh_get_addr(UCPI_UBH(ucpi), ucpi->c_clustersumoff + (back << 2)), cnt);
921 fs32_sub(sb, (__fs32*)ubh_get_addr(UCPI_UBH(ucpi), ucpi->c_clustersumoff + (forw << 2)), cnt);