From owner-freebsd-bugs@FreeBSD.ORG Mon Jan 27 20:30:01 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.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 946A912B for ; Mon, 27 Jan 2014 20:30:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7448E1E03 for ; Mon, 27 Jan 2014 20:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s0RKU1Sn044226 for ; Mon, 27 Jan 2014 20:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id s0RKU1Ig044225; Mon, 27 Jan 2014 20:30:01 GMT (envelope-from gnats) Date: Mon, 27 Jan 2014 20:30:01 GMT Message-Id: <201401272030.s0RKU1Ig044225@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Christopher Harrison Subject: Re: kern/184092: zfs zvol devices are not appearing till after reimport of pool X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Christopher Harrison List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jan 2014 20:30:01 -0000 The following reply was made to PR kern/184092; it has been noted by GNATS. From: Christopher Harrison To: d@delphij.net, freebsd-gnats-submit@FreeBSD.org Cc: Andriy Gapon Subject: Re: kern/184092: zfs zvol devices are not appearing till after reimport of pool Date: Mon, 27 Jan 2014 14:29:07 -0600 This is a multi-part message in MIME format. --------------030209090805040302020101 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I was not able to get the code patch to apply cleanly. I do support the idea of a devfs hook. I think the devfs hook is a lot cleaner and reduces the need to make sure the devnode is created/destroyed after every update to the zvols. -C On 11/19/13 12:50, Xin Li wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > I think Andriy (cc'ed) have fixed a similar issue. A quick glance at > the code suggests maybe we can use something like this: > > > Index: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c > =================================================================== > - --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c > (revision 258350) > +++ sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c > (working copy) > @@ -3298,6 +3298,10 @@ zfs_ioc_clone(const char *fsname, nvlist_t *innvl, > if (error != 0) > (void) dsl_destroy_head(fsname); > } > +#ifdef __FreeBSD__ > + if (error == 0) > + zvol_create_minors(fsname); > +#endif > return (error); > } > > Can you confirm if this helps? > > (I think we should use a better way to trigger zvol_create_minor, > maybe via a devfs lookup hook?) > > Cheers, > -----BEGIN PGP SIGNATURE----- > > iQIcBAEBCgAGBQJSi7L6AAoJEJW2GBstM+nsU7IQAKJhuls5BEXXsvp8SsoJDZ1x > 7SK4BP27cIF++hqzf4DVyP5OJEXFivFBgmbbdcS2q91X4ZR7kwdp/c7PWLArrtLO > uQkQaeFpr5xvZsro6n58zVqjFc6ItaEZ0RWsv82Rqx9lVX8INb3Z/AneM2HXVXkX > GDPTCf17bsxcgsxeCXgirpYYO4bOnUlTCNNmBSR62BNvQRNHwrTO+wVRVLGkZ4JK > /y0GtiE2P1xhGq24XNswGqlmZPwBZHvqrvMXM1BjAdW2/kKuzWQ2HA9nflSGFK5k > V502qe+fZXK4p227/9To1XfNIDC2GnONfvYOjqJigwjvd+2zENVxyLphHowfQpkw > qWOgQ7b8nHc5GzjkWRJIJVm1JJHSHfAyH3VRwHBkEOGv0qs/ScM3x9mjaeqSb5Uu > cIAF2vMt9gDfvgsV1fL0y33qOGFMFqPW7E0oOPGHrDMRQPUsGAeItUWCppbxmnVD > HkCbPxYiH3EoFXULT8kX5gthRpbl1IveEluGGFITPxYsj1XmUvmQPBSkJPauoTvZ > 0Aoe306mfuad8gmCBxpSCqTs9cvQrzeOvfc3bMKSLmSCbZ7SfnwG1EVGUMiX1DI9 > 1ugyRXHPlCZ/59HsEDym+Jlz/cqijo+dFykgjllwiwQtgzQSAhlaiyXjVZIxhfKL > EgIpjuU+stDV10DsEwow > =jwi6 > -----END PGP SIGNATURE----- --------------030209090805040302020101 Content-Type: text/x-vcard; charset=utf-8; name="harrison.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="harrison.vcf" begin:vcard fn:Christopher Harrison n:Harrison;Christopher org:Great Lakes SAN, LLC adr;dom:;;518 Holly Ave;Madison;Wi;53711 email;internet:harrison@glsan.com title:CEO tel;work:608.347.6967 version:2.1 end:vcard --------------030209090805040302020101--