From: Andreas Dilger <adilger@sun.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: RFC: "file" magic for ext4
Date: Wed, 30 Jan 2008 17:34:42 -0700 [thread overview]
Message-ID: <20080131003442.GL23836@webber.adilger.int> (raw)
In-Reply-To: <47A0B1BF.4010109@redhat.com>
On Jan 30, 2008 11:19 -0600, Eric Sandeen wrote:
> This seems to work fine; any comments, either about
> the logic, or the text descriptions, or the various
> options I've shown/not shown?
>
> To test, copy your "magic" file somewhere local,
> replace the ext2/3 section with the following,
> and do something like:
>
> # file -C -m magic; file -m ./magic -s /dev/sda1
>
> -Eric
>
> # ext2/ext3 filesystems - Andreas Dilger <adilger@turbolabs.com>
Lol, you may as well fix up the email.... adilger@dilger.ca will
probably be the least transient.
> 0x438 leshort 0xEF53 Linux
> >0x44c lelong x rev %d
> >0x43e leshort x \b.%d
> # No journal? ext2
> >0x45c lelong ^0x0000004 ext2 filesystem data
> >>0x43a leshort ^0x0000001 (mounted or unclean)
> # Has a journal? ext3 or ext4
> >0x45c lelong &0x0000004
> # and small INCOMPAT?
> >>0x460 lelong <0x0000040
> # and small RO_COMPAT?
> >>>0x464 lelong <0x0000008 ext3 filesystem data
> # else large RO_COMPAT?
> >>>0x464 lelong >0x0000007 ext4 filesystem data
> # else large INCOMPAT?
> >>0x460 lelong >0x000003f ext4 filesystem data
> # General flags for any ext* fs
> >0x460 lelong &0x0000004 (needs journal recovery)
> >0x43a leshort &0x0000002 (errors)
> # INCOMPAT flags
> >0x460 lelong &0x0000001 (compressed)
> #>0x460 lelong &0x0000002 (filetype)
> #>0x460 lelong &0x0000010 (meta bg)
> >0x460 lelong &0x0000040 (extents)
> >0x460 lelong &0x0000080 (64bit)
> #>0x460 lelong &0x0000100 (mmp)
> #>0x460 lelong &0x0000200 (flex bg)
> # RO_INCOMPAT flags
> #>0x464 lelong &0x0000001 (sparse super)
> >0x464 lelong &0x0000002 (large files)
> >0x464 lelong &0x0000008 (huge files)
> #>0x464 lelong &0x0000010 (gdt checksum)
> #>0x464 lelong &0x0000020 (many subdirs)
> #>0x463 lelong &0x0000040 (extra isize)
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
prev parent reply other threads:[~2008-01-31 0:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-30 17:19 RFC: "file" magic for ext4 Eric Sandeen
2008-01-31 0:34 ` Andreas Dilger [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=20080131003442.GL23836@webber.adilger.int \
--to=adilger@sun.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.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