Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=98f... Commit: 98f3a54ca8b1bf4536fb3caac62e5e15cfda2675 Parent: be158e9bd1c3c99475ff4f213c19b1732ab0f14d Author: Bob Peterson rpeterso@redhat.com AuthorDate: Fri Jan 21 08:13:08 2011 -0600 Committer: Bob Peterson rpeterso@redhat.com CommitterDate: Tue Feb 8 15:04:04 2011 -0600
fsck.gfs2 stuck in pass1 on i686
This patch fixes a problem specific to 32-bit architectures. The shift point calculation for determining where to start looking for a desired value in the bitmap was wrong because it was using sizeof(unsigned long) rather than sizeof(unsigned long long). That caused the bitfit function to start in the wrong place, which in some circumstances caused the same block to be returned repeatedly which resulted in infinite loops in fsck.gfs2.
rhbz#675911 --- gfs2/libgfs2/fs_bits.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gfs2/libgfs2/fs_bits.c b/gfs2/libgfs2/fs_bits.c index ee9dfa7..69b16e9 100644 --- a/gfs2/libgfs2/fs_bits.c +++ b/gfs2/libgfs2/fs_bits.c @@ -77,7 +77,7 @@ static inline uint64_t gfs2_bit_search(const unsigned long long *ptr, unsigned long gfs2_bitfit(const unsigned char *buf, const unsigned int len, unsigned long goal, unsigned char state) { - unsigned long spoint = (goal << 1) & ((8 * sizeof(unsigned long)) - 1); + unsigned long spoint = (goal << 1) & ((8 * sizeof(unsigned long long)) - 1); const unsigned long long *ptr = ((unsigned long long *)buf) + (goal >> 5); const unsigned long long *end = (unsigned long long *) (buf + ALIGN(len, sizeof(unsigned long long)));
cluster-commits@lists.fedorahosted.org