xfs: don't allow reflink when the AG is low on space
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 3 Oct 2016 16:11:45 +0000 (09:11 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 5 Oct 2016 23:26:27 +0000 (16:26 -0700)
commit6fa164b865e44ac1d1ffc9a24ccd442f17acc4f6
tree62b863d4de68d47af16edcfac1e2a5fa0b2f437f
parent84d6961910ea7b3ae8d8338f5b4df25dea68cee9
xfs: don't allow reflink when the AG is low on space

If the AG free space is down to the reserves, refuse to reflink our
way out of space.  Hopefully userspace will make a real copy and/or go
elsewhere.

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