]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: Improve non-recursive delete algorithm
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 4 Dec 2017 15:06:17 +0000 (16:06 +0100)
committerBob Peterson <rpeterso@redhat.com>
Wed, 17 Jan 2018 13:35:52 +0000 (06:35 -0700)
commitc13c60b8b7b301897587a1f3fa3c927a4a0aea9e
tree8fcec6fb485a7e67af23b7f290ebc3192ed4c777
parentff7a8a230576cf0e576f370777217798ddbe44d7
gfs2: Improve non-recursive delete algorithm

In rare cases, the current non-recursive delete algorithm doesn't
deallocate empty intermediary indirect blocks.  This should have very
little practical effect, but deallocating all blocks correctly should
still be preferable as it is cleaner and easier to validate.

The fix consists of using the first block to deallocate to compute the
start marker of the truncate point instead of the last block that needs
to be kept.  With that change, computing which indirect blocks are still
needed becomes relatively easy.

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