Bug 479300 - RFE: add btrfs recognition to file magic (bonus patch included)
Summary: RFE: add btrfs recognition to file magic (bonus patch included)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Daniel Novotny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-08 18:51 UTC by Eric Sandeen
Modified: 2018-08-30 18:26 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-12 12:12:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Eric Sandeen 2009-01-08 18:51:01 UTC
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 12:12:08 UTC
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.