From: Darrick J. Wong <djwong@xxxxxxxxxx> Now that we can set properties on xfs filesystems, make the xfs_scrub background service query the self_healing property to figure out which mode (dry run, optimize, repair, none) it should use. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- scrub/Makefile | 3 +-- scrub/xfs_scrub@xxxxxxxxxxx | 2 +- scrub/xfs_scrub_media@xxxxxxxxxxx | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scrub/Makefile b/scrub/Makefile index 653aafd171b5..b0022cb7f005 100644 --- a/scrub/Makefile +++ b/scrub/Makefile @@ -17,7 +17,7 @@ INSTALL_SCRUB = install-scrub XFS_SCRUB_ALL_PROG = xfs_scrub_all XFS_SCRUB_FAIL_PROG = xfs_scrub_fail XFS_SCRUB_ARGS = -p -XFS_SCRUB_SERVICE_ARGS = -b +XFS_SCRUB_SERVICE_ARGS = -b -o fsprops_advise ifeq ($(HAVE_SYSTEMD),yes) INSTALL_SCRUB += install-systemd SYSTEMD_SERVICES=\ @@ -146,7 +146,6 @@ install-pkg: $(INSTALL_SCRUB) @echo " [SED] $@" $(Q)$(SED) -e "s|@sbindir@|$(PKG_SBIN_DIR)|g" \ -e "s|@scrub_service_args@|$(XFS_SCRUB_SERVICE_ARGS)|g" \ - -e "s|@scrub_args@|$(XFS_SCRUB_ARGS)|g" \ -e "s|@pkg_libexec_dir@|$(PKG_LIBEXEC_DIR)|g" \ -e "s|@pkg_state_dir@|$(PKG_STATE_DIR)|g" \ -e "s|@media_scan_interval@|$(XFS_SCRUB_ALL_AUTO_MEDIA_SCAN_INTERVAL)|g" \ diff --git a/scrub/xfs_scrub@xxxxxxxxxxx b/scrub/xfs_scrub@xxxxxxxxxxx index 5fa5f328200e..fb38319e95c1 100644 --- a/scrub/xfs_scrub@xxxxxxxxxxx +++ b/scrub/xfs_scrub@xxxxxxxxxxx @@ -22,7 +22,7 @@ RequiresMountsFor=%f [Service] Type=oneshot Environment=SERVICE_MODE=1 -ExecStart=@sbindir@/xfs_scrub @scrub_service_args@ @scrub_args@ -M /tmp/scrub/ %f +ExecStart=@sbindir@/xfs_scrub @scrub_service_args@ -M /tmp/scrub/ %f SyslogIdentifier=%N # Run scrub with minimal CPU and IO priority so that nothing else will starve. diff --git a/scrub/xfs_scrub_media@xxxxxxxxxxx b/scrub/xfs_scrub_media@xxxxxxxxxxx index e670748ced51..98cd1ac44fbe 100644 --- a/scrub/xfs_scrub_media@xxxxxxxxxxx +++ b/scrub/xfs_scrub_media@xxxxxxxxxxx @@ -22,7 +22,7 @@ RequiresMountsFor=%f [Service] Type=oneshot Environment=SERVICE_MODE=1 -ExecStart=@sbindir@/xfs_scrub @scrub_service_args@ @scrub_args@ -M /tmp/scrub/ -x %f +ExecStart=@sbindir@/xfs_scrub @scrub_service_args@ -M /tmp/scrub/ -x %f SyslogIdentifier=%N # Run scrub with minimal CPU and IO priority so that nothing else will starve.