From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932307AbbBBCxh (ORCPT ); Sun, 1 Feb 2015 21:53:37 -0500 Received: from linuxhacker.ru ([217.76.32.60]:59844 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1755309AbbBBCxZ (ORCPT ); Sun, 1 Feb 2015 21:53:25 -0500 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , wang di , Oleg Drokin Subject: [PATCH 15/20] staging/lustre/fld: refer to MDT0 for fld lookup in some cases Date: Sun, 1 Feb 2015 21:52:14 -0500 Message-Id: <1422845539-26742-16-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422845539-26742-1-git-send-email-green@linuxhacker.ru> References: <1422845539-26742-1-git-send-email-green@linuxhacker.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: wang di It is possible that when fld client is trying to lookup seq on one of MDT, but the connection between the client and the MDT is not being initialized yet, especially during striped dir creation, because client will only send create req to the master MDT, then master MDT will distribute the operation to all of other MDT, instead of client distributing these requests, which will usually trigger the connection. In this case, we will send the fld request to MDT0, since it has all of location information. Signed-off-by: wang di Reviewed-on: http://review.whamcloud.com/11780 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4855 Reviewed-by: Fan Yong Reviewed-by: Mike Pershin Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/fld/fld_request.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c b/drivers/staging/lustre/lustre/fld/fld_request.c index 7801db0..b8d17e1 100644 --- a/drivers/staging/lustre/lustre/fld/fld_request.c +++ b/drivers/staging/lustre/lustre/fld/fld_request.c @@ -131,11 +131,20 @@ fld_rrb_scan(struct lu_client_fld *fld, u64 seq) else hash = 0; +again: list_for_each_entry(target, &fld->lcf_targets, ft_chain) { if (target->ft_idx == hash) return target; } + if (hash != 0) { + /* It is possible the remote target(MDT) are not connected to + * with client yet, so we will refer this to MDT0, which should + * be connected during mount */ + hash = 0; + goto again; + } + CERROR("%s: Can't find target by hash %d (seq %#llx). Targets (%d):\n", fld->lcf_name, hash, seq, fld->lcf_count); -- 2.1.0