[dm-devel] [PATCH] convert dm_ulog_request data to little endian

Brassow Jonathan jbrassow at redhat.com
Wed Aug 20 00:58:57 UTC 2014


On Aug 7, 2014, at 7:56 PM, Dongmao Zhang wrote:

> the dm_ulog_request might be little endian or big endian depending on
> the architecture. This is not right. This patch is to convert
> dm_ulog_request to little endian.
> 
> I met a bug when running cmirrord on s390 linux

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





More information about the dm-devel mailing list