CLASSERT(offsetof(typeof(*k), lk_padding) != 0);
}
+void lustre_swab_hsm_state(struct hsm_state_set_ioc *hssi)
+{
+ lustre_swab_lu_fid(&hssi->hssi_fid);
+ __swab64s(&hssi->hssi_setmask);
+ __swab64s(&hssi->hssi_clearmask);
+}
+EXPORT_SYMBOL(lustre_swab_hsm_state);
+
+void lustre_swab_hsm_user_request(struct hsm_user_request *hur)
+{
+ int i;
+
+ __swab32s(&hur->hur_action);
+ __swab32s(&hur->hur_itemcount);
+ __swab32s(&hur->hur_data_len);
+ for (i = 0; i < hur->hur_itemcount; i++) {
+ struct hsm_user_item *hui = &hur->hur_user_item[i];
+ lustre_swab_lu_fid(&hui->hui_fid);
+ __swab64s(&hui->hui_extent.offset);
+ __swab64s(&hui->hui_extent.length);
+ }
+ /* Note: data blob is not swabbed here */
+}
+EXPORT_SYMBOL(lustre_swab_hsm_user_request);
+
+void lustre_swab_hsm_progress(struct hsm_progress *hp)
+{
+ lustre_swab_lu_fid(&hp->hp_fid);
+ __swab64s(&hp->hp_cookie);
+ __swab64s(&hp->hp_extent.offset);
+ __swab64s(&hp->hp_extent.length);
+ __swab16s(&hp->hp_flags);
+ __swab16s(&hp->hp_errval);
+}
+EXPORT_SYMBOL(lustre_swab_hsm_progress);
+
+