X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdc%2Fmdc_internal.h;fp=lustre%2Fmdc%2Fmdc_internal.h;h=29bccbb47f135176b18c3fa948d2197c1942a6bc;hp=6a57a4e03c38404a1450f2efa0a5e377ef6975b4;hb=3c75d2522786a2a86db450a44da4e764d5ea8f30;hpb=e39d6451efb1d05ce7bb62eb0a91aebe7af302d9 diff --git a/lustre/mdc/mdc_internal.h b/lustre/mdc/mdc_internal.h index 6a57a4e..29bccbb 100644 --- a/lustre/mdc/mdc_internal.h +++ b/lustre/mdc/mdc_internal.h @@ -176,6 +176,16 @@ int mdc_unpack_acl(struct ptlrpc_request *req, struct lustre_md *md) } #endif +static inline void mdc_body2lvb(struct mdt_body *body, struct ost_lvb *lvb) +{ + LASSERT(body->mbo_valid & OBD_MD_DOM_SIZE); + lvb->lvb_mtime = body->mbo_mtime; + lvb->lvb_atime = body->mbo_atime; + lvb->lvb_ctime = body->mbo_ctime; + lvb->lvb_blocks = body->mbo_dom_blocks; + lvb->lvb_size = body->mbo_dom_size; +} + static inline unsigned long hash_x_index(__u64 hash, int hash64) { if (BITS_PER_LONG == 32 && hash64)