X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Finclude%2Flustre%2Flustre_user.h;h=14dff8704f8ec7a54ddf64f0d8634f795379d973;hp=4ea95a9b13d527b691fa5e6f76c61ce51f0c5921;hb=0a6e5c9a3060d0145e516f40457a26bd2a3c25db;hpb=05f7614dd143474ebe5212280b62809cd9367d2f;ds=sidebyside diff --git a/lustre/include/lustre/lustre_user.h b/lustre/include/lustre/lustre_user.h index 4ea95a9..14dff87 100644 --- a/lustre/include/lustre/lustre_user.h +++ b/lustre/include/lustre/lustre_user.h @@ -828,22 +828,30 @@ struct hsm_action_list { boundaries. See hai_zero */ } __attribute__((packed)); +#ifndef HAVE_CFS_SIZE_ROUND +static inline int cfs_size_round (int val) +{ + return (val + 7) & (~0x7); +} +#define HAVE_CFS_SIZE_ROUND +#endif + /* Return pointer to first hai in action list */ -static __inline__ struct hsm_action_item * hai_zero(struct hsm_action_list *hal) +static inline struct hsm_action_item * hai_zero(struct hsm_action_list *hal) { return (struct hsm_action_item *)(hal->hal_fsname + cfs_size_round(strlen(hal-> \ hal_fsname))); } /* Return pointer to next hai */ -static __inline__ struct hsm_action_item * hai_next(struct hsm_action_item *hai) +static inline struct hsm_action_item * hai_next(struct hsm_action_item *hai) { return (struct hsm_action_item *)((char *)hai + cfs_size_round(hai->hai_len)); } /* Return size of an hsm_action_list */ -static __inline__ int hal_size(struct hsm_action_list *hal) +static inline int hal_size(struct hsm_action_list *hal) { int i, sz; struct hsm_action_item *hai;