From owner-freebsd-fs@FreeBSD.ORG Tue Oct 15 05:45:05 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BAD6EE7B for ; Tue, 15 Oct 2013 05:45:05 +0000 (UTC) (envelope-from matthew.ahrens@delphix.com) Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3EEDC234B for ; Tue, 15 Oct 2013 05:45:05 +0000 (UTC) Received: by mail-la0-f46.google.com with SMTP id eh20so6353038lab.5 for ; Mon, 14 Oct 2013 22:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=delphix.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ORhTp3Tg5cbggnO/TMORgiJU/gsWh6z+0Ewe/P1L5NE=; b=Ph9BcCR9vOjtKHJUvRIul7hHsBaiW/r2FXu0GFaPgq2tyAxX29fx5SYk6j/yQXvma8 ZpgqylmRiJn7BbuE5gqOrpV7nSvheVW1fRl/J6SyXs3By7YpmGMjZ0p8M6iAiHZHVqvb L1kHyi1l9svpYjnxIQAJD1YfzNtRtpWE44n2o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=ORhTp3Tg5cbggnO/TMORgiJU/gsWh6z+0Ewe/P1L5NE=; b=kovIACxjyt1lYzTt7rKv/j8TOmOQ7vxDgjbWO/iLiKyIRkwpl1SgF+lKRnax9c8Asu nbM292iY5Yh6ay4pkw+fRvduMenm6Wu2JSDINgj0e0dNSQPB9cJuTKhGLppfARi+1/7x /xeFP1QYTmJvz0TLPIvLm/Dk4tsJi7QmZSsLEdACPX86zVrc9cWLKUIoS7AJPQA0rXts rh0jsjX6m0+0YR2WKj3/28nJuKzwgfQ0qkeSnXP8SZS4vDqWNw5/zzHas9LVbgtNFUHA +Kw7DS5oxM2+7Gm7sY/TxtmK5ivPO23iw4khquNUXxPKeXOdYMauDHvmpCSOkAqFEVfb kf2g== X-Gm-Message-State: ALoCoQlbme1gELfdY9tJ7raMGaJGFqk+OZNgkr9yERDq+fCXyqmXWGQ5a8fL5qigmH/39aQxv+Ck MIME-Version: 1.0 X-Received: by 10.152.36.98 with SMTP id p2mr34129152laj.14.1381815903238; Mon, 14 Oct 2013 22:45:03 -0700 (PDT) Received: by 10.114.92.200 with HTTP; Mon, 14 Oct 2013 22:45:03 -0700 (PDT) In-Reply-To: References: <52457A32.2090105@fsn.hu> <77F6465C-4E76-4EE9-88B5-238FFB4E0161@sarenet.es> <20130930234401.GA68360@neutralgood.org> Date: Mon, 14 Oct 2013 22:45:03 -0700 Message-ID: Subject: Re: zfs: the exponential file system from hell From: Matthew Ahrens To: Jordan Hubbard Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-fs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2013 05:45:05 -0000 On Tue, Oct 1, 2013 at 9:33 AM, Jordan Hubbard wrot= e: > > On Sep 30, 2013, at 4:44 PM, kpneal@pobox.com wrote: > > > Bottom line: > > The replacement for the 'df' command when using ZFS is 'zfs list'. > > Given that we have the sources to df, I guess we should consider the > question begged: Do we want to change it to DTRT for zfs filesystems? > There's no Unix Law=99 that says "df(1) must use the output of statfs(2) > directly and can use no longer sources of information!" > > At the end of the day, df(1) is just a convenient status reporting tool > aimed at human consumption. It could easily reach out to "zfs list" for > the data it prints for zfs volumes if what's reported by statfs(2) just > isn't suitable. > Indeed. This is what illumos df(1) does, so that the "Size" reported is the size of the pool, rather than the "Used + Available" of the individual filesystem. It would be great to get a similar change in gnu df (which is also used on many illumos distros). https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/fs.d/df.c#L= 1236-1306 --matt