fix logic error in xfs_alloc_ag_vextent_near()
PATCH 1/1 fix logic error in xfs_alloc_ag_vextent_near()
Fix a logic error in xfs_alloc_ag_vextent_near(). This is a regression introduced by the error handling changes.
--- fs/xfs/xfs_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_alloc.c +1 -1
@@ -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, <bnoa, <lena); -if (ltlena >= args->minlen) +if (ltlena < args->minlen)continue ; args->len =XFS_EXTLEN_MIN (ltlena, args->maxlen);xfs_alloc_fix_len (args);
Quoted 2 lines · David Chinner
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;)
Quoted 19 lines
Signed-off-by Dave Chinner <[email protected]>--- 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.c2008-04-10 10:00:50.000000000
+1000
+++2.6.x-xfs-new/fs/xfs/xfs_alloc.c2008-04-10 13:10:17.948126881 +1000fs/xfs/xfs_alloc.c +1
-1@@ -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, <bnoa, <lena); -if (ltlena >= args->minlen) +if (ltlena < args->minlen)continue ; args->len =XFS_EXTLEN_MIN (ltlena, args->maxlen);xfs_alloc_fix_len (args);
Quoted 2 lines · David Chinner
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.