On Thu, Feb 16, 2017 at 05:11:17PM -0800, Darrick J. Wong wrote: > On Thu, Feb 16, 2017 at 10:10:35PM +0100, Christoph Hellwig wrote: > > In various places we currently assert that xfs_bmap_btalloc allocates > > from the same as the firstblock value passed in, unless it's either > > NULLAGNO or the dop_low flag is set. But the reflink code does not > > fully follow this convention as it passes in firstblock purely as > > a hint for the allocator without actually having previous allocations > > Are you referring to BMAPI_REMAP? Yes. > In that case *firstblock isn't a > hint, it's the new physical location of the extent. Yes and no. For the high-level bmap code it is indeed the location of the extent, but it then also gets passed down to the btree code, where is is treated as both a hint for allocating the bmap btree blocks close to it, which limits the allocation to the same AG. We work around that a bit using the try_another_ag loop, but it's all a bit of a mess. > By the way, was it your intent to push this series into 4.11? It's just a single patch, and given that it's fairly easy to trigger we should defintively have it in 4.11 and later -stable. -- 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