Bob Peterson 1330edbeaf GFS2: Drop inadequate rgrps from the reservation tree
This is just basically a resend of a patch I posted earlier.
It didn't change from its original, except in diff offsets, etc:

This patch fixes a bug in the GFS2 block allocation code. The problem
starts if a process already has a multi-block reservation, but for
some reason, another process disqualifies it from further allocations.
For example, the other process might set on the GFS2_RDF_ERROR bit.
The process holding the reservation jumps to label skip_rgrp, but
that label comes after the code that removes the reservation from the
tree. Therefore, the no longer usable reservation is not removed from
the rgrp's reservations tree; it's lost. Eventually, the lost reservation
causes the count of reserved blocks to get off, and eventually that
causes a BUG_ON(rs->rs_rbm.rgd->rd_reserved < rs->rs_free) to trigger.
This patch moves the call to after label skip_rgrp so that the
disqualified reservation is properly removed from the tree, thus keeping
the rgrp rd_reserved count sane.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2014-01-03 09:57:31 +00:00
..
2011-07-25 14:30:23 -04:00
2013-09-05 16:23:51 -04:00
2013-06-29 12:57:05 +04:00
2013-10-15 15:18:08 +01:00
2011-10-21 12:39:41 +01:00
2013-11-04 11:17:49 +00:00
2013-06-14 11:17:15 +01:00
2013-06-03 14:20:18 -07:00
2013-11-15 22:04:16 -05:00
2013-08-19 17:26:32 +01:00
2013-06-05 09:50:40 +01:00
2013-11-04 11:17:49 +00:00
2011-05-10 13:12:49 +01:00
2013-08-19 17:26:32 +01:00
2013-11-15 22:04:16 -05:00
2013-11-04 11:17:49 +00:00
2013-09-27 12:49:33 +01:00
2013-01-29 10:29:05 +00:00
2013-10-04 09:49:29 +01:00
2012-01-11 09:23:05 +00:00
2013-06-19 21:29:19 +01:00