diff options
-rw-r--r-- | fs/xfs/xfs_ialloc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index 5d7f105a1c82..283a76d2c798 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
@@ -363,6 +363,18 @@ xfs_ialloc_ag_alloc( | |||
363 | args.minleft = args.mp->m_in_maxlevels - 1; | 363 | args.minleft = args.mp->m_in_maxlevels - 1; |
364 | if ((error = xfs_alloc_vextent(&args))) | 364 | if ((error = xfs_alloc_vextent(&args))) |
365 | return error; | 365 | return error; |
366 | |||
367 | /* | ||
368 | * This request might have dirtied the transaction if the AG can | ||
369 | * satisfy the request, but the exact block was not available. | ||
370 | * If the allocation did fail, subsequent requests will relax | ||
371 | * the exact agbno requirement and increase the alignment | ||
372 | * instead. It is critical that the total size of the request | ||
373 | * (len + alignment + slop) does not increase from this point | ||
374 | * on, so reset minalignslop to ensure it is not included in | ||
375 | * subsequent requests. | ||
376 | */ | ||
377 | args.minalignslop = 0; | ||
366 | } else | 378 | } else |
367 | args.fsbno = NULLFSBLOCK; | 379 | args.fsbno = NULLFSBLOCK; |
368 | 380 | ||