libxfs: track transaction block reservation usage like the kernel
Currently, block reservations in userspace transactions are not carried
over across transaction rolls. This will lead to ENOSPC failures inside
libxfs code which checks for reservation overruns in an upcoming patch
that borrows the bmbt repair code from the kernel because it makes
extensive use of transaction rolling.
Therefore, port t_blk_res_used from the kernel so that block
reservations work the same way in userspace.
[sandeen: tweaks to backport before libxfs updates] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>