]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs_scrub_all: only use the xfs_scrub@ systemd services in service mode
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:23:16 +0000 (16:23 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:10 +0000 (17:01 -0700)
commit958e3bf95d6727b8d3355c131609ac12b3844f1f
tree07ee4835a3f856eaf8e7ec9a88d3b4228e7088d1
parent50411335572120153cc84d54213cd5ca9dd11b14
xfs_scrub_all: only use the xfs_scrub@ systemd services in service mode

Since the per-mount xfs_scrub@.service definition includes a bunch of
resource usage constraints, we no longer want to use those services if
xfs_scrub_all is being run directly by the sysadmin (aka not in service
mode) on the presumption that sysadmins want answers as quickly as
possible.

Therefore, only try to call the systemd service from xfs_scrub_all if
SERVICE_MODE is set in the environment.  If reaching out to systemd
fails and we're in service mode, we still want to run xfs_scrub
directly.  Split the makefile variables as necessary so that we only
pass -b to xfs_scrub in service mode.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
scrub/Makefile
scrub/xfs_scrub@.service.in
scrub/xfs_scrub_all.in