Whamcloud - gitweb
LU-8049 obdclass: use __BIG_ENDIAN to detect local endianness
Originally, we used LUSTRE_MSG_MAGIC to detect the local endianness
as "if (LUSTRE_MSG_MAGIC != cpu_to_le32(LUSTRE_MSG_MAGIC))". But it
is not a good way. It is gratuitously confusing for no reason not
only because it has nothing specific to do with LUSTRE_MSG_MAGIC,
but also because this is a compile-time check but looks like runtime
check. This patch fixes it by checking "__BIG_ENDIAN".
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I7fc15890119b15c178da22b6dc6eebe102403734
Reviewed-on: http://review.whamcloud.com/19812
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>