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

Add support for nvme based devids #7356

Merged
merged 1 commit into from
Mar 30, 2018
Merged

Add support for nvme based devids #7356

merged 1 commit into from
Mar 30, 2018

Conversation

don-brady
Copy link
Contributor

Description

Adds a devid for nvme devices. This is very similar to how the other 'bus' (scsi|sata|usb) devids are generated. The devid resides in a name/value pair in the leaf vdevs in a zpool config.

Motivation and Context

The ZED logic uses the devid for matching devices for operations like auto-online. The device ID is also useful for matching a zfs device with devices seen by libudev.

How Has This Been Tested?

ztest
zfs test suite: functional/fault tests
manual testing, as in:

$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 111.8G  0 disk 
├─sda1        8:1    0   511M  0 part /boot/efi
├─sda2        8:2    0    16G  0 part [SWAP]
└─sda3        8:3    0  84.1G  0 part /
nvme0n1     259:0    0 238.5G  0 disk 

$ sudo zpool create expresso nvme0n1
$ sudo zdb -C expresso | grep -E "path|devid"
                path: '/dev/nvme0n1p1'
                devid: 'nvme-INTEL_SSDPEKKW256G7_BTPY722506V2256D-part1'
                phys_path: 'pci-0000:3c:00.0-nvme-1'

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:

  • My code follows the ZFS on Linux code style requirements.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • All commit messages are properly formatted and contain Signed-off-by.
  • Change has been approved by a ZFS on Linux member.

Signed-off-by: Don Brady <don.brady@delphix.com>
@codecov
Copy link

codecov bot commented Mar 29, 2018

Codecov Report

Merging #7356 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7356      +/-   ##
==========================================
- Coverage   76.28%   76.25%   -0.04%     
==========================================
  Files         329      329              
  Lines      104191   104193       +2     
==========================================
- Hits        79483    79453      -30     
- Misses      24708    24740      +32
Flag Coverage Δ
#kernel 76.04% <ø> (-0.19%) ⬇️
#user 65.47% <100%> (-0.16%) ⬇️

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 668173b...50bfc3f. Read the comment docs.

@behlendorf behlendorf merged commit 99f505a into openzfs:master Mar 30, 2018
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Apr 16, 2018
Adds a devid for nvme devices. This is very similar to how the
other 'bus' (scsi|sata|usb) devids are generated. The devid 
resides in a name/value pair in the leaf vdevs in a zpool config.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Don Brady <don.brady@delphix.com>
Closes openzfs#7356
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request May 4, 2018
Adds a devid for nvme devices. This is very similar to how the
other 'bus' (scsi|sata|usb) devids are generated. The devid 
resides in a name/value pair in the leaf vdevs in a zpool config.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Don Brady <don.brady@delphix.com>
Closes openzfs#7356
tonyhutter pushed a commit that referenced this pull request May 10, 2018
Adds a devid for nvme devices. This is very similar to how the
other 'bus' (scsi|sata|usb) devids are generated. The devid
resides in a name/value pair in the leaf vdevs in a zpool config.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Don Brady <don.brady@delphix.com>
Closes #7356
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants