Bug 224965

Summary: gpart: should append the partition name to the underlying provider's physical path
Product: Base System Reporter: Alan Somers <asomers>
Component: kernAssignee: Alan Somers <asomers>
Status: Closed FIXED    
Severity: Affects Some People Flags: asomers: mfc-stable11+
asomers: mfc-stable10-
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 224963    

Description Alan Somers freebsd_committer freebsd_triage 2018-01-07 03:34:24 UTC
A gpart partition should append its partition name "p1, s1, p1s1, etc" to the physical path of the whole disk.
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-02-14 20:26:47 UTC
A commit references this bug:

Author: asomers
Date: Wed Feb 14 20:26:10 UTC 2018
New revision: 329275
URL: https://svnweb.freebsd.org/changeset/base/329275

Log:
  gpart: append partition name to the underlying provider's physical path

  If the underlying provider's physical path is null, then the gpart device's
  physical path will be, too. Otherwise, it will append the partition name,
  such as "/p1" or "/s1/a". This will make gpart work better with zfsd(8).

  PR:		224965
  MFC after:	3 weeks
  Differential Revision:	https://reviews.freebsd.org/D14010

Changes:
  head/sys/geom/part/g_part.c
  head/tests/sys/geom/class/Makefile
  head/tests/sys/geom/class/part/
  head/tests/sys/geom/class/part/Makefile
  head/tests/sys/geom/class/part/misc.sh
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-03-10 03:34:46 UTC
A commit references this bug:

Author: asomers
Date: Sat Mar 10 03:34:28 UTC 2018
New revision: 330733
URL: https://svnweb.freebsd.org/changeset/base/330733

Log:
  MFC r329273, r329275, r329277, r329284, r329344

  r329273:
  geli: append "/eli" to the underlying provider's physical path

  If the underlying provider's physical path is null, then the geli device's
  physical path will be, too. Otherwise, it will append "/eli".  This will make
  geli work better with zfsd(8).

  PR:		224962
  Differential Revision:	https://reviews.freebsd.org/D13979

  r329275:
  gpart: append partition name to the underlying provider's physical path

  If the underlying provider's physical path is null, then the gpart device's
  physical path will be, too. Otherwise, it will append the partition name,
  such as "/p1" or "/s1/a". This will make gpart work better with zfsd(8).

  PR:		224965
  Differential Revision:	https://reviews.freebsd.org/D14010

  r329277:
  Add mtree entry for 329275

  X-MFC-With:	329275
  Sponsored by:	Spectra Logic Corp

  r329284:
  zfsd: Allow zfsd to work on any type of GEOM provider

  cddl/usr.sbin/zfsd/zfsd_event.cc
  	Remove the check for da and ada devices.  This way zfsd can work on md,
  	geli, glabel, gstripe, etc devices.  geli in particular is useful
  	combined with ZFS.  gnop is also useful for simulating drive pulls in
  	the ZFSD test suite.

  	Also, eliminate the DevfsEvent class entirely.  Move its
  	responsibilities into GeomEvent.  We can get everything we need to know
  	just from listening to GEOM events.

  lib/libdevdctl/event.cc
  	Fix GeomEvent::DevName for CREATE events.  Oddly, the relevant field is
  	named "cdev" for CREATE events but "devname" for disk events.

  Relnotes:	Yes (probably worth mentioning the geli part)
  Sponsored by:	Spectra Logic Corp

  r329344:
  Optimize zfsd for the happy case

  If there are no damaged pools, then ignore all GEOM events.  We only use
  them to fix damaged pools.  However, still pay attention to ZFS events.

  X-MFC-With:	329284
  Sponsored by:	Spectra Logic Corp

Changes:
_U  stable/11/
  stable/11/cddl/usr.sbin/zfsd/case_file.cc
  stable/11/cddl/usr.sbin/zfsd/case_file.h
  stable/11/cddl/usr.sbin/zfsd/zfsd.cc
  stable/11/cddl/usr.sbin/zfsd/zfsd_event.cc
  stable/11/cddl/usr.sbin/zfsd/zfsd_event.h
  stable/11/etc/mtree/BSD.tests.dist
  stable/11/lib/libdevdctl/event.cc
  stable/11/sys/geom/eli/g_eli.c
  stable/11/sys/geom/part/g_part.c
  stable/11/tests/sys/geom/class/Makefile
  stable/11/tests/sys/geom/class/eli/Makefile
  stable/11/tests/sys/geom/class/eli/misc_test.sh
  stable/11/tests/sys/geom/class/part/
Comment 3 Alan Somers freebsd_committer freebsd_triage 2018-03-10 04:13:07 UTC
Little point to MFCing to stable/10, since stable/10 lacks zfsd.