public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] fix logic error in xfs_alloc_ag_vextent_near()
@ 2008-04-10  3:25 David Chinner
  2008-04-10  4:36 ` Barry Naujok
  2008-04-10  7:43 ` Christoph Hellwig
  0 siblings, 2 replies; 3+ messages in thread
From: David Chinner @ 2008-04-10  3:25 UTC (permalink / raw)
  To: xfs-dev; +Cc: xfs-oss

Fix a logic error in xfs_alloc_ag_vextent_near(). This is
a regression introduced by the error handling changes.

Signed-off-by: Dave Chinner <dgc@sgi.com>
---
 fs/xfs/xfs_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.x-xfs-new/fs/xfs/xfs_alloc.c
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/xfs_alloc.c	2008-04-10 10:00:50.000000000 +1000
+++ 2.6.x-xfs-new/fs/xfs/xfs_alloc.c	2008-04-10 13:10:17.948126881 +1000
@@ -838,7 +838,7 @@ xfs_alloc_ag_vextent_near(
 			XFS_WANT_CORRUPTED_GOTO(i == 1, error0);
 			xfs_alloc_compute_aligned(ltbno, ltlen, args->alignment,
 					args->minlen, &ltbnoa, &ltlena);
-			if (ltlena >= args->minlen)
+			if (ltlena < args->minlen)
 				continue;
 			args->len = XFS_EXTLEN_MIN(ltlena, args->maxlen);
 			xfs_alloc_fix_len(args);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] fix logic error in xfs_alloc_ag_vextent_near()
  2008-04-10  3:25 [patch] fix logic error in xfs_alloc_ag_vextent_near() David Chinner
@ 2008-04-10  4:36 ` Barry Naujok
  2008-04-10  7:43 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Barry Naujok @ 2008-04-10  4:36 UTC (permalink / raw)
  To: David Chinner, xfs-dev; +Cc: xfs-oss

On Thu, 10 Apr 2008 13:25:55 +1000, David Chinner <dgc@sgi.com> wrote:

> Fix a logic error in xfs_alloc_ag_vextent_near(). This is
> a regression introduced by the error handling changes.

Ah, I see how you made the mistake, looks good now.

(ie. was if (!xfs_alloc_compute_aligned() continue;)

> Signed-off-by: Dave Chinner <dgc@sgi.com>
> ---
>  fs/xfs/xfs_alloc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: 2.6.x-xfs-new/fs/xfs/xfs_alloc.c
> ===================================================================
> --- 2.6.x-xfs-new.orig/fs/xfs/xfs_alloc.c	2008-04-10 10:00:50.000000000  
> +1000
> +++ 2.6.x-xfs-new/fs/xfs/xfs_alloc.c	2008-04-10 13:10:17.948126881 +1000
> @@ -838,7 +838,7 @@ xfs_alloc_ag_vextent_near(
>  			XFS_WANT_CORRUPTED_GOTO(i == 1, error0);
>  			xfs_alloc_compute_aligned(ltbno, ltlen, args->alignment,
>  					args->minlen, &ltbnoa, &ltlena);
> -			if (ltlena >= args->minlen)
> +			if (ltlena < args->minlen)
>  				continue;
>  			args->len = XFS_EXTLEN_MIN(ltlena, args->maxlen);
>  			xfs_alloc_fix_len(args);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] fix logic error in xfs_alloc_ag_vextent_near()
  2008-04-10  3:25 [patch] fix logic error in xfs_alloc_ag_vextent_near() David Chinner
  2008-04-10  4:36 ` Barry Naujok
@ 2008-04-10  7:43 ` Christoph Hellwig
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2008-04-10  7:43 UTC (permalink / raw)
  To: David Chinner; +Cc: xfs-dev, xfs-oss

On Thu, Apr 10, 2008 at 01:25:55PM +1000, David Chinner wrote:
> Fix a logic error in xfs_alloc_ag_vextent_near(). This is
> a regression introduced by the error handling changes.

With this one onto of the truncate fix xfsqa nows doesn't cause an oops
or regressions on xfsqa.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-10  7:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-10  3:25 [patch] fix logic error in xfs_alloc_ag_vextent_near() David Chinner
2008-04-10  4:36 ` Barry Naujok
2008-04-10  7:43 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox