Lines Matching refs:ucpi
38 struct ufs_cg_private_info *ucpi,
44 ufs_clusteracct(sb, ucpi, fragment, delta);
48 fs32_add(sb, &UFS_SB(sb)->fs_cs(ucpi->c_cgx).cs_nbfree, delta);
53 fs16_add(sb, &ubh_cg_blks(ucpi, cylno,
55 fs32_add(sb, &ubh_cg_blktot(ucpi, cylno), delta);
66 struct ufs_cg_private_info * ucpi;
88 ucpi = ufs_load_cylinder (sb, cgno);
89 if (!ucpi)
91 ucg = ubh_get_ucg (UCPI_UBH(ucpi));
99 blkmap = ubh_blkmap (UCPI_UBH(ucpi), ucpi->c_freeoff, bbase);
102 if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_freeoff, i))
103 ubh_setbit (UCPI_UBH(ucpi), ucpi->c_freeoff, i);
113 blkmap = ubh_blkmap (UCPI_UBH(ucpi), ucpi->c_freeoff, bbase);
119 if (ubh_isblockset(uspi, ucpi, bbase)) {
123 adjust_free_blocks(sb, ucg, ucpi, bbase, 1);
127 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
129 ubh_sync_block(UCPI_UBH(ucpi));
149 struct ufs_cg_private_info * ucpi;
183 ucpi = ufs_load_cylinder (sb, cgno);
184 if (!ucpi)
186 ucg = ubh_get_ucg (UCPI_UBH(ucpi));
193 if (ubh_isblockset(uspi, ucpi, i)) {
196 ubh_setblock(uspi, ucpi, i);
198 adjust_free_blocks(sb, ucg, ucpi, i, 1);
202 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
204 ubh_sync_block(UCPI_UBH(ucpi));
502 struct ufs_cg_private_info * ucpi;
518 ucpi = ufs_load_cylinder (sb, cgno);
519 if (!ucpi)
521 ucg = ubh_get_ucg (UCPI_UBH(ucpi));
531 if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_freeoff, fragno + i))
541 if (ubh_isclr (UCPI_UBH(ucpi), ucpi->c_freeoff, fragno + i))
551 ubh_clrbit (UCPI_UBH(ucpi), ucpi->c_freeoff, fragno + i);
558 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
560 ubh_sync_block(UCPI_UBH(ucpi));
581 struct ufs_cg_private_info * ucpi;
624 ucpi = ufs_load_cylinder (sb, cgno);
625 if (!ucpi)
627 ucg = ubh_get_ucg (UCPI_UBH(ucpi));
634 result = ufs_alloccg_block (inode, ucpi, goal, err);
645 result = ufs_alloccg_block (inode, ucpi, goal, err);
650 ubh_setbit (UCPI_UBH(ucpi), ucpi->c_freeoff, goal + i);
661 result = ufs_bitmap_search (sb, ucpi, goal, allocsize);
667 ubh_clrbit (UCPI_UBH(ucpi), ucpi->c_freeoff, result + i);
679 ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
681 ubh_sync_block(UCPI_UBH(ucpi));
690 struct ufs_cg_private_info *ucpi,
702 ucg = ubh_get_ucg(UCPI_UBH(ucpi));
705 goal = ucpi->c_rotor;
714 if (ubh_isblockset(uspi, ucpi, goal)) {
720 result = ufs_bitmap_search (sb, ucpi, goal, uspi->s_fpb);
723 ucpi->c_rotor = result;
727 ubh_clrblock(uspi, ucpi, result);
728 adjust_free_blocks(sb, ucg, ucpi, result, -1);
766 * @ucpi: pointer to cylinder group info
771 struct ufs_cg_private_info *ucpi,
789 UFSD("ENTER, cg %u, goal %llu, count %u\n", ucpi->c_cgx,
795 start = ucpi->c_frotor >> 3;
798 loc = ubh_scanc(uspi, UCPI_UBH(ucpi), ucpi->c_freeoff + start, length,
803 loc = ubh_scanc(uspi, UCPI_UBH(ucpi), ucpi->c_freeoff, length,
811 ucpi->c_cgx, start, length, count,
812 ucpi->c_freeoff);
818 ucpi->c_frotor = result;
825 blockmap = ubh_blkmap(UCPI_UBH(ucpi), ucpi->c_freeoff, result);
841 ucpi->c_cgx);
847 struct ufs_cg_private_info * ucpi, unsigned frag, int cnt)
857 ubh_setbit(UCPI_UBH(ucpi), ucpi->c_clusteroff, blkno);
859 ubh_clrbit(UCPI_UBH(ucpi), ucpi->c_clusteroff, blkno);
866 if ( end >= ucpi->c_nclusterblks)
867 end = ucpi->c_nclusterblks;
868 i = ubh_find_next_zero_bit (UCPI_UBH(ucpi), ucpi->c_clusteroff, end, start);
880 i = ubh_find_last_zero_bit (UCPI_UBH(ucpi), ucpi->c_clusteroff, start, end);
892 fs32_add(sb, (__fs32*)ubh_get_addr(UCPI_UBH(ucpi), ucpi->c_clustersumoff + (i << 2)), cnt);
894 fs32_sub(sb, (__fs32*)ubh_get_addr(UCPI_UBH(ucpi), ucpi->c_clustersumoff + (back << 2)), cnt);
896 fs32_sub(sb, (__fs32*)ubh_get_addr(UCPI_UBH(ucpi), ucpi->c_clustersumoff + (forw << 2)), cnt);