On Fri, Dec 16, 2016 at 09:09:38AM +1100, Dave Chinner wrote: > > @@ -3812,7 +3812,6 @@ xfs_bmap_btalloc( > > args.fsbno = 0; > > args.type = XFS_ALLOCTYPE_FIRST_AG; > > args.total = ap->minlen; > > - args.minleft = 0; > > if ((error = xfs_alloc_vextent(&args))) > > return error; > > ap->dfops->dop_low = true; > > But this looks wrong. when combined with the next patch that sets: > > args.minleft = xfs_bmap_worst_indlen(ap->ip, args.maxlen); > > we've got a minleft value that might be for multigigabyte > allocation, but now we are only asking for a total allocation > of minlen, and that might be 1 block. IOWs, shouldn't this "last, > final attempt" code actually do something like this: > > args.maxlen = ap->minlen; > args.total = ap->minlen; > args.minleft = xfs_bmap_worst_indlen(ap->ip, args.maxlen); Yes. And I actually had that in a previous iteration, and it got dropped at some point. -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html