Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1265127 > unrolled thread
| Started by | James Simmons <jsimmons@infradead.org> |
|---|---|
| First post | 2015-11-08 17:40 +0100 |
| Last post | 2015-11-10 01:50 +0100 |
| Articles | 10 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH v2] staging: lustre: remove IOC_LIBCFS_PING_TEST ioctl James Simmons <jsimmons@infradead.org> - 2015-11-08 17:40 +0100
[PATCH] staging: lustre: add libcfs version of cfs_strrstr James Simmons <jsimmons@infradead.org> - 2015-11-08 17:40 +0100
[PATCH] staging: lustre: added debugging ability for LFSCK James Simmons <jsimmons@infradead.org> - 2015-11-08 17:40 +0100
[PATCH] staging: lustre: add sparse locking annotations James Simmons <jsimmons@infradead.org> - 2015-11-08 17:40 +0100
[PATCH] staging: lustre: export cfs_str2mask James Simmons <jsimmons@infradead.org> - 2015-11-08 17:40 +0100
Re: [lustre-devel] [PATCH] staging: lustre: export cfs_str2mask "Drokin, Oleg" <oleg.drokin@intel.com> - 2015-11-09 12:10 +0100
RE: [lustre-devel] [PATCH] staging: lustre: export cfs_str2mask "Simmons, James A." <simmonsja@ornl.gov> - 2015-11-10 01:50 +0100
[PATCH] staging: lustre: Handle nodemask on UMP machines James Simmons <jsimmons@infradead.org> - 2015-11-08 17:40 +0100
Re: [PATCH] staging: lustre: Handle nodemask on UMP machines Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2015-11-09 12:20 +0100
RE: [lustre-devel] [PATCH] staging: lustre: Handle nodemask on UMP machines "Simmons, James A." <simmonsja@ornl.gov> - 2015-11-10 01:50 +0100
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Date | 2015-11-08 17:40 +0100 |
| Subject | [PATCH v2] staging: lustre: remove IOC_LIBCFS_PING_TEST ioctl |
| Message-ID | <qsBax-2w9-3@gated-at.bofh.it> |
The ioctl IOC_LIBCFS_PING_TEST has not been used in
ages. The recent nidstring changes which moved all
the nidstring operations from libcfs to the LNet
layer but this ioctl code was still using an
nidstring operation that was causing an circular
dependency loop between libcfs and LNet.
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
.../lustre/include/linux/libcfs/libcfs_ioctl.h | 1 -
drivers/staging/lustre/lustre/libcfs/module.c | 17 -----------------
2 files changed, 0 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h
index f5d741f..485ab26 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h
@@ -110,7 +110,6 @@ struct libcfs_ioctl_handler {
#define IOC_LIBCFS_CLEAR_DEBUG _IOWR('e', 31, long)
#define IOC_LIBCFS_MARK_DEBUG _IOWR('e', 32, long)
#define IOC_LIBCFS_MEMHOG _IOWR('e', 36, long)
-#define IOC_LIBCFS_PING_TEST _IOWR('e', 37, long)
/* lnet ioctls */
#define IOC_LIBCFS_GET_NI _IOWR('e', 50, long)
#define IOC_LIBCFS_FAIL_NID _IOWR('e', 51, long)
diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c
index 570f05c..89038ed 100644
--- a/drivers/staging/lustre/lustre/libcfs/module.c
+++ b/drivers/staging/lustre/lustre/libcfs/module.c
@@ -274,23 +274,6 @@ static int libcfs_ioctl_int(struct cfs_psdev_file *pfile, unsigned long cmd,
}
break;
- case IOC_LIBCFS_PING_TEST: {
- extern void (kping_client)(struct libcfs_ioctl_data *);
- void (*ping)(struct libcfs_ioctl_data *);
-
- CDEBUG(D_IOCTL, "doing %d pings to nid %s (%s)\n",
- data->ioc_count, libcfs_nid2str(data->ioc_nid),
- libcfs_nid2str(data->ioc_nid));
- ping = symbol_get(kping_client);
- if (!ping)
- CERROR("symbol_get failed\n");
- else {
- ping(data);
- symbol_put(kping_client);
- }
- return 0;
- }
-
default: {
struct libcfs_ioctl_handler *hand;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Date | 2015-11-08 17:40 +0100 |
| Subject | [PATCH] staging: lustre: add libcfs version of cfs_strrstr |
| Message-ID | <qsBay-2w9-9@gated-at.bofh.it> |
| In reply to | #1265127 |
From: Fan Yong <fan.yong@intel.com>
Create a kernel side function that does the same
thing as userland strrstr. This is from patch
http://review.whamcloud.com/7666.
Signed-off-by: Fan Yong <fan.yong@intel.com>
ntel-bug-id: https://jira.hpdd.intel.com/browse/LU-3951
Reviewed-on: http://review.whamcloud.com/7666
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
---
.../lustre/include/linux/libcfs/libcfs_string.h | 1 +
.../staging/lustre/lustre/libcfs/libcfs_string.c | 27 ++++++++++++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h
index d8d2e7d..052f684 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h
@@ -44,6 +44,7 @@
#define __LIBCFS_STRING_H__
/* libcfs_string.c */
+char *cfs_strrstr(const char *haystack, const char *needle);
/* string comparison ignoring case */
int cfs_strncasecmp(const char *s1, const char *s2, size_t n);
/* Convert a text string to a bitmask */
diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_string.c b/drivers/staging/lustre/lustre/libcfs/libcfs_string.c
index 05630f8..4e399ef 100644
--- a/drivers/staging/lustre/lustre/libcfs/libcfs_string.c
+++ b/drivers/staging/lustre/lustre/libcfs/libcfs_string.c
@@ -42,6 +42,33 @@
#include "../../include/linux/libcfs/libcfs.h"
+char *cfs_strrstr(const char *haystack, const char *needle)
+{
+ char *ptr;
+
+ if (unlikely(!haystack || !needle))
+ return NULL;
+
+ if (strlen(needle) == 1)
+ return strrchr(haystack, needle[0]);
+
+ ptr = strstr(haystack, needle);
+ if (ptr) {
+ while (1) {
+ char *tmp;
+
+ tmp = strstr(&ptr[1], needle);
+ if (!tmp)
+ return ptr;
+
+ ptr = tmp;
+ }
+ }
+
+ return NULL;
+}
+EXPORT_SYMBOL(cfs_strrstr);
+
/* Convert a text string to a bitmask */
int cfs_str2mask(const char *str, const char *(*bit2str)(int bit),
int *oldmask, int minmask, int allmask)
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Date | 2015-11-08 17:40 +0100 |
| Subject | [PATCH] staging: lustre: added debugging ability for LFSCK |
| Message-ID | <qsBay-2w9-11@gated-at.bofh.it> |
| In reply to | #1265127 |
From: Fan Yong <fan.yong@intel.com>
Add the ability to debug LFSCK to libcfs. This is
broken out of patch http://review.whamcloud.com/6321.
Signed-off-by: Fan Yong <fan.yong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2914
Reviewed-on: http://review.whamcloud.com/6321
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
---
.../lustre/include/linux/libcfs/libcfs_debug.h | 2 +-
drivers/staging/lustre/lustre/libcfs/debug.c | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
index a1787bb..98430e7 100644
--- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
+++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
@@ -106,7 +106,7 @@ struct ptldebug_header {
#define S_LOV 0x00020000
#define S_LQUOTA 0x00040000
#define S_OSD 0x00080000
-/* unused */
+#define S_LFSCK 0x00100000
/* unused */
/* unused */
#define S_LMV 0x00800000 /* b_new_cmd */
diff --git a/drivers/staging/lustre/lustre/libcfs/debug.c b/drivers/staging/lustre/lustre/libcfs/debug.c
index e56785a..3c914bf 100644
--- a/drivers/staging/lustre/lustre/libcfs/debug.c
+++ b/drivers/staging/lustre/lustre/libcfs/debug.c
@@ -271,6 +271,8 @@ libcfs_debug_subsys2str(int subsys)
return "lquota";
case S_OSD:
return "osd";
+ case S_LFSCK:
+ return "lfsck";
case S_LMV:
return "lmv";
case S_SEC:
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Date | 2015-11-08 17:40 +0100 |
| Subject | [PATCH] staging: lustre: add sparse locking annotations |
| Message-ID | <qsBay-2w9-13@gated-at.bofh.it> |
| In reply to | #1265127 |
From: frank zago <fzago@cray.com>
Adds __acquires / __releases / __must_hold sparse locking annotations to
several functions.
Fixes sparse warnings such as:
libcfs/libcfs/hash.c:127:1: warning: context imbalance in 'cfs_hash_spin_lock'
- wrong count at exit
libcfs/libcfs/hash.c:133:1: warning: context imbalance in 'cfs_hash_spin_unlock'
- unexpected unlock
libcfs/libcfs/hash.c:141:9: warning: context imbalance in 'cfs_hash_rw_lock'
- wrong count at exit
include/linux/rwlock_api_smp.h:221:9: warning: context imbalance in
'cfs_hash_rw_unlock' - unexpected unlock
Signed-off-by: frank zago <fzago@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5396
Reviewed-on: http://review.whamcloud.com/11295
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
---
.../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 3 +--
.../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 1 +
drivers/staging/lustre/lustre/libcfs/libcfs_lock.c | 2 ++
drivers/staging/lustre/lustre/osc/osc_cache.c | 3 +++
drivers/staging/lustre/lustre/ptlrpc/client.c | 1 +
5 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
index 8989e36..f43e825 100644
--- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -750,8 +750,7 @@ kiblnd_setup_rd_kiov(lnet_ni_t *ni, kib_tx_t *tx, kib_rdma_desc_t *rd,
static int
kiblnd_post_tx_locked(kib_conn_t *conn, kib_tx_t *tx, int credit)
- __releases(conn->ibc_lock)
- __acquires(conn->ibc_lock)
+ __must_hold(&conn->ibc_lock)
{
kib_msg_t *msg = tx->tx_msg;
kib_peer_t *peer = conn->ibc_peer;
diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
index 477b385..a0955d2 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
@@ -2336,6 +2336,7 @@ ksocknal_flush_stale_txs(ksock_peer_t *peer)
static int
ksocknal_send_keepalive_locked(ksock_peer_t *peer)
+ __must_hold(&ksocknal_data.ksnd_global_lock)
{
ksock_sched_t *sched;
ksock_conn_t *conn;
diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c b/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c
index 94bc007..d37e457 100644
--- a/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c
+++ b/drivers/staging/lustre/lustre/libcfs/libcfs_lock.c
@@ -90,6 +90,7 @@ EXPORT_SYMBOL(cfs_percpt_lock_alloc);
*/
void
cfs_percpt_lock(struct cfs_percpt_lock *pcl, int index)
+ __acquires(pcl->pcl_locks)
{
int ncpt = cfs_cpt_number(pcl->pcl_cptab);
int i;
@@ -124,6 +125,7 @@ EXPORT_SYMBOL(cfs_percpt_lock);
/** unlock a CPU partition */
void
cfs_percpt_unlock(struct cfs_percpt_lock *pcl, int index)
+ __releases(pcl->pcl_locks)
{
int ncpt = cfs_cpt_number(pcl->pcl_cptab);
int i;
diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c
index cfb83bc..fb1a60f 100644
--- a/drivers/staging/lustre/lustre/osc/osc_cache.c
+++ b/drivers/staging/lustre/lustre/osc/osc_cache.c
@@ -1938,6 +1938,7 @@ static int get_write_extents(struct osc_object *obj, struct list_head *rpclist)
static int
osc_send_write_rpc(const struct lu_env *env, struct client_obd *cli,
struct osc_object *osc)
+ __must_hold(osc)
{
LIST_HEAD(rpclist);
struct osc_extent *ext;
@@ -2010,6 +2011,7 @@ osc_send_write_rpc(const struct lu_env *env, struct client_obd *cli,
static int
osc_send_read_rpc(const struct lu_env *env, struct client_obd *cli,
struct osc_object *osc)
+ __must_hold(osc)
{
struct osc_extent *ext;
struct osc_extent *next;
@@ -2083,6 +2085,7 @@ static struct osc_object *osc_next_obj(struct client_obd *cli)
/* called with the loi list lock held */
static void osc_check_rpcs(const struct lu_env *env, struct client_obd *cli)
+ __must_hold(&cli->cl_loi_list_lock)
{
struct osc_object *osc;
int rc = 0;
diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c
index a9f1bf5..b6691cc 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/client.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/client.c
@@ -353,6 +353,7 @@ static int unpack_reply(struct ptlrpc_request *req)
* If anything goes wrong just ignore it - same as if it never happened
*/
static int ptlrpc_at_recv_early_reply(struct ptlrpc_request *req)
+ __must_hold(&req->rq_lock)
{
struct ptlrpc_request *early_req;
time64_t olddl;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Date | 2015-11-08 17:40 +0100 |
| Subject | [PATCH] staging: lustre: export cfs_str2mask |
| Message-ID | <qsBay-2w9-35@gated-at.bofh.it> |
| In reply to | #1265127 |
We need cfs_str2mask exported for our server code. Even with the server code not available upstream it would be nice to use the upstream code on Lustre servers. Signed-off-by: James Simmons <jsimmons@infradead.org> --- .../staging/lustre/lustre/libcfs/libcfs_string.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_string.c b/drivers/staging/lustre/lustre/libcfs/libcfs_string.c index d40be53..05630f8 100644 --- a/drivers/staging/lustre/lustre/libcfs/libcfs_string.c +++ b/drivers/staging/lustre/lustre/libcfs/libcfs_string.c @@ -111,6 +111,7 @@ int cfs_str2mask(const char *str, const char *(*bit2str)(int bit), *oldmask = newmask; return 0; } +EXPORT_SYMBOL(cfs_str2mask); /* get the first string out of @str */ char *cfs_firststr(char *str, size_t size) -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "Drokin, Oleg" <oleg.drokin@intel.com> |
|---|---|
| Date | 2015-11-09 12:10 +0100 |
| Subject | Re: [lustre-devel] [PATCH] staging: lustre: export cfs_str2mask |
| Message-ID | <qsSuK-5Ec-39@gated-at.bofh.it> |
| In reply to | #1265131 |
On Nov 8, 2015, at 11:34 AM, James Simmons wrote: > We need cfs_str2mask exported for our server code. > Even with the server code not available upstream > it would be nice to use the upstream code on Lustre > servers. > > Signed-off-by: James Simmons <jsimmons@infradead.org> > --- > .../staging/lustre/lustre/libcfs/libcfs_string.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_string.c b/drivers/staging/lustre/lustre/libcfs/libcfs_string.c > index d40be53..05630f8 100644 > --- a/drivers/staging/lustre/lustre/libcfs/libcfs_string.c > +++ b/drivers/staging/lustre/lustre/libcfs/libcfs_string.c > @@ -111,6 +111,7 @@ int cfs_str2mask(const char *str, const char *(*bit2str)(int bit), > *oldmask = newmask; > return 0; > } > +EXPORT_SYMBOL(cfs_str2mask); If this is the case of it being used out of tree, I suspect a comment here to that effect would be useful, otherwise next person running a script to eliminate unused EXPORT_SYMBOLs would kill it again. > > /* get the first string out of @str */ > char *cfs_firststr(char *str, size_t size) > -- > 1.7.1 > > _______________________________________________ > lustre-devel mailing list > lustre-devel@lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "Simmons, James A." <simmonsja@ornl.gov> |
|---|---|
| Date | 2015-11-10 01:50 +0100 |
| Subject | RE: [lustre-devel] [PATCH] staging: lustre: export cfs_str2mask |
| Message-ID | <qt5ii-6fS-9@gated-at.bofh.it> |
| In reply to | #1265568 |
>> We need cfs_str2mask exported for our server code. >> Even with the server code not available upstream >> it would be nice to use the upstream code on Lustre >> servers. >> >> Signed-off-by: James Simmons <jsimmons@infradead.org> >> --- >> .../staging/lustre/lustre/libcfs/libcfs_string.c | 1 + >> 1 files changed, 1 insertions(+), 0 deletions(-) >> >> diff --git a/drivers/staging/lustre/lustre/libcfs/libcfs_string.c b/drivers/staging/lustre/lustre/libcfs/libcfs_string.c >> index d40be53..05630f8 100644 >> --- a/drivers/staging/lustre/lustre/libcfs/libcfs_string.c >> +++ b/drivers/staging/lustre/lustre/libcfs/libcfs_string.c >> @@ -111,6 +111,7 @@ int cfs_str2mask(const char *str, const char *(*bit2str)(int bit), >> *oldmask = newmask; >> return 0; >> } >> +EXPORT_SYMBOL(cfs_str2mask); > >If this is the case of it being used out of tree, I suspect a comment here to that effect would be >useful, otherwise next person running a script to eliminate unused EXPORT_SYMBOLs would kill it again. I will send another patch with comments not to remove the new code. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | James Simmons <jsimmons@infradead.org> |
|---|---|
| Date | 2015-11-08 17:40 +0100 |
| Subject | [PATCH] staging: lustre: Handle nodemask on UMP machines |
| Message-ID | <qsBay-2w9-37@gated-at.bofh.it> |
| In reply to | #1265127 |
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 <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4199
Reviewed-on: http://review.whamcloud.com/9219
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Li Xi <pkuelelixi@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Starting in 3.14 kernels nodemask_t was changed from a
a unsigned long to a linux bitmap so more than 32 cores
could be supported. Using set_bit in cfs_cpt_table_alloc
no longer compiles so this patch backports bits of the
node management function that use a linux bitmap back
end. Cleaned up libcfs bitmap.h to use the libcfs layers
memory allocation function. This was pulling in lustre
related code that was not defined.
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4993
Reviewed-on: http://review.whamcloud.com/10332
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
---
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..ba97c79 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;
+ node_set(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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2015-11-09 12:20 +0100 |
| Subject | Re: [PATCH] staging: lustre: Handle nodemask on UMP machines |
| Message-ID | <qsSEr-5Hy-29@gated-at.bofh.it> |
| In reply to | #1265132 |
On Sun, Nov 08, 2015 at 11:34:55AM -0500, James Simmons wrote: > 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 <uja.ornl@gmail.com> > Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4199 > Reviewed-on: http://review.whamcloud.com/9219 > Reviewed-by: Liang Zhen <liang.zhen@intel.com> > Reviewed-by: Li Xi <pkuelelixi@gmail.com> > Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: and Reviewed-by: tags entered two times. Once here. > > Starting in 3.14 kernels nodemask_t was changed from a > a unsigned long to a linux bitmap so more than 32 cores > could be supported. Using set_bit in cfs_cpt_table_alloc > no longer compiles so this patch backports bits of the > node management function that use a linux bitmap back > end. Cleaned up libcfs bitmap.h to use the libcfs layers > memory allocation function. This was pulling in lustre > related code that was not defined. > > Signed-off-by: James Simmons <uja.ornl@gmail.com> > Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4993 > Reviewed-on: http://review.whamcloud.com/10332 > Reviewed-by: Liang Zhen <liang.zhen@intel.com> > Reviewed-by: Bob Glossman <bob.glossman@intel.com> > Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> And then again here. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "Simmons, James A." <simmonsja@ornl.gov> |
|---|---|
| Date | 2015-11-10 01:50 +0100 |
| Subject | RE: [lustre-devel] [PATCH] staging: lustre: Handle nodemask on UMP machines |
| Message-ID | <qt5ii-6fS-5@gated-at.bofh.it> |
| In reply to | #1265581 |
>On Sun, Nov 08, 2015 at 11:34:55AM -0500, James Simmons wrote: >> 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 <uja.ornl@gmail.com> >> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4199 >> Reviewed-on: http://review.whamcloud.com/9219 >> Reviewed-by: Liang Zhen <liang.zhen@intel.com> >> Reviewed-by: Li Xi <pkuelelixi@gmail.com> >> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> > >Signed-off-by: and Reviewed-by: tags entered two times. Once here. It is one of those rare situations where two patches are need together. It would be nice to be able to preserve the reviewers for each one. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web