https://bugzilla.kernel.org/show_bug.cgi?id=214077 --- Comment #6 from Zorro Lang (zlang@xxxxxxxxxx) --- By adding some debug output: diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c index ee9ec0c50bec..ce5db7195604 100644 --- a/fs/xfs/libxfs/xfs_ag.c +++ b/fs/xfs/libxfs/xfs_ag.c @@ -859,6 +859,7 @@ xfs_ag_shrink_space( * without any side effects. */ error = xfs_defer_finish(tpp); + pr_info("after xfs_defer_finish, error=%d", error); if (error) return error; @@ -870,6 +871,7 @@ xfs_ag_shrink_space( return 0; resv_init_out: err2 = xfs_ag_resv_init(agibp->b_pag, *tpp); + pr_info("after xfs_ag_resv_init [out], err2=%d\n", err2); if (!err2) return error; resv_err: The failed xfs/168 dmesg output as below: [ 820.044203] run fstests xfs/168 at 2021-08-24 11:23:40 [ 822.039473] XFS (dm-2): Mounting V5 Filesystem [ 822.126343] XFS (dm-2): Ending clean mount [ 822.176716] XFS (dm-2): EXPERIMENTAL online shrink feature in use. Use at your own risk! [ 822.232059] XFS (dm-2): Unmounting Filesystem [ 823.999271] XFS (dm-2): Mounting V5 Filesystem [ 824.061384] XFS (dm-2): Ending clean mount [ 829.139729] XFS (dm-2): Unmounting Filesystem [ 829.632030] XFS (dm-2): Mounting V5 Filesystem [ 829.758903] XFS (dm-2): Ending clean mount [ 835.109447] XFS (dm-2): xlog_verify_grant_tail: space > BBTOB(tail_blocks) [ 835.540700] XFS (dm-2): Unmounting Filesystem [ 836.309492] XFS (dm-2): Mounting V5 Filesystem [ 848.784972] XFS (dm-2): Ending clean mount [ 854.679181] XFS (dm-2): Unmounting Filesystem [ 855.658301] XFS (dm-2): Mounting V5 Filesystem [ 855.757461] XFS (dm-2): Ending clean mount [ 862.342901] XFS (dm-2): xlog_verify_grant_tail: space > BBTOB(tail_blocks) [ 862.830414] XFS (dm-2): Unmounting Filesystem [ 864.397318] XFS (dm-2): Mounting V5 Filesystem [ 864.734746] XFS (dm-2): Ending clean mount [ 870.743557] XFS (dm-2): Unmounting Filesystem [ 872.274155] XFS (dm-2): Mounting V5 Filesystem [ 878.607770] XFS (dm-2): Ending clean mount [ 885.327410] XFS (dm-2): Unmounting Filesystem [ 887.102664] XFS (dm-2): Mounting V5 Filesystem [ 887.207968] XFS (dm-2): Ending clean mount [ 888.269530] after xfs_ag_resv_init [out], err2=0 [ 893.921362] XFS (dm-2): xlog_verify_grant_tail: space > BBTOB(tail_blocks) [ 893.921362] XFS (dm-2): xlog_verify_grant_tail: space > BBTOB(tail_blocks) [ 894.343531] XFS (dm-2): Unmounting Filesystem [ 896.329804] XFS (dm-2): Mounting V5 Filesystem [ 896.442648] XFS (dm-2): Ending clean mount [ 897.487766] XFS (dm-2): Reserve blocks depleted! Consider increasing reserve pool size. [ 897.532377] after xfs_ag_resv_init [out], err2=0 [ 897.561337] after xfs_ag_resv_init [out], err2=0 [ 897.593129] after xfs_defer_finish, error=0 [ 897.593136] after xfs_ag_resv_init [out], err2=0 [ 897.627267] after xfs_ag_resv_init [out], err2=0 [ 897.656902] after xfs_defer_finish, error=0 [ 897.656909] after xfs_ag_resv_init [out], err2=0 [ 897.691148] after xfs_ag_resv_init [out], err2=0 [ 897.719510] after xfs_ag_resv_init [out], err2=0 [ 897.747765] after xfs_ag_resv_init [out], err2=0 [ 897.776548] after xfs_ag_resv_init [out], err2=0 [ 897.799510] after xfs_ag_resv_init [out], err2=0 [ 897.822176] after xfs_ag_resv_init [out], err2=0 [ 897.845231] after xfs_ag_resv_init [out], err2=0 [ 902.797518] XFS (dm-2): Unmounting Filesystem [ 905.223385] XFS (dm-2): Mounting V5 Filesystem [ 905.336268] XFS (dm-2): Ending clean mount [ 906.478459] XFS (dm-2): Per-AG reservation for AG 1 failed. Filesystem may run out of space. [ 906.488330] after xfs_defer_finish, error=0 [ 906.488347] after xfs_ag_resv_init [out], err2=0 [ 906.523046] XFS (dm-2): Per-AG reservation for AG 1 failed. Filesystem may run out of space. [ 906.532797] after xfs_defer_finish, error=0 [ 906.532807] after xfs_ag_resv_init [out], err2=0 [ 906.564799] XFS (dm-2): Per-AG reservation for AG 1 failed. Filesystem may run out of space. [ 906.574422] after xfs_ag_resv_init [out], err2=-28 [ 906.579790] XFS (dm-2): Error -28 reserving per-AG metadata reserve pool. [ 906.614881] XFS (dm-2): Corruption of in-memory data (0x8) detected at xfs_ag_shrink_space+0x78f/0xa90 [xfs] (fs/xfs/libxfs/xfs_ag.c:879). Shutting down filesystem [ 906.631506] XFS (dm-2): Please unmount the filesystem and rectify the problem(s) [ 907.104870] XFS (dm-2): Unmounting Filesystem [ 909.747600] XFS (dm-1): Unmounting Filesystem -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.