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