Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=3a…
Commit: 3a16ab778ddaa51d52994b615cab1522b938e5af
Parent: 043c603d46ab401e69cb8e09a3a818e2006134c5
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Tue Jul 27 20:18:18 2010 -0500
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Tue Jul 27 20:30:29 2010 -0500
GFS2: libgfs2 bitfit algorithm using wrong shift point
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#608154
---
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 380dd81..c2934a6 100644
--- a/gfs2/libgfs2/fs_bits.c
+++ b/gfs2/libgfs2/fs_bits.c
@@ -64,7 +64,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)));
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=12…
Commit: 12e94f9677164031b53012a9157288a177ef30b7
Parent: b45a6cf730bd9e4be9c8570e8cbaf670ad59172c
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Tue Jul 27 20:18:18 2010 -0500
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Tue Jul 27 20:25:48 2010 -0500
GFS2: libgfs2 bitfit algorithm using wrong shift point
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#608154
---
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 380dd81..c2934a6 100644
--- a/gfs2/libgfs2/fs_bits.c
+++ b/gfs2/libgfs2/fs_bits.c
@@ -64,7 +64,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)));
Gitweb: http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdif…
Commit: 89d49877de559e99505098a742b846e27184f04c
Parent: 3fce665dffac8537f520e33674020988ae011fcf
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Tue Jul 27 20:18:18 2010 -0500
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Tue Jul 27 20:28:14 2010 -0500
GFS2: libgfs2 bitfit algorithm using wrong shift point
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#608154
---
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 d98919a..6f096f3 100644
--- a/gfs2/libgfs2/fs_bits.c
+++ b/gfs2/libgfs2/fs_bits.c
@@ -66,7 +66,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)));
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=b4…
Commit: b45a6cf730bd9e4be9c8570e8cbaf670ad59172c
Parent: 782091c04c4cd718d2279ec0ab31ced262adc7b2
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Jul 27 14:06:53 2010 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Jul 27 16:39:32 2010 -0500
dlm_controld: fix plock owner in checkpoints
The wrong plock resource owner is written into checkpoints
when plock_ownership is 0. This causes a node that mounts
the fs to have incorrect owner values, which cause the
plock operations to permanently hang.
This bug seems to have existed since the plock code was originally
copied into dlm_controld from gfs_controld. As part of the copy,
there were some small code changes. One was to always include the
resource owner in the checkpoint data, instead of only including it
when plock_ownership was 1. The owner was then written and read
incorrectly when plock_ownership was 0.
bz 618814
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
group/dlm_controld/plock.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/group/dlm_controld/plock.c b/group/dlm_controld/plock.c
index 861a39b..d18d1f5 100644
--- a/group/dlm_controld/plock.c
+++ b/group/dlm_controld/plock.c
@@ -1924,7 +1924,9 @@ void store_plocks(struct lockspace *ls, uint32_t *sig)
(there should be no SYNCING plocks) */
list_for_each_entry(r, &ls->plock_resources, list) {
- if (r->owner == -1)
+ if (!cfgd_plock_ownership)
+ owner = 0;
+ else if (r->owner == -1)
continue;
else if (r->owner == our_nodeid)
owner = our_nodeid;