summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs
diff options
context:
space:
mode:
authorDarrick J. Wong2017-10-18 06:37:36 +0200
committerDarrick J. Wong2017-10-27 00:38:23 +0200
commitdcb660f9222fd9f607e7e05f4755b39b809ca19f (patch)
tree7f18fd46d04dae3fb1aa27192e2e7e1d4ab0110c /fs/xfs/libxfs
parentxfs: dispatch metadata scrub subcommands (diff)
downloadkernel-qcow2-linux-dcb660f9222fd9f607e7e05f4755b39b809ca19f.tar.gz
kernel-qcow2-linux-dcb660f9222fd9f607e7e05f4755b39b809ca19f.tar.xz
kernel-qcow2-linux-dcb660f9222fd9f607e7e05f4755b39b809ca19f.zip
xfs: probe the scrub ioctl
Create a probe scrubber with id 0. This will be used by xfs_scrub to probe the kernel's abilities to scrub (and repair) the metadata. We do this by validating the ioctl inputs from userspace, preparing the filesystem for a scrub (or a repair) operation, and immediately returning to userspace. Userspace can use the returned errno and structure state to decide (in broad terms) if scrub/repair are supported by the running kernel. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs')
-rw-r--r--fs/xfs/libxfs/xfs_fs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_fs.h b/fs/xfs/libxfs/xfs_fs.h
index 3b4a36e4b541..765f91e9c732 100644
--- a/fs/xfs/libxfs/xfs_fs.h
+++ b/fs/xfs/libxfs/xfs_fs.h
@@ -483,9 +483,10 @@ struct xfs_scrub_metadata {
*/
/* Scrub subcommands. */
+#define XFS_SCRUB_TYPE_PROBE 0 /* presence test ioctl */
/* Number of scrub subcommands. */
-#define XFS_SCRUB_TYPE_NR 0
+#define XFS_SCRUB_TYPE_NR 1
/* i: Repair this metadata. */
#define XFS_SCRUB_IFLAG_REPAIR (1 << 0)