]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_bmap_btree.c
tty: compare the tty winsize
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_bmap_btree.c
index 1140cef4ba994d99ab56cf2e1e96584723eefabb..23efad29a5cd680b1229ae32a3e56fa9b78d50a8 100644 (file)
@@ -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;