]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
common/btrfs: lookup running processes using pgrep
authorAnand Jain <anand.jain@oracle.com>
Mon, 1 Apr 2024 05:56:03 +0000 (13:56 +0800)
committerAnand Jain <anand.jain@oracle.com>
Wed, 3 Apr 2024 07:09:01 +0000 (15:09 +0800)
commit8aab1f1663031cccb326ffbcb087b81bfb629df8
treec591b18c358581d2ab5a7377745ddace21361e21
parentc4d674bcd342cd8ccc9b5870031a025a633e3da4
common/btrfs: lookup running processes using pgrep

Certain helper functions and the testcase btrfs/132 use the following
script to find running processes:

while ps aux | grep "balance start" | grep -qv grep; do
<>
done

Instead, using pgrep is more efficient.

while pgrep -f "btrfs balance start" > /dev/null; do
<>
done

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
common/btrfs
tests/btrfs/132