]> git.baikalelectronics.ru Git - 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)
commit6d268a8e1e586365113c697b5481ce65c99731ca
treef9afd95be5ff9cfeb41050b078cb0bc78aec425d
parentf1cf2a501b10efabca20cc7c035cb248d875fb03
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