• Andreas Gruenbacher's avatar
    gfs2: Further iomap cleanups · d505a96a
    Andreas Gruenbacher authored
    In gfs2_iomap_alloc, set the type of newly allocated extents to
    IOMAP_MAPPED so that iomap_to_bh will set the bh states correctly:
    otherwise, the bhs would not be marked as mapped, confusing
    __mpage_writepage.  This means that we need to check for the IOMAP_F_NEW
    flag in fallocate_chunk now.
    
    Further clean up gfs2_iomap_get and implement gfs2_stuffed_iomap here
    directly.  For reads beyond the end of the file, return holes instead of
    failing with -ENOENT so that we can get rid of that special case in
    gfs2_block_map.
    Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
    Reviewed-by: default avatarBob Peterson <rpeterso@redhat.com>
    d505a96a
file.c 29.4 KB