OSDN Git Service

gfs2: Generalize truncate code
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 11 Dec 2017 11:49:55 +0000 (12:49 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Thu, 18 Jan 2018 20:15:37 +0000 (21:15 +0100)
commit5cf26b1e88c9eef76a1e8bdedbad48db925bbdd5
tree29e9d9ba8e64035cdfa04b4c6ceaa7e957a51ec5
parentbdba0d5ec13ed48420a4f85a69317c963c0de67e
gfs2: Generalize truncate code

Pull the code for computing the range of metapointers to iterate out of
gfs2_metapath_ra (for readahead), sweep_bh_for_rgrps (for deallocating
metapointers within a block), and trunc_dealloc (for walking the
metadata tree).

In sweep_bh_for_rgrps, move the code for looking up the resource group
descriptor of the current resource group out of the inner loop.  The
metatype check moves to trunc_dealloc.

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