]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
ceph: present consistent fsid, regardless of arch endianness
authorJeff Layton <jlayton@redhat.com>
Mon, 23 Oct 2017 14:58:40 +0000 (10:58 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 13 Nov 2017 11:11:42 +0000 (12:11 +0100)
commit080a330e1d9142b9d958a40dcef3ae5ae5d8820a
tree269614c63b9b3984e26be51243da5101aba95d44
parentc8a96a31cb04c7664626ab6ada7f66c98c09efbd
ceph: present consistent fsid, regardless of arch endianness

Since its inception, ceph has presented the fsid as an opaque value
without any sort of endianness conversion. This means that the value
presented is different on architectures of different endianness.

While the value that should be stuffed into f_fsid is poorly-defined,
I think it would be best to strive for consistency here between
architectures, and clients (we need to present this properly to the
userland client as well).

Change ceph_statfs to convert the opaque words to host-endian before
doing the xor. On an upgrade, a big-endian box may see a different fsid
than it did before, but little-endian arches should see no change with
this patch.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/super.c