From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753801AbcBZGza (ORCPT ); Fri, 26 Feb 2016 01:55:30 -0500 Received: from linuxhacker.ru ([217.76.32.60]:57946 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753528AbcBZGuy (ORCPT ); Fri, 26 Feb 2016 01:50:54 -0500 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Lustre Development List , Oleg Drokin Subject: [PATCH 09/25] staging/lustre/lmv: Remove commented out MDS selection policies Date: Fri, 26 Feb 2016 01:49:57 -0500 Message-Id: <1456469413-931943-10-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1456469413-931943-1-git-send-email-green@linuxhacker.ru> References: <1456469413-931943-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: Oleg Drokin The new DNE code does not use them either so they are not longer needed. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 45 ----------------------------- 1 file changed, 45 deletions(-) diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index 67746c9..b5fc337 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -1133,51 +1133,6 @@ static int lmv_iocontrol(unsigned int cmd, struct obd_export *exp, return rc; } -#if 0 -static int lmv_all_chars_policy(int count, const char *name, - int len) -{ - unsigned int c = 0; - - while (len > 0) - c += name[--len]; - c = c % count; - return c; -} - -static int lmv_nid_policy(struct lmv_obd *lmv) -{ - struct obd_import *imp; - __u32 id; - - /* - * XXX: To get nid we assume that underlying obd device is mdc. - */ - imp = class_exp2cliimp(lmv->tgts[0].ltd_exp); - id = imp->imp_connection->c_self ^ (imp->imp_connection->c_self >> 32); - return id % lmv->desc.ld_tgt_count; -} - -static int lmv_choose_mds(struct lmv_obd *lmv, struct md_op_data *op_data, - enum placement_policy placement) -{ - switch (placement) { - case PLACEMENT_CHAR_POLICY: - return lmv_all_chars_policy(lmv->desc.ld_tgt_count, - op_data->op_name, - op_data->op_namelen); - case PLACEMENT_NID_POLICY: - return lmv_nid_policy(lmv); - - default: - break; - } - - CERROR("Unsupported placement policy %x\n", placement); - return -EINVAL; -} -#endif - /** * This is _inode_ placement policy function (not name). */ -- 2.1.0