]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
GFS2: don't overrun reserved revokes
authorBenjamin Marzinski <bmarzins@redhat.com>
Fri, 26 Jul 2013 22:09:33 +0000 (17:09 -0500)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 19 Aug 2013 08:33:16 +0000 (09:33 +0100)
commit1bc333f4cf601f77ba0f5046ff226fe654e83bee
treef9afd95be5ff9cfeb41050b078cb0bc78aec425d
parentd08fa65a81625765ff4733b4a6556b7156954073
GFS2: don't overrun reserved revokes

When run during fsync, a gfs2_log_flush could happen between the
time when gfs2_ail_flush checked the number of blocks to revoke,
and when it actually started the transaction to do those revokes.
This occassionally caused it to need more revokes than it reserved,
causing gfs2 to crash.

Instead of just reserving enough revokes to handle the blocks that
currently need them, this patch makes gfs2_ail_flush reserve the
maximum number of revokes it can, without increasing the total number
of reserved log blocks. This patch also passes the number of reserved
revokes to __gfs2_ail_flush() so that it doesn't go over its limit
and cause a crash like we're seeing. Non-fsync calls to __gfs2_ail_flush
will still cause a BUG() necessary revokes are skipped.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/glops.c