- struct som_attrs *attrs = (struct som_attrs *)buf;
- ENTRY;
-
- if (rc == 0 || rc == -ENODATA)
- /* no SOM attributes */
- RETURN(-ENODATA);
-
- if (rc < 0)
- /* error hit while fetching xattr */
- RETURN(rc);
-
- /* check SOM compatibility */
- if (attrs->som_incompat & ~cpu_to_le32(SOM_INCOMPAT_SUPP))
- RETURN(-ENODATA);
-
- /* unpack SOM attributes */
- lustre_som_swab(attrs);
-
- /* fill in-memory msd structure */
- msd->msd_compat = attrs->som_compat;
- msd->msd_incompat = attrs->som_incompat;
- msd->msd_ioepoch = attrs->som_ioepoch;
- msd->msd_size = attrs->som_size;
- msd->msd_blocks = attrs->som_blocks;
- msd->msd_mountid = attrs->som_mountid;
-
- RETURN(0);
+#ifdef __BIG_ENDIAN
+ __swab16s(&attrs->lsa_valid);
+ __swab64s(&attrs->lsa_size);
+ __swab64s(&attrs->lsa_blocks);
+#endif