]> rtime.felk.cvut.cz Git - linux-imx.git/commit
btrfs: define BTRFS_MAGIC as a u64 value
authorZach Brown <zab@redhat.com>
Wed, 20 Feb 2013 00:55:13 +0000 (00:55 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 20 Feb 2013 18:00:01 +0000 (13:00 -0500)
commitcdb4c5748cb3ac533889a6b0b95aa10651e68785
tree1c1ca874a564e824fd4b824c29a04ed7ec4936a6
parenta8bfd4abea3da0e28f215e2a2b8c2f1ca27ebe80
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: Zach Brown <zab@redhat.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/check-integrity.c
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/volumes.c