gfs2: new slab for transactions
authorBob Peterson <rpeterso@redhat.com>
Wed, 17 Apr 2019 18:04:27 +0000 (12:04 -0600)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 5 Jun 2020 19:24:25 +0000 (21:24 +0200)
commitb839dadae8721eaf7245fcef3d67d82b95d00c77
treedb9eea99ecc90574e519e6555bc1b4937ebe7ba1
parentcbcc89b630447ec7836aa2b9242d9bb1725f5a61
gfs2: new slab for transactions

This patch adds a new slab for gfs2 transactions. That allows us to
reduce kernel memory fragmentation, have better organization of data
for analysis of vmcore dumps. A new centralized function is added to
free the slab objects, and it exposes use-after-free by giving
warnings if a transaction is freed while it still has bd elements
attached to its buffers or ail lists. We make sure to initialize
those transaction ail lists so we can check their integrity when freeing.

At a later time, we should add a slab initialization function to
make it more efficient, but for this initial patch I wanted to
minimize the impact.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/log.c
fs/gfs2/main.c
fs/gfs2/trans.c
fs/gfs2/trans.h
fs/gfs2/util.c
fs/gfs2/util.h