summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ialloc.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2014-03-13 19:13:05 +1100
committerDave Chinner <david@fromorbit.com>2014-03-13 19:13:05 +1100
commit5f44e4c185ec5a4a438841cbd4983d0c4a106a4a (patch)
tree894419c679250407eb7a76af9d1525c47226a085 /fs/xfs/xfs_ialloc.c
parent49ae4b97d760d2e63394b96a7e14cbb43b9dc942 (diff)
parentfe4c224aa1ffa4352849ac5f452de7132739bee2 (diff)
downloadop-kernel-dev-5f44e4c185ec5a4a438841cbd4983d0c4a106a4a.zip
op-kernel-dev-5f44e4c185ec5a4a438841cbd4983d0c4a106a4a.tar.gz
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.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c
index 5959b3b..8f711db 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;
OpenPOWER on IntegriCloud