]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Fix iomap buffered write support for journaled files (2)
authorAndreas Gruenbacher <agruenba@redhat.com>
Wed, 10 Oct 2018 20:18:18 +0000 (21:18 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 12 Oct 2018 15:14:42 +0000 (17:14 +0200)
commit8f2f08a66c2238aea3b40c76513793f6f88fa153
treeef93c3fcfb79344406aa6e6aaba50da1cce979b1
parent1ec1f3904e8ab0edd1d6a557231a99ed1cdbe0c4
gfs2: Fix iomap buffered write support for journaled files (2)

It turns out that the fix in commit 6636c3cc56 is bad; the assertion
that the iomap code no longer creates buffer heads is incorrect for
filesystems that set the IOMAP_F_BUFFER_HEAD flag.

Instead, what's happening is that gfs2_iomap_begin_write treats all
files that have the jdata flag set as journaled files, which is
incorrect as long as those files are inline ("stuffed").  We're handling
stuffed files directly via the page cache, which is why we ended up with
pages without buffer heads in gfs2_page_add_databufs.

Fix this by handling stuffed journaled files correctly in
gfs2_iomap_begin_write.

This reverts commit 6636c3cc5690c11631e6366cf9a28fb99c8b25bb.

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