xfs: simulate per-AG reservations being critically low
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 3 Oct 2016 16:11:51 +0000 (09:11 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 5 Oct 2016 23:26:31 +0000 (16:26 -0700)
commita35eb41519ab8db90e87d375ee9362d6e080ca4c
tree6db45615c97decf9d8c75bbc8c590e0ca5d936b2
parent4f435ebe7d0422af61cdcddbbcc659888645a1e1
xfs: simulate per-AG reservations being critically low

Create an error injection point that enables us to simulate being
critically low on per-AG block reservations.  This should enable us to
simulate this specific ENOSPC condition so that we can test falling back
to a regular file copy.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_ag_resv.c
fs/xfs/xfs_error.h