Revert "gfs2: Ignore journal log writes for jdata holes"
authorBob Peterson <rpeterso@redhat.com>
Wed, 11 Nov 2020 17:09:55 +0000 (11:09 -0600)
committerAndreas Gruenbacher <agruenba@redhat.com>
Thu, 12 Nov 2020 17:41:57 +0000 (18:41 +0100)
commitd3039c0615c3f80eaf735e581ed11242c0064299
treeaf0aaa589f0456b1cdb62d19286aee003e0c5881
parentbc923818b190c8b63c91a47702969c8053574f5b
Revert "gfs2: Ignore journal log writes for jdata holes"

This reverts commit b2a846dbef4ef54ef032f0f5ee188c609a0278a7.

That commit changed the behavior of function gfs2_block_map to return
-ENODATA in cases where a hole (IOMAP_HOLE) is encountered and create is
false.  While that fixed the intended problem for jdata, it also broke
other callers of gfs2_block_map such as some jdata block reads.  Before
the patch, an encountered hole would be skipped and the buffer seen as
unmapped by the caller.  The patch changed the behavior to return
-ENODATA, which is interpreted as an error by the caller.

The -ENODATA return code should be restricted to the specific case where
jdata holes are encountered during ail1 writes.  That will be done in a
later patch.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/bmap.c