From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032752AbbKDSlm (ORCPT ); Wed, 4 Nov 2015 13:41:42 -0500 Received: from smtp2.ccs.ornl.gov ([160.91.199.39]:53110 "EHLO smtp2.ccs.ornl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1032543AbbKDSkX (ORCPT ); Wed, 4 Nov 2015 13:40:23 -0500 From: James Simmons To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Oleg Drokin , Andreas Dilger Cc: Linux Kernel Mailing List , lustre-devel@lists.lustre.org, James Simmons , James Simmons Subject: [PATCH 07/10] staging: lustre: Handle nodemask on UMP machines Date: Wed, 4 Nov 2015 13:40:03 -0500 Message-Id: <1446662406-4590-7-git-send-email-jsimmons@infradead.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1446662406-4590-1-git-send-email-jsimmons@infradead.org> References: <1446662406-4590-1-git-send-email-jsimmons@infradead.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For UMP and SMP machines the struct cfs_cpt_table are defined differently. In the case handled by this patch nodemask is defined as a integer for the UMP case and as a pointer for the SMP case. This will cause a problem for ost_setup which reads the nodemask directly. Instead we create a UMP version of cfs_cpt_nodemask and use that in ost_setup. Signed-off-by: James Simmons Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4199 Reviewed-on: http://review.whamcloud.com/9219 Reviewed-by: Liang Zhen Reviewed-by: Li Xi Reviewed-by: Andreas Dilger --- drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c b/drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c index 933525c..de9d289 100644 --- a/drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c +++ b/drivers/staging/lustre/lustre/libcfs/libcfs_cpu.c @@ -58,6 +58,7 @@ cfs_cpt_table_alloc(unsigned int ncpt) LIBCFS_ALLOC(cptab, sizeof(*cptab)); if (cptab != NULL) { cptab->ctb_version = CFS_CPU_VERSION_MAGIC; + set_bit(0, &cptab->ctb_nodemask); cptab->ctb_nparts = ncpt; } @@ -111,6 +112,13 @@ cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) } EXPORT_SYMBOL(cfs_cpt_online); +nodemask_t * +cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt) +{ + return &cptab->ctb_nodemask; +} +EXPORT_SYMBOL(cfs_cpt_cpumask); + int cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) { -- 1.7.1