]> git.baikalelectronics.ru Git - kernel.git/commit
GFS2: Fix bmap allocation corner-case bug
authorSteven Whitehouse <swhiteho@redhat.com>
Fri, 12 Feb 2010 10:10:55 +0000 (10:10 +0000)
committerSteven Whitehouse <swhiteho@redhat.com>
Fri, 12 Feb 2010 10:16:14 +0000 (10:16 +0000)
commit4e039bafb1415f3845fb47a785453c0f76ba11ed
tree6aee126126d3a1245b5b9f79abe2101098392187
parent8365b7f1092a5aa0f38df1e9fcba3d3b984b2c23
GFS2: Fix bmap allocation corner-case bug

This patch solves a corner case during allocation which occurs if both
metadata (indirect) and data blocks are required but there is an
obstacle in the filesystem (e.g. a resource group header or another
allocated block) such that when the allocation is requested only
enough blocks for the metadata are returned.

By changing the exit condition of this loop, we ensure that a
minimum of one data block will always be returned.

Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/bmap.c