linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: TR Reardon <thomas_reardon@hotmail.com>,
	"linux-ext4@vger.kernel.org" <linux-ext4@vger.kernel.org>
Subject: Re: dumpe2fs: only print 'unused inodes' once
Date: Thu, 11 Sep 2014 08:53:09 -0400	[thread overview]
Message-ID: <20140911125309.GC15632@thunk.org> (raw)
In-Reply-To: <20140910214746.GJ10351@birch.djwong.org>

On Wed, Sep 10, 2014 at 02:47:46PM -0700, Darrick J. Wong wrote:
> > 
> > Group 0: (Blocks 0-32767) [ITABLE_ZEROED]
> >   Primary superblock at 0, Group descriptors at 1-1
> >   Reserved GDT blocks at 2-512
> >   Block bitmap at 513 (+513), Inode bitmap at 529 (+529)
> >   Inode table at 545-1056 (+545), Checksum 0xe0c6
> 
> But... 0xE0C6 is the group descriptor checksum.  Since we report the bitmap
> csum after mentioning them:
> 
> >  Block bitmap at 2 (+2), csum 0xc759340d, Inode bitmap at 18 (+18), csum 0x941e2bba
> 
> It would make more sense to report the group checksum on the first line:
> 
> Group 0: (Blocks 0-32767) csum 0xe0c6 [ITABLE_ZEROED]                                     
> 

Good point, I was thinking more about about the case where we only had
checksums on the block group.  But in the case of metadata_csum, where
everything is checksummed, your suggestion is much better.

I'm not too worried about breaking scripts; dumpe2fs hasn't had a
stable format in a while.  And breaking it for 1.43 is probably
acceptable.

We should probably add stable way of extracting information about the
location of the bitmaps and inode table to debugfs, though.  Something
where we do something like this:

0:0:1:9:1025:1041:1057
1:32768:32769:32777:1026:1042:1569
2:-1:-1:-1:1027:1043:2081

where we use colon separated fields for the group number, and the
location of the superblock, group descriptors, block bitmap, inode
bitmap, and inode table.  Becasue that sort of thing is really useful
when trying to annotate a blktrace output (and there's a script that I
should find and drop into contrib that does exactly that).

					- Ted

      reply	other threads:[~2014-09-11 12:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09 19:32 dumpe2fs: only print 'unused inodes' once TR Reardon
2014-09-09 19:47 ` Darrick J. Wong
2014-09-10 21:38   ` Theodore Ts'o
2014-09-10 21:47     ` Darrick J. Wong
2014-09-11 12:53       ` Theodore Ts'o [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140911125309.GC15632@thunk.org \
    --to=tytso@mit.edu \
    --cc=darrick.wong@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=thomas_reardon@hotmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).