diff options
author | Dave Chinner <david@fromorbit.com> | 2014-03-13 12:13:05 +0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-03-13 12:13:05 +0400 |
commit | 5f44e4c185ec5a4a438841cbd4983d0c4a106a4a (patch) | |
tree | 894419c679250407eb7a76af9d1525c47226a085 /fs/xfs/xfs_ialloc.c | |
parent | 49ae4b97d760d2e63394b96a7e14cbb43b9dc942 (diff) | |
parent | fe4c224aa1ffa4352849ac5f452de7132739bee2 (diff) | |
download | linux-5f44e4c185ec5a4a438841cbd4983d0c4a106a4a.tar.xz |
Merge branch 'xfs-bug-fixes-for-3.15-2' into for-next
Diffstat (limited to 'fs/xfs/xfs_ialloc.c')
-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 5959b3b4c7c9..8f711db61a0c 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c @@ -363,6 +363,18 @@ xfs_ialloc_ag_alloc( args.minleft = args.mp->m_in_maxlevels - 1; if ((error = xfs_alloc_vextent(&args))) return error; + + /* + * This request might have dirtied the transaction if the AG can + * satisfy the request, but the exact block was not available. + * If the allocation did fail, subsequent requests will relax + * the exact agbno requirement and increase the alignment + * instead. It is critical that the total size of the request + * (len + alignment + slop) does not increase from this point + * on, so reset minalignslop to ensure it is not included in + * subsequent requests. + */ + args.minalignslop = 0; } else args.fsbno = NULLFSBLOCK; |