Lines Matching defs:forward
64 static secno alloc_in_bmp(struct super_block *s, secno near, unsigned n, unsigned forward)
84 if (!tstbits(bmp, nr, n + forward)) {
88 /*if (!tstbits(bmp, nr + n, n + forward)) {
93 while ((a = tstbits(bmp, q, n + forward)) != 0) {
112 if (n + forward >= 0x3f && bmp[i] != -1) goto cont;
121 while ((a = tstbits(bmp, q, n + forward)) != 0) {
158 secno hpfs_alloc_sector(struct super_block *s, secno near, unsigned n, int forward, int lock)
166 if (forward < 0) {
167 forward = -forward;
173 if ((sec = alloc_in_bmp(s, near, n, f_p ? forward : forward/4))) goto ret;
178 if ((sec = alloc_in_bmp(s, b<<14, n, f_p ? forward : forward/2))) {
182 if (b > 0x10000000) if ((sec = alloc_in_bmp(s, (b&0xfffffff)<<14, n, f_p ? forward : 0))) goto ret;
184 if (!f_p) if (forward > sbi->sb_max_fwd_alloc) forward = sbi->sb_max_fwd_alloc;
187 if (near_bmp+i < n_bmps && ((sec = alloc_in_bmp(s, (near_bmp+i) << 14, n, forward)))) {
191 if (!forward) {
192 if (near_bmp-i-1 >= 0 && ((sec = alloc_in_bmp(s, (near_bmp-i-1) << 14, n, forward)))) {
197 if (near_bmp+i >= n_bmps && ((sec = alloc_in_bmp(s, (near_bmp+i-n_bmps) << 14, n, forward)))) {
202 if (i == 1 && sbi->sb_c_bitmap != -1 && ((sec = alloc_in_bmp(s, (sbi->sb_c_bitmap) << 14, n, forward)))) {
207 if (forward) {
208 sbi->sb_max_fwd_alloc = forward * 3 / 4;
209 forward /= 2;
216 for (i = 0; i < forward; i++) {
218 hpfs_error(s, "Prealloc doesn't work! Wanted %d, allocated at %08x, can't allocate %d", forward, sec, i);