Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix zfs send progress reporting #10216

Merged
merged 1 commit into from
Apr 20, 2020
Merged

Commits on Apr 17, 2020

  1. fix zfs send progress reporting

    The progress of a send is supposed to be reported by `zfs send -v`, but
    it is not.  This works by creating a new user thread (with
    pthread_create()) which does ZFS_IOC_SEND_PROGRESS ioctls to check how
    much progress has been made.  This IOCTL finds the specified send (since
    there may be multiple concurrent sends in the system).  The IOCTL also
    checks that the specified send was started by the current process.
    
    On Linux, different threads of the same process are represented as
    different `struct task_struct`s (and, confusingly, have different
    PID's).  To check if if two threads are in the same process, we need to
    check if they have the same `struct task_struct:group_leader`.
    
    We used to to this correctly, but it was inadvertently changed by
    30af21b (Redacted Send) to simply check if the current
    `struct task_struct` is the one that started the send.
    
    This commit changes the code back to checking if the send was started by
    a `struct task_struct` with the same `group_leader` as the calling
    thread.
    
    Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
    Closes openzfs#10215
    ahrens committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    5faa566 View commit details
    Browse the repository at this point in the history