• Jens Axboe's avatar
    [PATCH] bio_get_nr_vecs · 63b9d36d
    Jens Axboe authored
    Add bio_get_nr_vecs(). It returns an approximate number of pages that
    can be added to a block device. It's just a ballpark number, but I think
    this is quite fine for the type of thing it is needed for: mpage etc
    need to know an approx size of a bio that they need to allocate. It
    would be silly to continously allocate 64-page sized bio_vec entries, if
    the target cannot do more than 8, for example.
    63b9d36d
bio.c 15.2 KB