X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flustre_fid.h;h=e34ac94876481e43232361553179d9632e68431f;hb=10da8afb278634a40be72f48dae42ce9755c62a0;hp=402cbef24718b012eb633d3b6b6d52b77a4ee64f;hpb=b601f8997dd5c666d49fc2e2ea15196dfc917a2d;p=fs%2Flustre-release.git diff --git a/lustre/include/lustre_fid.h b/lustre/include/lustre_fid.h index 402cbef..e34ac94 100644 --- a/lustre/include/lustre_fid.h +++ b/lustre/include/lustre_fid.h @@ -351,10 +351,13 @@ static inline void filter_fid_cpu_to_le(struct filter_fid *dst, { fid_cpu_to_le(&dst->ff_parent, &src->ff_parent); - if (size < sizeof(struct filter_fid)) + if (size < sizeof(struct filter_fid)) { memset(&dst->ff_layout, 0, sizeof(dst->ff_layout)); - else + } else { ost_layout_cpu_to_le(&dst->ff_layout, &src->ff_layout); + dst->ff_layout_version = cpu_to_le32(src->ff_layout_version); + dst->ff_range = cpu_to_le32(src->ff_range); + } /* XXX: Add more if filter_fid is enlarged in the future. */ } @@ -364,10 +367,13 @@ static inline void filter_fid_le_to_cpu(struct filter_fid *dst, { fid_le_to_cpu(&dst->ff_parent, &src->ff_parent); - if (size < sizeof(struct filter_fid)) + if (size < sizeof(struct filter_fid)) { memset(&dst->ff_layout, 0, sizeof(dst->ff_layout)); - else + } else { ost_layout_le_to_cpu(&dst->ff_layout, &src->ff_layout); + dst->ff_layout_version = le32_to_cpu(src->ff_layout_version); + dst->ff_range = le32_to_cpu(src->ff_range); + } /* XXX: Add more if filter_fid is enlarged in the future. */ }