Project

General

Profile

Actions

Feature #2703

closed

add mechanism to report ZFS send progress

Added by Bill Pijewski over 11 years ago. Updated over 11 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2012-05-08
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

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.

Actions #1

Updated by Bill Pijewski over 11 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.

Webrev here:

http://gmk3zqaa.joyent.us/webrevs/illumos-2703-webrev/

Actions #2

Updated by Eric Schrock over 11 years ago

  • Status changed from New to Resolved

changeset: 13686:4bc0783f6064
tag: tip
user: Bill Pijewski <>
date: Wed May 09 15:05:14 2012 -0700

description:
2703 add mechanism to report ZFS send progress
Reviewed by: Matt Ahrens <>
Reviewed by: Robert Mustacchi <>
Reviewed by: Richard Lowe <>
Approved by: Eric Schrock <>

modified:
usr/src/cmd/truss/codes.c
usr/src/cmd/zfs/zfs_main.c
usr/src/lib/libzfs/common/libzfs.h
usr/src/lib/libzfs/common/libzfs_sendrecv.c
usr/src/lib/libzpool/common/sys/zfs_context.h
usr/src/man/man1m/zfs.1m
usr/src/uts/common/fs/zfs/dmu_send.c
usr/src/uts/common/fs/zfs/dsl_dataset.c
usr/src/uts/common/fs/zfs/sys/dmu.h
usr/src/uts/common/fs/zfs/sys/dmu_impl.h
usr/src/uts/common/fs/zfs/sys/dsl_dataset.h
usr/src/uts/common/fs/zfs/zfs_ioctl.c
usr/src/uts/common/sys/fs/zfs.h

Actions

Also available in: Atom PDF