[Cluster-devel] [GFS2 PATCH 0/5] Refactor gfs2_evict_inode

Andreas Gruenbacher agruenba at redhat.com
Tue Sep 15 19:08:04 UTC 2020


Bob,

On Tue, Sep 15, 2020 at 4:38 PM Bob Peterson <rpeterso at redhat.com> wrote:
> Function gfs2_evict_inode is very large and messy. This patch set is an
> attempt to simplify the function and make it more understandable. This
> will make it easier to maintain. I did this mainly because we need to fix
> it so it can call truncate_inode_pages on the inode glock's address space.

that refactoring looks good in principle; I'll follow up on the
individual patches with some more comments.

The glock's address space lifetime doesn't end with the life of the
associated inode though, so we should probably only call
truncate_inode_pages_final on the glock's address space when the glock
dies. (At that point, nrpages should be zero already, but
nrexceptional might still be nonzero.)

> Bob Peterson (5):
>   gfs2: switch variable error to ret in gfs2_evict_inode
>   gfs2: factor delete_evicted_inode out of gfs2_evict_inode
>   gfs2: further simplify gfs2_evict_inode with new func
>     may_delete_evicted
>   gfs2: factor out evict code related to dinodes we are not deleting
>   gfs2: simplify the logic in gfs2_evict_inode
>
>  fs/gfs2/super.c | 214 ++++++++++++++++++++++++++++++------------------
>  1 file changed, 136 insertions(+), 78 deletions(-)
>
> --
> 2.26.2
>

Thanks,
Andreas




More information about the Cluster-devel mailing list