• J
    ceph: present consistent fsid, regardless of arch endianness · 080a330e
    Jeff Layton 提交于
    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: NJeff Layton <jlayton@redhat.com>
    Reviewed-by: NSage Weil <sage@redhat.com>
    Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
    080a330e
super.c 26.8 KB