xfs: track delayed allocation reservations across the filesystem
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 26 Apr 2019 01:26:22 +0000 (18:26 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 26 Apr 2019 19:28:55 +0000 (12:28 -0700)
commit9fe82b8c422b5d9e9011bc08e27b9044936d945f
tree6285e6e1577fa04969cbb6e1a5630c4c72266e34
parentf60be90fc9a969d8d38d761aef1c930407a6a921
xfs: track delayed allocation reservations across the filesystem

Add a percpu counter to track the number of blocks directly reserved for
delayed allocations on the data device.  This counter (in contrast to
i_delayed_blks) does not track allocated CoW staging extents or anything
going on with the realtime device.  It will be used in the upcoming
summary counter scrub function to check the free block counts without
having to freeze the filesystem or walk all the inodes to find the
delayed allocations.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.h
fs/xfs/xfs_super.c