]> Pileus Git - ~andy/linux/blobdiff - fs/hpfs/super.c
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[~andy/linux] / fs / hpfs / super.c
index 962e90c37aec64ec95773467f146951995c9adc1..4334cda8dba144eeb36e57f3d3457b90b14ad15b 100644 (file)
@@ -121,7 +121,7 @@ unsigned hpfs_count_one_bitmap(struct super_block *s, secno secno)
        unsigned long *bits;
        unsigned count;
 
-       bits = hpfs_map_4sectors(s, secno, &qbh, 4);
+       bits = hpfs_map_4sectors(s, secno, &qbh, 0);
        if (!bits)
                return 0;
        count = bitmap_weight(bits, 2048 * BITS_PER_BYTE);
@@ -134,8 +134,13 @@ static unsigned count_bitmaps(struct super_block *s)
        unsigned n, count, n_bands;
        n_bands = (hpfs_sb(s)->sb_fs_size + 0x3fff) >> 14;
        count = 0;
-       for (n = 0; n < n_bands; n++)
+       for (n = 0; n < COUNT_RD_AHEAD; n++) {
+               hpfs_prefetch_bitmap(s, n);
+       }
+       for (n = 0; n < n_bands; n++) {
+               hpfs_prefetch_bitmap(s, n + COUNT_RD_AHEAD);
                count += hpfs_count_one_bitmap(s, le32_to_cpu(hpfs_sb(s)->sb_bmp_dir[n]));
+       }
        return count;
 }