Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1004655: libmagic1: improvement needed to BTRFS magic

4 views
Skip to first unread message

Russell Coker

unread,
Jan 31, 2022, 4:50:04 AM1/31/22
to
Package: file
Version: 1:5.41-2
Severity: wishlist
Tags: patch

Below is a modified magic entry to show the feature flags in the BTRFS
superblock.

It also removes the leafsize field due to the following comment in the
documentation of the superblock. Also note that in the kernel header for this
the field is named __unused_leafsize.
pub node_size: u32,
/// Unused and must be equal to `nodesize`
pub leafsize: u32,

0x10040 string _BHRfS_M BTRFS Filesystem
>0x1012b string >\0 label "%s",
>0x10090 lelong x sectorsize %d,
>0x10094 lelong x nodesize %d,
>0x100b4 lequad >1 Compat RO Features (
>>0x100b4 lequad &1 FREE_SPACE_TREE
>>0x100b4 lequad &2 FREE_SPACE_TREE_VALID
>>0x100b4 lequad &4 VERITY
>0x100b4 lequad >1 )
>0x100bc lequad >1 Incompat Features (
>>0x100bc lequad &1 MIXED_BACKREF
>>0x100bc lequad &2 DEFAULT_SUBVOL
>>0x100bc lequad &4 MIXED_GROUPS
>>0x100bc lequad &8 COMPRESS_LZO
>>0x100bc lequad &16 COMPRESS_ZSTD
>>0x100bc lequad &32 BIG_METADATA
>>0x100bc lequad &64 EXTENDED_IREF
>>0x100bc lequad &128 RAID56
>>0x100bc lequad &256 SKINNY_METADATA
>>0x100bc lequad &512 NO_HOLES
>>0x100bc lequad &1024 METADATA_UUID
>>0x100bc lequad &2048 RAID1C34
>>0x100bc lequad &4096 ZONED
>0x100bc lequad >1 )
>0x10020 ubelong x UUID=%08x-
>0x10024 ubeshort x \b%04x-
>0x10026 ubeshort x \b%04x-
>0x10028 ubeshort x \b%04x-
>0x1002a ubeshort x \b%04x
>0x1002c ubelong x \b%08x,
>0x10078 lequad x %lld/
>0x10070 lequad x \b%lld bytes used,
>0x10088 lequad x %lld devices


-- System Information:
Debian Release: 11.2
APT prefers stable-security
APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-10-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: SELinux: enabled - Mode: Enforcing - Policy name: default

Versions of packages libmagic1 depends on:
ii libbz2-1.0 1.0.8-4
ii libc6 2.32-4
ii liblzma5 5.2.5-2
ii libmagic-mgc 1:5.41-2
ii zlib1g 1:1.2.11.dfsg-2

libmagic1 recommends no packages.

Versions of packages libmagic1 suggests:
ii file 1:5.41-2

Versions of packages file depends on:
ii libc6 2.32-4

-- Configuration Files:
/etc/magic changed [not included]

-- no debconf information
0 new messages