aboutsummaryrefslogtreecommitdiff
path: root/kernel/configs
diff options
context:
space:
mode:
authorAndreas Gruenbacher2019-04-29 20:50:30 +0100
committerAndreas Gruenbacher2019-05-07 23:39:15 +0200
commitd0a22a4b03b8475b7aa3fa41243c26c291407844 (patch)
treeaf68f7f35e0a354aa370d130e9e79b757783b36d /kernel/configs
parent8f91821990fd6f170a5dca79697a441181a41b16 (diff)
gfs2: Fix iomap write page reclaim deadlock
Since commit 64bc06bb32ee ("gfs2: iomap buffered write support"), gfs2 is doing buffered writes by starting a transaction in iomap_begin, writing a range of pages, and ending that transaction in iomap_end. This approach suffers from two problems: (1) Any allocations necessary for the write are done in iomap_begin, so when the data aren't journaled, there is no need for keeping the transaction open until iomap_end. (2) Transactions keep the gfs2 log flush lock held. When iomap_file_buffered_write calls balance_dirty_pages, this can end up calling gfs2_write_inode, which will try to flush the log. This requires taking the log flush lock which is already held, resulting in a deadlock. Fix both of these issues by not keeping transactions open from iomap_begin to iomap_end. Instead, start a small transaction in page_prepare and end it in page_done when necessary. Reported-by: Edwin Török <edvin.torok@citrix.com> Fixes: 64bc06bb32ee ("gfs2: iomap buffered write support") Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'kernel/configs')
0 files changed, 0 insertions, 0 deletions