Lines Matching full:sbi
32 struct ufs_sb_info * sbi = UFS_SB(sb); in ufs_read_cylinder() local
39 uspi = sbi->s_uspi; in ufs_read_cylinder()
40 ucpi = sbi->s_ucpi[bitmap_nr]; in ufs_read_cylinder()
41 ucg = (struct ufs_cylinder_group *)sbi->s_ucg[cgno]->b_data; in ufs_read_cylinder()
48 UCPI_UBH(ucpi)->bh[0] = sbi->s_ucg[cgno]; in ufs_read_cylinder()
52 sbi->s_cgno[bitmap_nr] = cgno; in ufs_read_cylinder()
74 brelse (sbi->s_ucg[j]); in ufs_read_cylinder()
75 sbi->s_cgno[bitmap_nr] = UFS_CGNO_EMPTY; in ufs_read_cylinder()
85 struct ufs_sb_info * sbi = UFS_SB(sb); in ufs_put_cylinder() local
93 uspi = sbi->s_uspi; in ufs_put_cylinder()
94 if (sbi->s_cgno[bitmap_nr] == UFS_CGNO_EMPTY) { in ufs_put_cylinder()
98 ucpi = sbi->s_ucpi[bitmap_nr]; in ufs_put_cylinder()
101 if (uspi->s_ncg > UFS_MAX_GROUP_LOADED && bitmap_nr >= sbi->s_cg_loaded) { in ufs_put_cylinder()
117 sbi->s_cgno[bitmap_nr] = UFS_CGNO_EMPTY; in ufs_put_cylinder()
130 struct ufs_sb_info * sbi = UFS_SB(sb); in ufs_load_cylinder() local
137 uspi = sbi->s_uspi; in ufs_load_cylinder()
145 if (sbi->s_cgno[0] == cgno) { in ufs_load_cylinder()
147 return sbi->s_ucpi[0]; in ufs_load_cylinder()
153 if (sbi->s_cgno[cgno] != UFS_CGNO_EMPTY) { in ufs_load_cylinder()
154 if (sbi->s_cgno[cgno] != cgno) { in ufs_load_cylinder()
161 return sbi->s_ucpi[cgno]; in ufs_load_cylinder()
166 return sbi->s_ucpi[cgno]; in ufs_load_cylinder()
173 for (i = 0; i < sbi->s_cg_loaded && sbi->s_cgno[i] != cgno; i++); in ufs_load_cylinder()
174 if (i < sbi->s_cg_loaded && sbi->s_cgno[i] == cgno) { in ufs_load_cylinder()
175 cg = sbi->s_cgno[i]; in ufs_load_cylinder()
176 ucpi = sbi->s_ucpi[i]; in ufs_load_cylinder()
178 sbi->s_cgno[j] = sbi->s_cgno[j-1]; in ufs_load_cylinder()
179 sbi->s_ucpi[j] = sbi->s_ucpi[j-1]; in ufs_load_cylinder()
181 sbi->s_cgno[0] = cg; in ufs_load_cylinder()
182 sbi->s_ucpi[0] = ucpi; in ufs_load_cylinder()
188 if (sbi->s_cg_loaded < UFS_MAX_GROUP_LOADED) in ufs_load_cylinder()
189 sbi->s_cg_loaded++; in ufs_load_cylinder()
192 ucpi = sbi->s_ucpi[sbi->s_cg_loaded - 1]; in ufs_load_cylinder()
193 for (j = sbi->s_cg_loaded - 1; j > 0; j--) { in ufs_load_cylinder()
194 sbi->s_cgno[j] = sbi->s_cgno[j-1]; in ufs_load_cylinder()
195 sbi->s_ucpi[j] = sbi->s_ucpi[j-1]; in ufs_load_cylinder()
197 sbi->s_ucpi[0] = ucpi; in ufs_load_cylinder()
201 return sbi->s_ucpi[0]; in ufs_load_cylinder()