This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 430927 - RFE: file magic - detect ext4 filesystems
RFE: file magic - detect ext4 filesystems
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: file (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Tomas Smetana
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-30 12:23 EST by Eric Sandeen
Modified: 2008-02-01 04:21 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-01 04:21:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Eric Sandeen 2008-01-30 12:23:39 EST
I have some magic file changes for ext4; I'll run them past the ext4 list and
attach a diff here.

Can you send changes upstream or should I?

Thanks,
-Eric
Comment 1 Tomas Smetana 2008-01-31 04:19:36 EST
I can send the patch upstream.
Comment 2 Eric Sandeen 2008-01-31 13:05:11 EST
Ok, here's a new magic section for ext2/3/4, to replace what's there.  ( I can
attach a real patch if you prefer...)

It didn't get any NAKs on the ext4 list, but maybe it'd be worth letting it sit
in rawhide for just a bit before upstream submission?

I put a few commented-out features in, to make it easy to display those things
in the future if desired.

Thanks,
-Eric

# ext2/ext3 filesystems - Andreas Dilger <adilger@dilger.ca>
# ext4 filesystem - Eric Sandeen <sandeen@sandeen.net>
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)
Comment 3 Tomas Smetana 2008-02-01 03:39:18 EST
Thanks.  I'll put it in the rawhide.

Note You need to log in before you can comment on or make changes to this bug.