]> git.proxmox.com Git - mirror_zfs.git/commit
Use setproctitle to report progress of zfs send
authorAmeer Hamza <106930537+ixhamza@users.noreply.github.com>
Tue, 17 Jan 2023 18:17:35 +0000 (23:17 +0500)
committerGitHub <noreply@github.com>
Tue, 17 Jan 2023 18:17:35 +0000 (10:17 -0800)
commit19d3961589bdedb24e245a1e12db758f2d96ff86
treef08971616cd63240843922d6850aa33e82717db5
parent2e7f664f04bae4375ab6bebf232983b2326c9370
Use setproctitle to report progress of zfs send

This allows parsing of zfs send progress by checking the process
title.
Doing so requires some changes to the send code in libzfs_sendrecv.c;
primarily these changes move some of the accounting around, to allow
for the code to be verbose as normal, or set the process title. Unlike
BSD, setproctitle() isn't standard in Linux; thus, borrowed it from
libbsd with slight modifications.

Authored-by: Sean Eric Fagan <sef@FreeBSD.org>
Co-authored-by: Ryan Moeller <ryan@iXsystems.com>
Co-authored-by: Ameer Hamza <ahamza@ixsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
Closes #14376
cmd/zfs/zfs_main.c
include/libzfs.h
include/libzutil.h
lib/libzfs/libzfs.abi
lib/libzfs/libzfs_sendrecv.c
lib/libzutil/Makefile.am
lib/libzutil/os/linux/zutil_setproctitle.c [new file with mode: 0644]
man/man8/zfs-send.8
tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_006_pos.ksh