From f18a1ee5ca4bfbd87d2b77a46e68c687079d4bd4 Mon Sep 17 00:00:00 2001 From: Lachlan McIlroy Date: Fri, 27 Jun 2008 13:33:11 +1000 Subject: [PATCH] --- yaml --- r: 107453 b: refs/heads/master c: 313b5c767a044c7a0db5e773cb7aea70383b2627 h: refs/heads/master i: 107451: 1df608fbb4c777bcf6f91c494a36c0181ac56e42 v: v3 --- [refs] | 2 +- trunk/fs/xfs/xfs_bmap_btree.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 16fac325cbe1..3ae71e7a712a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b877e3d37dda0154868a3c78f02f38a1ec14ce79 +refs/heads/master: 313b5c767a044c7a0db5e773cb7aea70383b2627 diff --git a/trunk/fs/xfs/xfs_bmap_btree.c b/trunk/fs/xfs/xfs_bmap_btree.c index 1140cef4ba99..23efad29a5cd 100644 --- a/trunk/fs/xfs/xfs_bmap_btree.c +++ b/trunk/fs/xfs/xfs_bmap_btree.c @@ -1525,6 +1525,21 @@ xfs_bmbt_split( XFS_BMBT_TRACE_CURSOR(cur, ERROR); return error; } + if (args.fsbno == NULLFSBLOCK && args.minleft) { + /* + * Could not find an AG with enough free space to satisfy + * a full btree split. Try again without minleft and if + * successful activate the lowspace algorithm. + */ + args.fsbno = 0; + args.type = XFS_ALLOCTYPE_FIRST_AG; + args.minleft = 0; + if ((error = xfs_alloc_vextent(&args))) { + XFS_BMBT_TRACE_CURSOR(cur, ERROR); + return error; + } + cur->bc_private.b.flist->xbf_low = 1; + } if (args.fsbno == NULLFSBLOCK) { XFS_BMBT_TRACE_CURSOR(cur, EXIT); *stat = 0;