Lines Matching defs:forward
115 static secno alloc_in_bmp(struct super_block *s, secno near, unsigned n, unsigned forward)
134 if (!tstbits(bmp, nr, n + forward)) {
139 while ((a = tstbits(bmp, q, n + forward)) != 0) {
158 if (n + forward >= 0x3f && le32_to_cpu(bmp[i]) != 0xffffffff) goto cont;
167 while ((a = tstbits(bmp, q, n + forward)) != 0) {
203 secno hpfs_alloc_sector(struct super_block *s, secno near, unsigned n, int forward)
211 if (forward < 0) {
212 forward = -forward;
217 if ((sec = alloc_in_bmp(s, near, n, f_p ? forward : forward/4))) goto ret;
222 if ((sec = alloc_in_bmp(s, b<<14, n, f_p ? forward : forward/2))) {
226 if (b > 0x10000000) if ((sec = alloc_in_bmp(s, (b&0xfffffff)<<14, n, f_p ? forward : 0))) goto ret;
228 if (!f_p) if (forward > sbi->sb_max_fwd_alloc) forward = sbi->sb_max_fwd_alloc;
231 if (near_bmp+i < n_bmps && ((sec = alloc_in_bmp(s, (near_bmp+i) << 14, n, forward)))) {
235 if (!forward) {
236 if (near_bmp-i-1 >= 0 && ((sec = alloc_in_bmp(s, (near_bmp-i-1) << 14, n, forward)))) {
241 if (near_bmp+i >= n_bmps && ((sec = alloc_in_bmp(s, (near_bmp+i-n_bmps) << 14, n, forward)))) {
246 if (i == 1 && sbi->sb_c_bitmap != -1 && ((sec = alloc_in_bmp(s, (sbi->sb_c_bitmap) << 14, n, forward)))) {
251 if (forward) {
252 sbi->sb_max_fwd_alloc = forward * 3 / 4;
253 forward /= 2;
266 for (i = 0; i < forward; i++) {
268 hpfs_error(s, "Prealloc doesn't work! Wanted %d, allocated at %08x, can't allocate %d", forward, sec, i);