Whamcloud - gitweb
e2scrub_all: refactor device probe loop
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 19 Mar 2019 00:17:32 +0000 (17:17 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 21 Mar 2019 22:10:50 +0000 (18:10 -0400)
commitc7d6525ecaab6a410e7875df5989fe753609ee08
tree3c44fcb3fe8f13b11f902c19c2eb1a6e88cb1b56
parentc120312253a4991078f8c0eb7fbde23851c4d258
e2scrub_all: refactor device probe loop

Paul Menzel reported that the e2scrub_all reaper service that runs at
startup takes a long time to run, and Ted Ts'o pointed out that we could
do a lot less work by using lvs as the outer loop in the ext4 filesystem
probe function so that we only have to lsblk the lvm devices containing
ext4 filesystems.

Therefore, refactor the loops to put lvs first, which should boost speed
a bit.

[ Made some of the further optimizations suggested by Lukas Czerner.  -- TYT ]

Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
scrub/e2scrub_all.in