]> git.baikalelectronics.ru Git - kernel.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)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 24 Jul 2018 18:02:11 +0000 (20:02 +0200)
commit9b92131de6a031eaadb149d1e22ebeff1013c638
treef65d0f449bf48ff28f84292dd7191c3326b300ba
parent1412ae3aa96c7f5a88c8230ff0632933bb945616
gfs2: Don't reject a supposedly full bitmap if we have blocks reserved

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>
fs/gfs2/rgrp.c