• Darrick J. Wong's avatar
    xfs: don't deplete the reserve pool when trying to shrink the fs · 06f3ef6e
    Darrick J. Wong authored
    Every now and then, xfs/168 fails with this logged in dmesg:
    
    Reserve blocks depleted! Consider increasing reserve pool size.
    EXPERIMENTAL online shrink feature in use. Use at your own risk!
    Per-AG reservation for AG 1 failed.  Filesystem may run out of space.
    Per-AG reservation for AG 1 failed.  Filesystem may run out of space.
    Error -28 reserving per-AG metadata reserve pool.
    Corruption of in-memory data (0x8) detected at xfs_ag_shrink_space+0x23c/0x3b0 [xfs] (fs/xfs/libxfs/xfs_ag.c:1007).  Shutting down filesystem.
    
    It's silly to deplete the reserved blocks pool just to shrink the
    filesystem, particularly since the fs goes down after that.
    
    Fixes: fb2fc172 ("xfs: support shrinking unused space in the last AG")
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    06f3ef6e
xfs_fsops.c 15.5 KB