[PATCH 26/39] staging/lustre/osd: remove fld lookup during configuration

From: Peng Tao
Date: Thu Nov 14 2013 - 11:53:46 EST


From: wang di <di.wang@xxxxxxxxx>

Remove fld lookup during configuration, so to avoid accessing
FLDB on MDT0 before MDT0 is setup.

1. add od_is_ost to check whether the FID is on OST, instead
of lookup in FLDB.

2. add oic_device in OI cache, so in OI cache lookup, it will
try to match device to avoid the ino of agent inode is being
retrieved from OI cache. Then osd_remote_fid, which will trigger
fld lookup, can be removed from osd index lookup.

Lustre-change: http://review.whamcloud.com/7266
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3126
Signed-off-by: wang di <di.wang@xxxxxxxxx>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@xxxxxxxxx>
Reviewed-by: Niu Yawei <yawei.niu@xxxxxxxxx>
Reviewed-by: Mike Pershin <mike.pershin@xxxxxxxxx>
Reviewed-by: John L. Hammond <john.hammond@xxxxxxxxx>
Reviewed-by: Fan Yong <fan.yong@xxxxxxxxx>
Reviewed-by: Andreas Dilger <andreas.dilger@xxxxxxxxx>
Reviewed-by: Oleg Drokin <oleg.drokin@xxxxxxxxx>
[pick up only lustre_idl.h change -- Peng Tao]
Signed-off-by: Peng Tao <bergwolf@xxxxxxxxx>
Signed-off-by: Andreas Dilger <andreas.dilger@xxxxxxxxx>
---
.../lustre/lustre/include/lustre/lustre_idl.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 7bdb24f..15f70dc 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -611,10 +611,15 @@ static inline obd_id fid_idif_id(obd_seq seq, __u32 oid, __u32 ver)
return ((__u64)ver << 48) | ((seq & 0xffff) << 32) | oid;
}

+static inline __u32 idif_ost_idx(obd_seq seq)
+{
+ return (seq >> 16) & 0xffff;
+}
+
/* extract ost index from IDIF FID */
static inline __u32 fid_idif_ost_idx(const struct lu_fid *fid)
{
- return (fid_seq(fid) >> 16) & 0xffff;
+ return idif_ost_idx(fid_seq(fid));
}

/* extract OST sequence (group) from a wire ost_id (id/seq) pair */
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/