From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 21:27:54 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6717BF18 for ; Thu, 25 Dec 2014 21:27:54 +0000 (UTC) Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E6CF935EB for ; Thu, 25 Dec 2014 21:27:52 +0000 (UTC) Received: by mail-wg0-f44.google.com with SMTP id b13so13491522wgh.3 for ; Thu, 25 Dec 2014 13:27:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=CGWwTkcjhIA+/ENlQXwzDiDJHERM0x6h6B17tpnGmIE=; b=ZaWxCUb2Yho8Hn2ZBm29XtQejyFU3n6Gq++oluMDnVIafJTgn3b8cg6CVrS7YRBsfb DOnvZL9CIhLrw4v+BJxjUHgrGqBCmX9+fQ1L/FOs+8k27TkZMWWaYyDxuIJMhVDRByVv xIw0RKFtoJQn0tWKPRzeG9L25VUYqznOxLlzn+a0neCaROM0ljQwXhFH44VDqnaDVfsz NQaBfvM+3V7NkdqIExbx9Oko/fbEV/WyZFRoQ8dkKzQzF0PmosNIaulP+YFrAULRau1o OcA1qQDAg3SDVkzQ89Z5eJ9gIdRRKg/fvRMAs+5NvJtfd+wBb0Zf6ErMJnXwm5MCV9Em 2qSw== X-Gm-Message-State: ALoCoQmkSr+9PIEYabY7TW9QEnEceF46uCJc8mXxmq4vpVWdx3+4e18zN1VcNevmT9G8tD77lN3i X-Received: by 10.194.57.43 with SMTP id f11mr73387057wjq.6.1419542871231; Thu, 25 Dec 2014 13:27:51 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id n3sm26021083wiw.5.2014.12.25.13.27.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Dec 2014 13:27:50 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Message-ID: <549C8149.5000002@freebsd.org> Date: Thu, 25 Dec 2014 21:27:37 +0000 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Will Andrews Subject: Re: svn commit: r276123 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs References: <201412230931.sBN9VPMK017968@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 21:27:54 -0000 I checked when I initially investigated the issue and it was added when ZFS boot support was originally incorporated into Solaris. FreeBSD's ZFS boot support outstrips illumos upstream, not even requiring the cache file, and when initially discussed with others it was thought the most likely reason for the conditional was some sort of incompatibility with their original implementation. I've already raised the issue upstream (https://www.illumos.org/issues/5472) so if anything comes of that I'll update. In the mean time I've not been able to produce any issues with the change, even after sitting in our production tree for a number of months, and it does fix the issues reported by others due to out of date cache files. Regards Steve On 25/12/2014 21:10, Will Andrews wrote: > Why was the original condition there? It may not be documented in a > commenf, but presumably there is a reason. Did you ask the original > author of the code in question? > > --Will. > > > On Tuesday, December 23, 2014, Steven Hartland > wrote: > > Author: smh > Date: Tue Dec 23 09:31:24 2014 > New Revision: 276123 > URL: https://svnweb.freebsd.org/changeset/base/276123 > > Log: > Always sync the global ZFS config cache to reflect the new mosconfig > > This fixes out of date zpool.cache for root pools, which can > cause issues > such as confusion of zdb etc. > > MFC after: 1 month > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c > ============================================================================== > --- > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c > Tue Dec 23 08:51:30 2014 (r276122) > +++ > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c > Tue Dec 23 09:31:24 2014 (r276123) > @@ -536,8 +536,7 @@ spa_config_update(spa_t *spa, int what) > /* > * Update the global config cache to reflect the new > mosconfig. > */ > - if (!spa->spa_is_root) > - spa_config_sync(spa, B_FALSE, what != > SPA_CONFIG_UPDATE_POOL); > + spa_config_sync(spa, B_FALSE, what != SPA_CONFIG_UPDATE_POOL); > > if (what == SPA_CONFIG_UPDATE_POOL) > spa_config_update(spa, SPA_CONFIG_UPDATE_VDEVS); >