From nobody@FreeBSD.org  Sat Jan 18 03:06:23 2014
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id A28E3155
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 18 Jan 2014 03:06:23 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 903B114A2
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 18 Jan 2014 03:06:23 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id s0I36MfV017575
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 18 Jan 2014 03:06:23 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id s0I36MdS017553;
	Sat, 18 Jan 2014 03:06:22 GMT
	(envelope-from nobody)
Message-Id: <201401180306.s0I36MdS017553@oldred.freebsd.org>
Date: Sat, 18 Jan 2014 03:06:22 GMT
From: Irwin <biatche@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: zvol clone can't see new device
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         185858
>Category:       kern
>Synopsis:       [zfs] zvol clone can't see new device
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    smh
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 18 03:10:00 UTC 2014
>Closed-Date:    
>Last-Modified:  Mon Apr 07 10:25:48 UTC 2014
>Originator:     Irwin
>Release:        10-rc4
>Organization:
>Environment:
FreeBSD ztest.lan 10.0-RC4 FreeBSD 10.0-RC4 #0 r260130: Tue Dec 31 17:10:01 UTC 2013     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
device is not there until reboot

root@ztest:~ # zfs snapshot ziege/targets/test1/c@140118-0446

root@ztest:~ # zfs clone -p ziege/targets/test1/c@140118-0446 ziege/targets/test1/pc1-c-140118-0446
root@ztest:~ # zfs clone -p ziege/targets/test1/c@140118-0446 ziege/targets/test1/pc2-c-140118-0446 
root@ztest:~ # zfs list
NAME                                    USED  AVAIL  REFER  MOUNTPOINT
ziege                                   100G  16.8G    31K  none
ziege/targets                           100G  16.8G    31K  none
ziege/targets/test1                     100G  16.8G    31K  none
ziege/targets/test1/c                   100G  99.3G  17.8G  -
ziege/targets/test1/c@140118-0446          0      -  17.8G  -
ziege/targets/test1/pc1-c-140118-0446     1K  16.8G  17.8G  -
ziege/targets/test1/pc2-c-140118-0446     1K  16.8G  17.8G  -
root@ztest:~ # ls -l /dev/zvol/ziege/targets/test1/   
total 0
crw-r-----  1 root  operator  0x88 Jan 18 11:42 c
crw-r-----  1 root  operator  0x9e Jan 18 04:46 c@140118-0446
crw-r-----  1 root  operator  0x9f Jan 18 04:46 c@140118-0446s1
crw-r-----  1 root  operator  0xa0 Jan 18 04:46 c@140118-0446s2
>How-To-Repeat:
root@ztest:~ # zfs snapshot ziege/targets/test1/c@140118-0446

root@ztest:~ # zfs clone -p ziege/targets/test1/c@140118-0446 ziege/targets/test1/pc1-c-140118-0446
root@ztest:~ # zfs clone -p ziege/targets/test1/c@140118-0446 ziege/targets

ls -l /dev/zvol/ziege/targets/test1/
(device not there)
>Fix:
reboot... but this is gonna cause problems

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Jan 19 17:27:49 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=185858 

From: Steve Modica <modica@small-tree.com>
To: bug-followup@FreeBSD.org,
 biatche@gmail.com
Cc:  
Subject: Re: kern/185858: [zfs] zvol clone can&#39;t see new device
Date: Fri, 28 Feb 2014 16:47:43 -0600

 It looks like this might relate back to this checkin:
 
 =
 https://github.com/joyent/illumos-joyent/commit/3b2aab18808792cbd248a12f1e=
 df139b89833c13
 
 --
 Steve Modica
 CTO -  Small Tree Communications
 www.small-tree.com
 
 
 
 
 

From: Matthew Ahrens <mahrens@delphix.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/185858: [zfs] zvol clone can&#39;t see new device
Date: Fri, 28 Feb 2014 15:41:07 -0800

 --bcaec520f69bc84d2a04f37ff83d
 Content-Type: text/plain; charset=ISO-8859-1
 
 I looked for differences between the illumos and FreeBSD code and found
 that zfs_ioc_create() has this:
 
 3310#ifdef __FreeBSD__
 3311 if (error == 0 && type == DMU_OST_ZVOL)
 3312 zvol_create_minors(fsname);
 3313#endif
 
 It seems like similar code would be needed in zfs_ioc_clone(), but isn't
 there.  The "type" (ZVOL vs ZPL filesystem) isn't as immediately available
 in zfs_ioc_clone(), so it might be a little tricker to add the code to
 zfs_ioc_clone().
 
 --matt
 
 --bcaec520f69bc84d2a04f37ff83d
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 <div dir=3D"ltr"><div>I looked for differences between the illumos and Free=
 BSD code and found that zfs_ioc_create() has this:</div><div><br></div><div=
 >3310#ifdef __FreeBSD__</div><div>3311<span class=3D"" style=3D"white-space=
 :pre">	</span>if (error =3D=3D 0 &amp;&amp; type =3D=3D DMU_OST_ZVOL)</div>
 <div>3312<span class=3D"" style=3D"white-space:pre">		</span>zvol_create_mi=
 nors(fsname);</div><div>3313#endif</div><div><br></div><div>It seems like s=
 imilar code would be needed in zfs_ioc_clone(), but isn&#39;t there. =A0The=
  &quot;type&quot; (ZVOL vs ZPL filesystem) isn&#39;t as immediately availab=
 le in zfs_ioc_clone(), so it might be a little tricker to add the code to z=
 fs_ioc_clone().</div>
 <div><br></div><div>--matt</div></div>
 
 --bcaec520f69bc84d2a04f37ff83d--

From: Aragon Gouveia <aragon@phat.za.net>
To: bug-followup@FreeBSD.org, biatche@gmail.com
Cc:  
Subject: Re: kern/185858: [zfs] zvol clone can't see new device
Date: Mon, 07 Apr 2014 10:28:11 +0200

 FYI, this is a dupe of kern/178999.
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=178999
Responsible-Changed-From-To: freebsd-fs->smh 
Responsible-Changed-By: smh 
Responsible-Changed-When: Mon Apr 7 10:25:23 UTC 2014 
Responsible-Changed-Why:  
I'll take it 

http://www.freebsd.org/cgi/query-pr.cgi?pr=185858 
>Unformatted:
