From owner-freebsd-fs@FreeBSD.ORG Thu Jul 28 12:49:28 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E89C6106564A; Thu, 28 Jul 2011 12:49:28 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com [209.85.218.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8495F8FC14; Thu, 28 Jul 2011 12:49:28 +0000 (UTC) Received: by yic13 with SMTP id 13so2251290yic.13 for ; Thu, 28 Jul 2011 05:49:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=M5WN/R5T0gaVem4blEAcqF4ORKMuqRPlNcvPr8LJWvM=; b=V2zAZL77MR3xgfYEmOENxwUCVLmg3Q3Oxljs8sXmN86VVIDNsIXJSfxwqOo9brc+eO wCVRRiuTlKeEnWlqWgBvnRrpAn9Fl2GnUqNjsdC3RzUmkea5ZMzmMZ2cfKhQo3/A5Qml /sl67+ociHu/EWz05P7W8BRyA3kylNeDfTlNw= Received: by 10.100.233.21 with SMTP id f21mr734003anh.83.1311857367877; Thu, 28 Jul 2011 05:49:27 -0700 (PDT) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.100.198.5 with HTTP; Thu, 28 Jul 2011 05:48:47 -0700 (PDT) In-Reply-To: <4E3154E0.1030206@FreeBSD.org> References: <4E3154E0.1030206@FreeBSD.org> From: Ivan Voras Date: Thu, 28 Jul 2011 14:48:47 +0200 X-Google-Sender-Auth: pOKrl9paXayALItLrjGF-XMzFjQ Message-ID: To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 Cc: freebsd-fs@freebsd.org Subject: Re: ZFS how to find out if ZIL is currently enabled? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jul 2011 12:49:29 -0000 On 28 July 2011 14:24, Andriy Gapon wrote: > on 28/07/2011 14:32 Ivan Voras said the following: >> Grepping for "zil" in sysctls doesn't give anything useful: >> >> # sysctl -a | grep zil >> vfs.zfs.zil_replay_disable: 0 >> >> (its description is "Disable intent logging replay" so it looks like a >> crash recovery option) >> >> ... so is there a way to find out if ZIL is enabled? >> >> I can look at kenv but for some reason I can't trust its value right now. > > Here is a hammer: kgdb. > But perhaps there is a more suitable tool :) Hmmm, no, it looks like the zil_disable code is missing in the latest 8-stable! This confirmes what I noticed in operation and why I didn't trust kenv. >From the various csup dates I have on the servers it looks like it's been removed somewhere between April and now, possibly with ZFS 28 MFC? I.e. this code is missing: *:/sys> grep -rn zil_disable * cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h:382:extern int zil_disable; cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c:897: if (zil_disable) { cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c:69:int zil_disable = 0; /* disable intent logging */ cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c:71:TUNABLE_INT("vfs.zfs.zil_disable", &zil_disable); cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c:72:SYSCTL_INT(_vfs_zfs, OID_AUTO, zil_disable, CTLFLAG_RW, &zil_disable, 0, cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c:450: if (bp->bio_cmd == BIO_FLUSH && !zil_disable) Any ideas?