Page MenuHomeFreeBSD

Set process title during zfs send
ClosedPublic

Authored by sef on Feb 13 2019, 9:40 PM.

Details

Summary

This adds an option to zfs send ("-V"), which will set the process title to the progress during a send.

This code has been in FreeNAS for a while.

Test Plan

man zfs (to check for man page changes)
Do a "zfs send -V" on a dataset and check process via ps.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sef created this revision.Feb 13 2019, 9:40 PM

Ah I didn't realized that we haven't upstreamed it & thanks for forward-porting it for so many years...

sef added a comment.Feb 13 2019, 9:57 PM

Ah I didn't realized that we haven't upstreamed it & thanks for forward-porting it for so many years...

I need to figure out autoconf some more so I can make a PR for ZoL.

sef updated this revision to Diff 53903.Feb 14 2019, 1:21 AM

I diff'd the wrong source tree. I just made sure this one built, and produced the correct results, e.g.

root 1314 102.1 0.0 17036 5864 0 R+ 17:19 0:18.03 zfs: sending zroot/FreeBSD@PRE-REBASE (1%: 1636820568/108027195912) (zfs)

bcr accepted this revision.Feb 14 2019, 9:27 AM
bcr added a subscriber: bcr.

Looks good from manpages. I guess bumping the .Dd to the date of the commit does not hurt.
I look forward to that feature. Thanks!

This revision is now accepted and ready to land.Feb 14 2019, 9:27 AM
sef updated this revision to Diff 53976.Feb 15 2019, 6:54 PM

Update the man page date.

This revision now requires review to proceed.Feb 15 2019, 6:54 PM

This might be a dumb question, but does the process title change often enough that setproctitle_fast() added in rS335939 should be used?

sef added a comment.Feb 17 2019, 8:44 PM

This might be a dumb question, but does the process title change often enough that setproctitle_fast() added in rS335939 should be used?

It changes it once per second, so I don't think the overhead is terribly high.

I hope this review isn't waiting on my feedback, since I just had a question that was answered. I can't actually review the code.

mav added a reviewer: ZFS.Feb 25 2019, 7:26 PM
sef updated this revision to Diff 54384.Feb 25 2019, 11:16 PM

mav pointed out that I'd missed the same changes to zfs_send_resume.

mav accepted this revision.Feb 26 2019, 4:23 AM

I have no more objections.

This revision is now accepted and ready to land.Feb 26 2019, 4:23 AM
This revision was automatically updated to reflect the committed changes.