Seen in RH 2.6.32, please consider for longterm 2.6.32 inclusion. Applies fine to latest Debian 2.6.32.
RH bug desc: "This is a very small fix to an important bmap issue. It has been tested with the reproducer and it fixes the problem (what appeared as a failed msync() but was traced back to an incorrect bmap call. Changing the termination condition on the loop fixes the bug (bz #564329). The patch is in the GFS2 git tree and has been sent to Linus for inclusion upstream," Thank you. ----- Forwarded message from Linux Kernel Mailing List <[email protected]> ----- Date: Fri, 12 Feb 2010 16:59:03 GMT From: Linux Kernel Mailing List <[email protected]> To: [email protected] Subject: GFS2: Fix bmap allocation corner-case bug Gitweb: http://git.kernel.org/linus/07ccb7bf2c928fef4fea2cda69ba2e23479578db Commit: 07ccb7bf2c928fef4fea2cda69ba2e23479578db Parent: 0e5a9fb0426108d750c97c25b1ab04d3768b5aff Author: Steven Whitehouse <[email protected]> AuthorDate: Fri Feb 12 10:10:55 2010 +0000 Committer: Steven Whitehouse <[email protected]> CommitDate: Fri Feb 12 10:16:14 2010 +0000 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 <[email protected]> --- fs/gfs2/bmap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 6d47379..583e823 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -541,7 +541,7 @@ static int gfs2_bmap_alloc(struct inode *inode, const sector_t lblock, *ptr++ = cpu_to_be64(bn++); break; } - } while (state != ALLOC_DATA); + } while ((state != ALLOC_DATA) || !dblock); ip->i_height = height; gfs2_add_inode_blocks(&ip->i_inode, alloced); -- To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html ----- End forwarded message ----- -- maks _______________________________________________ stable mailing list [email protected] http://linux.kernel.org/mailman/listinfo/stable
