]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gfs2: Don't reject a supposedly full bitmap if we have blocks reserved
authorBob Peterson <rpeterso@redhat.com>
Mon, 18 Jun 2018 18:24:13 +0000 (13:24 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:38:01 +0000 (08:38 +0200)
commitd074912d2edeae8eb08d3f85a3f0dab0b3606089
treea9d0b59a575df131652d8b1fadc31eed6a3716a2
parentb435dd667b9a225513165d78b7ec142635a060be
gfs2: Don't reject a supposedly full bitmap if we have blocks reserved

[ Upstream commit e79e0e1428188b24c3b57309ffa54a33c4ae40c4 ]

Before this patch, you could get into situations like this:

1. Process 1 searches for X free blocks, finds them, makes a reservation
2. Process 2 searches for free blocks in the same rgrp, but now the
   bitmap is full because process 1's reservation is skipped over.
   So it marks the bitmap as GBF_FULL.
3. Process 1 tries to allocate blocks from its own reservation, but
   since the GBF_FULL bit is set, it skips over the rgrp and searches
   elsewhere, thus not using its own reservation.

This patch adds an additional check to allow processes to use their
own reservations.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/gfs2/rgrp.c