Skip to content

Conversation

trick2011
Copy link
Contributor

@trick2011 trick2011 commented Sep 16, 2025

Modified all instances that refer to the existing vdev by device to vdev in zpool attach, in order to clarify usage.

Fixes bug report #17734
Added changes to cmd/zpool/zpool_main.c, functions get_usage() and zpool_do_attach() as requested in #17737

This commit fixes unclear usage of device when referring to the existing vdev in zpool attach manpage.

Motivation and Context

This fixes open issue #17734

When looking up the parameters to use for zpool attach, the meaning of "device" in the parameter description is unclear/ambiguous. The name "device" refers to a vdev in the pool and as such it is clearer to refer to it as such as the intent, attaching a new device to an existing vdev, is communicated more clearly this way.

Description

How Has This Been Tested?

Opened using man and visually checked

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)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@github-actions github-actions bot added the Status: Work in Progress Not yet ready for general review label Sep 16, 2025
@trick2011 trick2011 marked this pull request as ready for review September 17, 2025 08:32
@github-actions github-actions bot added Status: Code Review Needed Ready for review and testing and removed Status: Work in Progress Not yet ready for general review labels Sep 17, 2025
@trick2011 trick2011 changed the title Patch 2 Update zpool-attach.8 Sep 19, 2025
@trick2011 trick2011 changed the title Update zpool-attach.8 Clarify zpool-attach CLI usage Sep 19, 2025
@tonyhutter
Copy link
Contributor

To silence the checkpatch warning, you'll need to squash your commits and rebase on master. Start by doing:

git checkout patch-2
git rebase -i master

You'll see something like this:

pick faf2db343 Shellcheck.am: add silent rules for shellcheck and checkbashisms  
pick 45ac6045c mancheck: allow single files                                      
pick d36684201 man: add silent rules for mancheck                                
pick 1d2d81298 Refactor `zhack label repair` and fix `-c` regression on nonzero TXG
pick ffe93aee0 Add `typeset`s to `zhack label repair` test scripts               
pick ab93b4b70 linux/super: add tunable to request immediate reclaim of unused inodes
pick ab8cc63c7 linux/super: add tunable to request immediate reclaim of unused dentries
pick 3387d3409 Fix atomic-alignment warnings in libspl on FreeBSD/i386           
pick 545d66204 Fix a printf format specifier on FreeBSD/i386                     
pick 6ba51da93 contrib: dracut: always include zfs kernel module  

Now, we'll take your two code changes and squash them into a single commit on top of master. So delete all lines except your two commits with changes, like:

pick cd81c1152 Fixes bug report #17734                                           
pick 55379cc4c Updated get_usage and zpool_do_attach                             

Then replace the "pick" in the lines with this:

r cd81c1152 Fixes bug report #17734                                           
s 55379cc4c Updated get_usage and zpool_do_attach                             

This will squash (s) 55379cc into cd81c11 so they're a single commit, and then lets you re-word (r) the commit message. You'll want to add a Fixes line to your commit message to call out the original bug. So your commit message might look like:

Use "vdev" instead of "devices" when referring to vdevs                          
                                                                                 
Update documentation to use the correct terminology.                             
                                                                                 
Fixes: #17734                                                                    
Signed-off-by: trick2011 <[email protected]> 

Lastly, force push out the new commit to your patch-2 branch:

git push --force

@tonyhutter
Copy link
Contributor

You'll want to edit your commit message to get rid of these old lines:

Use "vdev" instead of "devices" when referring to vdevs

Update documentation to use the correct terminology.

Fixes: https://github.com/openzfs/zfs/issues/17734
Signed-off-by: trick2011 <[email protected]>
-
- Updated get_usage and zpool_do_attach
-
- Signed-off-by: trick2011 <[email protected]>

You can edit an existing commit message with git commit --amend. When you're done editing, you can force push the changes with git push --force.

Update documentation to use the correct terminology.

Fixes: openzfs#17734
Signed-off-by: trick2011 <[email protected]>
@behlendorf behlendorf merged commit 876f705 into openzfs:master Sep 23, 2025
22 of 25 checks passed
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Sep 23, 2025
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.

3 participants