]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
gfs2: Fix metadata read-ahead during truncate
authorAndreas Gruenbacher <agruenba@redhat.com>
Fri, 8 Dec 2017 20:11:39 +0000 (21:11 +0100)
committerBob Peterson <rpeterso@redhat.com>
Wed, 17 Jan 2018 13:35:50 +0000 (06:35 -0700)
commitc3ce5aa9b02dd912e381237e7f98d591d7358cdc
tree97db1b1f8a04435798d5c369ed2271d8921c7943
parente8b43fe0c1e035a135be7ca3791d465fcb1b501e
gfs2: Fix metadata read-ahead during truncate

The metadata read-ahead algorithm broke when switching from recursive to
non-recursive delete: the current algorithm reads ahead blocks at height
N - 1 while deallocating the blocks at hight N.  However, deallocating
the blocks at height N requires a complete walk of the metadata tree,
not only down to height N - 1.  Consequently, all blocks below height
N - 1 will be accessed without read-ahead.

Fix this by issuing read-aheads as early as possible, after each
metapath lookup.

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