On Wed, Apr 12, 2017 at 08:44:32PM +0300, Nikolay Borisov wrote: > " > djwong: either agf1 is clean and it needs to release that before going > for agf0, or agf1 is dirty and thus it cannot go for agf0 > " Yes. Older kernels had some bugs in this area due to busy extent tracking, where xfs_alloc_ag_vextent would fail despite xfs_alloc_fix_freelist picking an AG and possibly dirtying the AGF. My busy extent tracking changes for the asynchronous discard code in 4.11-rc should have fixed that. But even with that in place I think that locking two AGFs in any order in the truncate path is wrong. -- 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