Skip to content
Commit cdb4c574 authored by Zach Brown's avatar Zach Brown Committed by Josef Bacik
Browse files

btrfs: define BTRFS_MAGIC as a u64 value



super.magic is an le64 but it's treated as an unterminated string when
compared against BTRFS_MAGIC which is defined as a string.  Instead
define BTRFS_MAGIC as a normal hex value and use endian helpers to
compare it to the super's magic.

I tested this by mounting an fs made before the change and made sure
that it didn't introduce sparse errors.  This matches a similar cleanup
that is pending in btrfs-progs.  David Sterba pointed out that we should
fix the kernel side as well :).

Signed-off-by: default avatarZach Brown <zab@redhat.com>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
parent a8bfd4ab
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment