Bug 479300 - RFE: add btrfs recognition to file magic (bonus patch included)
RFE: add btrfs recognition to file magic (bonus patch included)
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: file (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Daniel Novotny
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-08 13:51 EST by Eric Sandeen
Modified: 2009-01-12 07:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-12 07:12:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Sandeen 2009-01-08 13:51:01 EST
The btrfs format is now set enough that we can recognize it with file magic:

# 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)

This can go after the GFS/GFS2 magic

# mkfs.btrfs -l 16384 -L mylabel -n 8192 -s 4096 /tmp/fsfile
fs created label mylabel on /tmp/fsfile
        nodesize 8192 leafsize 16384 sectorsize 4096 size 1.28GB
Btrfs v0.16-37-gb8271dc

# file -m ./magic /tmp/fsfile
/tmp/fsfile: BTRFS Filesystem (label "mylabel", sectorsize 4096, nodesize 8192, leafsize 16384)

Thanks,
-Eric
Comment 1 Daniel Novotny 2009-01-12 07:12:08 EST
hi Eric, thanks to the magic, added in file-4.26-8.fc11

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