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

Import the arcstat(1m) manpage from illumos #10288

Closed
wants to merge 4 commits into from

Conversation

strugee
Copy link
Contributor

@strugee strugee commented May 4, 2020

Motivation and Context

This manpage is missing; this commit just imports it straight from upstream illumos (in this case illumos really is upstream because the original repo points to illumos-gate as the canonical repository).

See #10287

Description

See above. The only change was moving the manpage from section 1m to section 1 for consistency.

I imported this from illumos commit illumos/illumos-gate@f34d737#diff-c09ae939146892afff0190f8f64fd996, which was the latest commit in the file's history. It kinda seemed like this might count as an OpenZFS patch port, except that none of the commits that touch the illumos file really have a subject line that has anything to do with this manpage, so none of them are really suitable for describing the change. Therefore I treated the commit as a new change instead - if that's not right let me know and I can amend!

How Has This Been Tested?

I did not test this in any way; however, the one thing I need to go do is diff the illumos version of this script with our local copy, to determine if the flags described in this manual page (which I literally have not yet read) have diverged.

Also, I disabled buildbot behavior for this commit on the assumption that STYLE buildbots only do style analysis of code and not manpages - if that isn't right, then I can amend that too.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

(I deleted some irrelevant checklist items since this doesn't involve actual code.)

@strugee
Copy link
Contributor Author

strugee commented May 4, 2020

So, looking at the version control history for this file, it appears that the comment header in cmd/arcstat/arcstat is lying. The original is now maintained as part of illumos and is a Perl script. However, our copy (introduced in 7634cd5) is a Python script that originates from FreeNAS (see truenas/middleware@e2c29f8).

Therefore I'm just going to manually review the manpage and fix it up to match the Python version we have. While I'm at it I'll fix the lying comment header too.

man/man1/arcstat.1 Outdated Show resolved Hide resolved
man/man1/arcstat.1 Outdated Show resolved Hide resolved
@strugee strugee marked this pull request as ready for review May 4, 2020 08:04
cmd/arcstat/arcstat Outdated Show resolved Hide resolved
@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label May 5, 2020
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! You're also going to need to add arcstat.1 to the dist_man_MANS sections of man/man1/Makefile.am. Otherwise it won't be included in the make dist tarball.

man/man1/arcstat.1 Outdated Show resolved Hide resolved
man/man1/arcstat.1 Outdated Show resolved Hide resolved
man/man1/arcstat.1 Outdated Show resolved Hide resolved
man/man1/arcstat.1 Outdated Show resolved Hide resolved
man/man1/arcstat.1 Outdated Show resolved Hide resolved
@strugee
Copy link
Contributor Author

strugee commented May 7, 2020

@behlendorf done, thanks! I appreciate the review 👍

Note that I reordered the commits since logically it makes more sense to fix the capitalization of the -v output and then introduce a manpage that matches the fixed output.

man/man1/arcstat.1 Outdated Show resolved Hide resolved
Signed-off-by: AJ Jordan <alex@strugee.net>
And move it from section 1m to section 1 for consistency.

Imported from illumos commit f34d737f.

Signed-off-by: AJ Jordan <alex@strugee.net>
Ref openzfs#10287
Turns out the illumos manpage, which is what this originates from, was
written for the original Perl version of the utility which is not the
version in the OpenZFS tree. *That* version originates from a Python
rewrite that was done for FreeNAS. So fix up the manpage to match what
we actually ship (and fix a few typos in the process).

Signed-off-by: AJ Jordan <alex@strugee.net>
Ref openzfs#10287
Signed-off-by: AJ Jordan <alex@strugee.net>
@strugee
Copy link
Contributor Author

strugee commented May 8, 2020

Done!

@codecov-io
Copy link

codecov-io commented May 9, 2020

Codecov Report

Merging #10288 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10288      +/-   ##
==========================================
- Coverage   79.56%   79.56%   -0.01%     
==========================================
  Files         389      389              
  Lines      123296   123296              
==========================================
- Hits        98105    98096       -9     
- Misses      25191    25200       +9     
Flag Coverage Δ
#kernel 79.88% <ø> (-0.08%) ⬇️
#user 66.53% <ø> (+0.83%) ⬆️
Impacted Files Coverage Δ
cmd/zdb/zdb_il.c 30.86% <0.00%> (-24.08%) ⬇️
module/os/linux/spl/spl-kmem-cache.c 75.22% <0.00%> (-9.95%) ⬇️
module/zfs/spa_errlog.c 90.83% <0.00%> (-3.06%) ⬇️
module/zfs/lzjb.c 98.14% <0.00%> (-1.86%) ⬇️
module/zfs/spa_log_spacemap.c 93.12% <0.00%> (-1.15%) ⬇️
module/os/linux/zfs/vdev_disk.c 83.27% <0.00%> (-1.10%) ⬇️
cmd/zdb/zdb.c 81.99% <0.00%> (-0.67%) ⬇️
lib/libzutil/os/linux/zutil_import_os.c 78.07% <0.00%> (-0.67%) ⬇️
module/zfs/zil.c 91.33% <0.00%> (-0.57%) ⬇️
module/zfs/spa.c 86.93% <0.00%> (-0.55%) ⬇️
... and 48 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d775c86...e022fb9. Read the comment docs.

@behlendorf behlendorf requested a review from rlaager May 9, 2020 17:47
Copy link
Member

@rlaager rlaager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I didn't extensively review this or anything, but I don't see anything immediately wrong here.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels May 11, 2020
behlendorf pushed a commit that referenced this pull request May 11, 2020
And move it from section 1m to section 1 for consistency.

Imported from illumos commit f34d737f.

Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: AJ Jordan <alex@strugee.net>
Closes #10288
behlendorf pushed a commit that referenced this pull request May 11, 2020
Turns out the illumos manpage, which is what this originates from, was
written for the original Perl version of the utility which is not the
version in the OpenZFS tree. *That* version originates from a Python
rewrite that was done for FreeNAS. So fix up the manpage to match what
we actually ship (and fix a few typos in the process).

Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: AJ Jordan <alex@strugee.net>
Closes #10288
behlendorf pushed a commit that referenced this pull request May 11, 2020
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: AJ Jordan <alex@strugee.net>
Closes #10288
as-com pushed a commit to as-com/zfs that referenced this pull request Jun 20, 2020
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: AJ Jordan <alex@strugee.net>
Closes openzfs#10288
(cherry picked from commit 2b21da4)
as-com pushed a commit to as-com/zfs that referenced this pull request Jun 20, 2020
And move it from section 1m to section 1 for consistency.

Imported from illumos commit f34d737f.

Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: AJ Jordan <alex@strugee.net>
Closes openzfs#10288
(cherry picked from commit ac806a2)
as-com pushed a commit to as-com/zfs that referenced this pull request Jun 20, 2020
Turns out the illumos manpage, which is what this originates from, was
written for the original Perl version of the utility which is not the
version in the OpenZFS tree. *That* version originates from a Python
rewrite that was done for FreeNAS. So fix up the manpage to match what
we actually ship (and fix a few typos in the process).

Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: AJ Jordan <alex@strugee.net>
Closes openzfs#10288
(cherry picked from commit 5a04b17)
as-com pushed a commit to as-com/zfs that referenced this pull request Jun 20, 2020
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: AJ Jordan <alex@strugee.net>
Closes openzfs#10288
(cherry picked from commit b29e31d)
@strugee strugee deleted the arcstat-manpage branch November 29, 2020 01:34
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: AJ Jordan <alex@strugee.net>
Closes openzfs#10288
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
And move it from section 1m to section 1 for consistency.

Imported from illumos commit f34d737f.

Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: AJ Jordan <alex@strugee.net>
Closes openzfs#10288
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
Turns out the illumos manpage, which is what this originates from, was
written for the original Perl version of the utility which is not the
version in the OpenZFS tree. *That* version originates from a Python
rewrite that was done for FreeNAS. So fix up the manpage to match what
we actually ship (and fix a few typos in the process).

Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: AJ Jordan <alex@strugee.net>
Closes openzfs#10288
jsai20 pushed a commit to jsai20/zfs that referenced this pull request Mar 30, 2021
Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: AJ Jordan <alex@strugee.net>
Closes openzfs#10288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants