From owner-svn-src-all@FreeBSD.ORG Thu Dec 25 21:32:55 2014 Return-Path: Delivered-To: svn-src-all@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 575191F9 for ; Thu, 25 Dec 2014 21:32:55 +0000 (UTC) Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) (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 DAF4736D0 for ; Thu, 25 Dec 2014 21:32:54 +0000 (UTC) Received: by mail-wi0-f176.google.com with SMTP id ex7so16059852wid.3 for ; Thu, 25 Dec 2014 13:32:53 -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=hAXGjiSxydq8/wNG+qtlkJSLTm3x7NLEzXtshVCSyy9TXm+ghL3Rew0NCOVbPxu6cY jVGqYw7tTlwnNCPJWPp4vyioDjZcmXro1tiLCc6S/aElj2+KJ/iXM4nGvOZhVhFgI4sp ePAnJEQlUIgOWqTcmX9iaB9mcWxIkIruhk9LcJ5Kv1BmzoVctd9YhOBqMqBKeoaG6pDH jBpeJy9OhrMNzmhbJP35nm6USU58kPwHDZb9M192cFFSZvG7ipap3mSrt9zzUEyvxsij Zi6mU+7V4CqsqF+b3G3hEZ4d0bbGU+y5d7im/hIob5St4UGpxNN++rqYCqmP09S/njAU 7J/g== X-Gm-Message-State: ALoCoQleEm33iOv9qQORw1u7CaVf/PuC5FJAjqqt7dQ2sOq9FKEqZ9MiFCNSXrEC4secAqdzJCCK 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2014 21:32:55 -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); >