FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 09-12-2012, 01:40 PM
Bob Peterson
 
Default GFS2: Fix infinite loop in rbm_find

Hi,

This patch fixes an infinite loop in gfs2_rbm_find that was introduced
by the previous patch. The problem occurred when the length was less
than 3 but the rbm block was byte-aligned, causing it to improperly
return a extent length of zero, which caused it to spin.

Regards,

Bob Peterson
Red Hat File Systems

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
fs/gfs2/rgrp.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index b933cdc..3cc402c 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -329,6 +329,7 @@ static u32 gfs2_free_extlen(const struct gfs2_rbm *rrbm, u32 len)
gfs2_unaligned_extlen(&rbm, 4 - n_unaligned, &len))
goto out;

+ n_unaligned = len & 3;
/* Start is now byte aligned */
while (len > 3) {
start = rbm.bi->bi_bh->b_data;
 
Old 09-12-2012, 02:16 PM
Steven Whitehouse
 
Default GFS2: Fix infinite loop in rbm_find

Hi,

Now in the -nmw git tree. Thanks,

Steve.

On Wed, 2012-09-12 at 09:40 -0400, Bob Peterson wrote:
> Hi,
>
> This patch fixes an infinite loop in gfs2_rbm_find that was introduced
> by the previous patch. The problem occurred when the length was less
> than 3 but the rbm block was byte-aligned, causing it to improperly
> return a extent length of zero, which caused it to spin.
>
> Regards,
>
> Bob Peterson
> Red Hat File Systems
>
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> ---
> fs/gfs2/rgrp.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
> index b933cdc..3cc402c 100644
> --- a/fs/gfs2/rgrp.c
> +++ b/fs/gfs2/rgrp.c
> @@ -329,6 +329,7 @@ static u32 gfs2_free_extlen(const struct gfs2_rbm *rrbm, u32 len)
> gfs2_unaligned_extlen(&rbm, 4 - n_unaligned, &len))
> goto out;
>
> + n_unaligned = len & 3;
> /* Start is now byte aligned */
> while (len > 3) {
> start = rbm.bi->bi_bh->b_data;
>
 
Old 09-26-2012, 08:25 AM
Steven Whitehouse
 
Default GFS2: Fix infinite loop in rbm_find

From: Bob Peterson <rpeterso@redhat.com>

This patch fixes an infinite loop in gfs2_rbm_find that was introduced
by the previous patch. The problem occurred when the length was less
than 3 but the rbm block was byte-aligned, causing it to improperly
return a extent length of zero, which caused it to spin.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Tested-by: Bob Peterson <rpeterso@redhat.com>
Tested-by: Barry Marson <bmarson@redhat.com>

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index b933cdc..3cc402c 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -329,6 +329,7 @@ static u32 gfs2_free_extlen(const struct gfs2_rbm *rrbm, u32 len)
gfs2_unaligned_extlen(&rbm, 4 - n_unaligned, &len))
goto out;

+ n_unaligned = len & 3;
/* Start is now byte aligned */
while (len > 3) {
start = rbm.bi->bi_bh->b_data;
--
1.7.4
 

Thread Tools




All times are GMT. The time now is 08:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org