From patchwork Sun Nov 10 12:54:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell Coker X-Patchwork-Id: 3165171 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EE24CC045B for ; Sun, 10 Nov 2013 12:54:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 16CD4202AB for ; Sun, 10 Nov 2013 12:54:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E96982028D for ; Sun, 10 Nov 2013 12:54:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751299Ab3KJMyb (ORCPT ); Sun, 10 Nov 2013 07:54:31 -0500 Received: from 220-245-31-42.static.tpgi.com.au ([220.245.31.42]:41677 "EHLO smtp.sws.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751249Ab3KJMya (ORCPT ); Sun, 10 Nov 2013 07:54:30 -0500 Received: from bluebottle.localnet (localhost [127.0.0.1]) by smtp.sws.net.au (Postfix) with ESMTP id 5253D2089E; Sun, 10 Nov 2013 23:54:27 +1100 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=coker.com.au; s=2008; t=1384088067; bh=rQiACf1/frIMUX3LBlBmm/4LoOY+8Ug2CysEiEDWiyQ=; h=From:Reply-To:To:Subject:Date:Cc:References:In-Reply-To:From; b=m7llnzk1q54SsnQFiMGjxsXQks3PI0VK4G0w9VaAa8g8LKo50qmoYqpEQW5oOOoeR +6EJYhuD9BY1ju4JDXWa52+qIHwr4Ob8aeqIrM602bsdfLxKlmsEb9tXIziZ4z7xW7 05N9IjabkaJFFAXd1uXi3uEErzt1nahCP3nrnewI= From: Russell Coker Reply-To: russell@coker.com.au To: Duncan <1i5t5.duncan@cox.net> Subject: Re: Btrfs might be gradually slowing the boot process Date: Sun, 10 Nov 2013 23:54:26 +1100 User-Agent: KMail/1.13.7 (Linux/3.10-3-amd64; KDE/4.8.4; x86_64; ; ) Cc: linux-btrfs@vger.kernel.org References: <527d2ee689e077.81319728@wp.pl> <04B39B7F-24A2-42E0-8C4A-31D710A844E6@colorremedies.com> In-Reply-To: MIME-Version: 1.0 Message-Id: <201311102354.26799.russell@coker.com.au> X-Virus-Scanned: clamav-milter 0.97.8 at smtp X-Virus-Status: Clean Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_ADSP_DISCARD, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sun, 10 Nov 2013, Duncan <1i5t5.duncan@cox.net> wrote: > Chris Murphy posted on Sat, 09 Nov 2013 21:53:10 -0700 as excerpted: > > What's leafsize was used when making the file system? The default is now > > (as of yesterday) 16KB to avoid metadata fragmentation. > > I saw the discussion of that, but two questions it didn't answer -- (1) > what was the default size before, and (2) how do I check what I actually > have? I've attached the Debian patch to the magic database for file(1) to display BTRFS data, it gives output such as the following. The magic database displayed the leafsize before this patch, but the patch displays the UUID (which you REALLY want to know) and all the other information I could figure out. # file -s /dev/dm-0 /dev/dm-0: BTRFS Filesystem sectorsize 4096, nodesize 4096, leafsize 4096, UUID=586e6f48-2985-4115-9f89-f844b319c7c0, 82545332224/115536781312 bytes used, 1 devices I might file another bug report with a new version to display error counts etc. I think that all data which we can extract should be displayed to the user. As an aside, I don't know if the bytes used field is going to be very useful on a RAID-0 filesystem, but it's there and I think we might as well show it. Author: Russell Coker Description: Adding updated magics for BTRFS (Closes: #663454). diff -Naurp file.orig/magic/Magdir/filesystems file/magic/Magdir/filesystems --- file.orig/magic/Magdir/filesystems 2013-03-13 16:54:43.588452886 +0100 +++ file/magic/Magdir/filesystems 2013-03-13 17:15:59.659044842 +0100 @@ -1894,12 +1894,21 @@ >>0x10060 string >\0 lockproto %s) # BTRFS -0x10040 string _BHRfS_M BTRFS Filesystem ->0x1012b string >\0 (label "%s", ->0x10090 lelong x sectorsize %d, ->0x10094 lelong x nodesize %d, ->0x10098 lelong x leafsize %d) - +# Russell Coker +0x10040 string _BHRfS_M BTRFS Filesystem +>0x1012b string >\0 label "%s", +>0x10090 lelong x sectorsize %d, +>0x10094 lelong x nodesize %d, +>0x10098 lelong x leafsize %d, +>0x10020 belong x UUID=%8x- +>0x10024 beshort x \b%4x- +>0x10026 beshort x \b%4x- +>0x10028 beshort x \b%4x- +>0x1002a beshort x \b%4x +>0x1002c belong x \b%8x, +>0x10078 lequad x %lld/ +>0x10070 lequad x \b%lld bytes used, +>0x10088 lequad x %lld devices # dvdisaster's .ecc # From: "Nelson A. de Oliveira"