Re: [PATCH] convert dm_ulog_request data to little endian

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




于 2014年08月20日 08:58, Brassow Jonathan 写道:
This seems odd to me.  I don't understand why you would get a bug.  Do you have a mixed-architecture cluster?  Some x86-64 and the s390?  Otherwise, all operations should be in a format that is understood (unless there is a bug).

Also, you don't really need to translate the structure just to go to userspace.  Only the process that communicates between (potentially different architectures of) machines needs to do that.  That process is cmirrord and the code that should translate for that daemon is in lvm2/daemons/cmirrord/compat.c.

There could be a bug, but unless I'm not understanding right, we shouldn't need to switch endian in the kernel.

  brassow

I think this is because cmirrord always assume the network package is little-endian.(see compat.c: v5_endian_from_network) . So if cmirrord is running on S390, kernel will send package in its native endian(big endian), this is why data is broken.
There might have two solutions:

1. cmirrord always use native endian.
2. kernel always send little endian data.






--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux