X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;ds=inline;f=lustre%2Fobdclass%2Flprocfs_status.c;h=a9e44779d4d19fb0492a461ed519351e80268ec2;hb=2b16de10d79f930283a1a0dc6e8c9c2a779aae5d;hp=fe49186b8c88239008719032df4dd29c55e07c30;hpb=adc9384fd11b7fb3b71b363c310c9fa7b37e469f;p=fs%2Flustre-release.git diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index fe49186..a9e4477 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -27,7 +27,7 @@ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2014, Intel Corporation. + * Copyright (c) 2011, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -650,8 +650,10 @@ static const char *obd_connect_names[] = { "lfsck", "unknown", "unlink_close", - "unknown", + "multi_mod_rpcs", "dir_stripe", + "fileset_mount", + "bulk_mbits", "unknown", NULL }; @@ -695,7 +697,7 @@ EXPORT_SYMBOL(obd_connect_flags2str); static void obd_connect_data_seqprint(struct seq_file *m, struct obd_connect_data *ocd) { - int flags; + __u64 flags; LASSERT(ocd != NULL); flags = ocd->ocd_connect_flags; @@ -740,10 +742,14 @@ static void obd_connect_data_seqprint(struct seq_file *m, if (flags & OBD_CONNECT_MAXBYTES) seq_printf(m, " max_object_bytes: "LPU64"\n", ocd->ocd_maxbytes); + if (flags & OBD_CONNECT_MULTIMODRPCS) + seq_printf(m, " max_mod_rpcs: %hu\n", + ocd->ocd_maxmodrpcs); } int lprocfs_import_seq_show(struct seq_file *m, void *data) { + char nidstr[LNET_NIDSTR_SIZE]; struct lprocfs_counter ret; struct lprocfs_counter_header *header; struct obd_device *obd = (struct obd_device *)data; @@ -780,17 +786,22 @@ int lprocfs_import_seq_show(struct seq_file *m, void *data) spin_lock(&imp->imp_lock); j = 0; list_for_each_entry(conn, &imp->imp_conn_list, oic_item) { - seq_printf(m, "%s%s", j ? ", " : "", - libcfs_nid2str(conn->oic_conn->c_peer.nid)); + libcfs_nid2str_r(conn->oic_conn->c_peer.nid, + nidstr, sizeof(nidstr)); + seq_printf(m, "%s%s", j ? ", " : "", nidstr); j++; } + if (imp->imp_connection != NULL) + libcfs_nid2str_r(imp->imp_connection->c_peer.nid, + nidstr, sizeof(nidstr)); + else + strncpy(nidstr, "", sizeof(nidstr)); seq_printf(m, " ]\n" " current_connection: %s\n" " connection_attempts: %u\n" " generation: %u\n" " in-progress_invalidations: %u\n", - imp->imp_connection == NULL ? "" : - libcfs_nid2str(imp->imp_connection->c_peer.nid), + nidstr, imp->imp_conn_cnt, imp->imp_generation, atomic_read(&imp->imp_inval_count)); @@ -1053,6 +1064,7 @@ int lprocfs_stats_alloc_one(struct lprocfs_stats *stats, unsigned int cpuid) } return rc; } +EXPORT_SYMBOL(lprocfs_stats_alloc_one); struct lprocfs_stats *lprocfs_alloc_stats(unsigned int num, enum lprocfs_stats_flags flags) @@ -1344,7 +1356,6 @@ void lprocfs_init_mps_stats(int num_private_stats, struct lprocfs_stats *stats) LPROCFS_MD_OP_INIT(num_private_stats, stats, find_cbdata); LPROCFS_MD_OP_INIT(num_private_stats, stats, close); LPROCFS_MD_OP_INIT(num_private_stats, stats, create); - LPROCFS_MD_OP_INIT(num_private_stats, stats, done_writing); LPROCFS_MD_OP_INIT(num_private_stats, stats, enqueue); LPROCFS_MD_OP_INIT(num_private_stats, stats, getattr); LPROCFS_MD_OP_INIT(num_private_stats, stats, getattr_name); @@ -1366,8 +1377,6 @@ void lprocfs_init_mps_stats(int num_private_stats, struct lprocfs_stats *stats) LPROCFS_MD_OP_INIT(num_private_stats, stats, set_lock_data); LPROCFS_MD_OP_INIT(num_private_stats, stats, lock_match); LPROCFS_MD_OP_INIT(num_private_stats, stats, cancel_unused); - LPROCFS_MD_OP_INIT(num_private_stats, stats, renew_capa); - LPROCFS_MD_OP_INIT(num_private_stats, stats, unpack_capa); LPROCFS_MD_OP_INIT(num_private_stats, stats, get_remote_perm); LPROCFS_MD_OP_INIT(num_private_stats, stats, intent_getattr_async); LPROCFS_MD_OP_INIT(num_private_stats, stats, revalidate_lock); @@ -1916,6 +1925,7 @@ int lprocfs_wr_nosquash_nids(const char __user *buffer, unsigned long count, char *kernbuf = NULL; char *errmsg; struct list_head tmp; + int len = count; ENTRY; if (count > 4096) { @@ -1935,9 +1945,10 @@ int lprocfs_wr_nosquash_nids(const char __user *buffer, unsigned long count, kernbuf[count] = '\0'; if (count > 0 && kernbuf[count - 1] == '\n') - kernbuf[count - 1] = '\0'; + len = count - 1; - if (strcmp(kernbuf, "NONE") == 0 || strcmp(kernbuf, "clear") == 0) { + if ((len == 4 && strncmp(kernbuf, "NONE", len) == 0) || + (len == 5 && strncmp(kernbuf, "clear", len) == 0)) { /* empty string is special case */ down_write(&squash->rsi_sem); if (!list_empty(&squash->rsi_nosquash_nids))