• Christoph Hellwig's avatar
    f2fs: don't rely on F2FS_MAP_* in f2fs_iomap_begin · 8d3c1fa3
    Christoph Hellwig authored
    When testing with a mixed zoned / convention device combination, there
    are regular but not 100% reproducible failures in xfstests generic/113
    where the __is_valid_data_blkaddr assert hits due to finding a hole.
    
    This seems to be because f2fs_map_blocks can set this flag on a hole
    when it was found in the extent cache.
    
    Rework f2fs_iomap_begin to just check the special block numbers directly.
    This has the added benefits of the WARN_ON showing which invalid block
    address we found, and being properly error out on delalloc blocks that
    are confusingly called unwritten but not actually suitable for direct
    I/O.
    
    Fixes: 1517c1a7 ("f2fs: implement iomap operations")
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarChao Yu <chao@kernel.org>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    8d3c1fa3
data.c 102 KB