• Andreas Gruenbacher's avatar
    gfs2: More gfs2_find_jhead fixes · aa83da7f
    Andreas Gruenbacher authored
    It turns out that when extending an existing bio, gfs2_find_jhead fails to
    check if the block number is consecutive, which leads to incorrect reads for
    fragmented journals.
    
    In addition, limit the maximum bio size to an arbitrary value of 2 megabytes:
    since commit 07173c3e ("block: enable multipage bvecs"), if we just keep
    adding pages until bio_add_page fails, bios will grow much larger than useful,
    which pins more memory than necessary with barely any additional performance
    gains.
    
    Fixes: f4686c26 ("gfs2: read journal in large chunks")
    Cc: stable@vger.kernel.org # v5.2+
    Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
    Signed-off-by: default avatarBob Peterson <rpeterso@redhat.com>
    aa83da7f
lops.c 28 KB