add mechanism to report ZFS send progress
Following up on the work to estimate the size of a ZFS send stream, it'd be great to see the progress of the ZFS send operation as its being sent.
Updated by Bill Pijewski about 9 years ago
I've added a new command: ZFS_IOC_SEND_PROGRESS. This command can only be issued by the process which has started the "zfs send", and it takes the file descriptor to which the stream is being written (to distinguish the stream from other streams which this process may have started). That way, streams and their respective progress will not be visible to other processes.
When "zfs send" is invoked with -v, a second thread is spawned which queries ZFS_IOC_SEND_PROGRESS every second and reports how many bytes have been written. The ZFS_IOC_SEND_PROGRESS command does so by examining the offset_t associated with the stream.
Further enhancements are possible in reporting a percentage done, or reporting overall progress when using "zfs send -r", but this change sheds some light on send progress where before there was none.
Updated by Eric Schrock about 9 years ago
- Status changed from New to Resolved
user: Bill Pijewski <firstname.lastname@example.org>
date: Wed May 09 15:05:14 2012 -0700
2703 add mechanism to report ZFS send progress
Reviewed by: Matt Ahrens <email@example.com>
Reviewed by: Robert Mustacchi <firstname.lastname@example.org>
Reviewed by: Richard Lowe <email@example.com>
Approved by: Eric Schrock <Eric.Schrock@delphix.com>