X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Flov%2Flov_object.c;h=658b34d7dba03d68f7709e11ed42216670e5966e;hb=af347df97192108c52af0fb254ace3e7ffaac67d;hp=7b1c45839901ee9dab1ff5e32b99b18abada40ab;hpb=90dfed8469d46f4b79ebdff8121eb109b5db6746;p=fs%2Flustre-release.git diff --git a/lustre/lov/lov_object.c b/lustre/lov/lov_object.c index 7b1c458..658b34d 100644 --- a/lustre/lov/lov_object.c +++ b/lustre/lov/lov_object.c @@ -26,7 +26,7 @@ * GPL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ /* @@ -108,28 +108,6 @@ static void lov_install_raid0(const struct lu_env *env, lov->u = *state; } -static void oinfo_get_fid(const struct lov_oinfo *oinfo, struct lu_fid *fid) -{ - __u64 idx = oinfo->loi_id; - - /* See idif definition in wiki:CMD3_interoperability_architecture */ - - LASSERT(oinfo->loi_gr < 1ULL << 16); - LASSERT(oinfo->loi_id < 1ULL << 49); - ENTRY; - - /* - * Now that the fid of stripe is not unique now, ost_idx have to - * be used to make it unique. This is ok because the stripe fids - * are just used in client side(to locate the objects). -jay - */ - fid->f_seq = ((__u64)oinfo->loi_ost_idx) << 32 | - oinfo->loi_gr << 16 | idx >> 32; - fid->f_oid = idx; /* truncated to 32 bits by assignment */ - fid->f_ver = 0; - EXIT; -} - static struct cl_object *lov_sub_find(const struct lu_env *env, struct cl_device *dev, const struct lu_fid *fid, @@ -158,11 +136,11 @@ static int lov_init_sub(const struct lu_env *env, struct lov_object *lov, parent = subhdr->coh_parent; oinfo = r0->lo_lsm->lsm_oinfo[idx]; - CDEBUG(D_INODE, DFID"@%p[%d] -> "DFID"@%p: id: "LPU64" gr: "LPU64 + CDEBUG(D_INODE, DFID"@%p[%d] -> "DFID"@%p: id: "LPU64" seq: "LPU64 " idx: %d gen: %d\n", PFID(&subhdr->coh_lu.loh_fid), subhdr, idx, PFID(&hdr->coh_lu.loh_fid), hdr, - oinfo->loi_id, oinfo->loi_gr, + oinfo->loi_id, oinfo->loi_seq, oinfo->loi_ost_idx, oinfo->loi_ost_gen); if (parent == NULL) { @@ -218,7 +196,8 @@ static int lov_init_raid0(const struct lu_env *env, struct lov_oinfo *oinfo = lsm->lsm_oinfo[i]; int ost_idx = oinfo->loi_ost_idx; - oinfo_get_fid(oinfo, ofid); + fid_ostid_unpack(ofid, &oinfo->loi_oi, + oinfo->loi_ost_idx); subdev = lovsub2cl_dev(dev->ld_target[ost_idx]); subconf->u.coc_oinfo = oinfo; LASSERTF(subdev != NULL, "not init ost %d\n", ost_idx);