summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_fsmap.c
Commit message (Collapse)AuthorAgeFilesLines
* xfs: move two more RT specific functions into CONFIG_XFS_RTArnd Bergmann2017-10-161-24/+24
| | | | | | | | | | | | | | | | The last cleanup introduced two harmless warnings: fs/xfs/xfs_fsmap.c:480:1: warning: '__xfs_getfsmap_rtdev' defined but not used fs/xfs/xfs_fsmap.c:372:1: warning: 'xfs_getfsmap_rtdev_rtbitmap_helper' defined but not used This moves those two functions as well. Fixes: bb9c2e543325 ("xfs: move more RT specific code under CONFIG_XFS_RT") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
* xfs: move more RT specific code under CONFIG_XFS_RTDave Chinner2017-10-111-0/+12
| | | | | | | | | | | | | | | Various utility functions and interfaces that iterate internal devices try to reference the realtime device even when RT support is not compiled into the kernel. Make sure this code is excluded from the CONFIG_XFS_RT=n build, and where appropriate stub functions to return fatal errors if they ever get called when RT support is not present. Signed-Off-By: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
* xfs: only return detailed fsmap info if the caller has CAP_SYS_ADMINDarrick J. Wong2017-05-161-1/+4
| | | | | | | | | | | | | | | There were a number of handwaving complaints that one could "possibly" use inode numbers and extent maps to fingerprint a filesystem hosting multiple containers and somehow use the information to guess at the contents of other containers and attack them. Despite the total lack of any demonstration that this is actually possible, it's easier to restrict access now and broaden it later, so use the rmapbt fsmap backends only if the caller has CAP_SYS_ADMIN. Unprivileged users will just have to make do with only getting the free space and static metadata placement information. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
* xfs: use NULL instead of 0 to initialize a pointer in xfs_getfsmapChristoph Hellwig2017-04-251-1/+1
| | | | | | | | Found by sparse. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
* xfs: report realtime space information via the rtbitmapDarrick J. Wong2017-04-031-1/+119
| | | | | | | | Use the realtime bitmap to return free space information via getfsmap. Eventually this will be superseded by the realtime rmapbt code. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
* xfs: have getfsmap fall back to the freesp btrees when rmap is not presentDarrick J. Wong2017-04-031-3/+69
| | | | | | | | | | If the reverse-mapping btree isn't available, fall back to the free space btrees to provide partial reverse mapping information. The online scrub tool can make use of even partial information to speed up the data block scan. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
* xfs: implement the GETFSMAP ioctlDarrick J. Wong2017-04-031-0/+756
Introduce a new ioctl that uses the reverse mapping btree to return information about the physical layout of the filesystem. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
OpenPOWER on IntegriCloud