Whamcloud - gitweb
LU-2793 fld: send special seq lookup request to MDT0
authorwangdi <di.wang@whamcloud.com>
Thu, 28 Nov 2013 12:03:17 +0000 (04:03 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 4 Mar 2013 19:29:55 +0000 (14:29 -0500)
Since almost all special sequence locates on MDT0, we should
send all seq lookup req to MDT0, especially in an evironment
where other MDTs might not be started at all.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: Ifda9cb434a217d1e54dc2ef4fcb7628fca049d9d
Reviewed-on: http://review.whamcloud.com/5319
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
lustre/fld/fld_request.c

index 1b43b3d..55e93cb 100644 (file)
@@ -130,7 +130,15 @@ fld_rrb_scan(struct lu_client_fld *fld, seqno_t seq)
         int hash;
         ENTRY;
 
-        hash = fld_rrb_hash(fld, seq);
+       /* Because almost all of special sequence located in MDT0,
+        * it should go to index 0 directly, instead of calculating
+        * hash again, and also if other MDTs is not being connected,
+        * the fld lookup requests(for seq on MDT0) should not be
+        * blocked because of other MDTs */
+       if (fid_seq_is_norm(seq))
+               hash = fld_rrb_hash(fld, seq);
+       else
+               hash = 0;
 
         cfs_list_for_each_entry(target, &fld->lcf_targets, ft_chain) {
                 if (target->ft_idx == hash)