Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1331401 > unrolled thread

[PATCH 0/5] Few misc Lustre fixes

Started bygreen@linuxhacker.ru
First post2016-02-10 19:10 +0100
Last post2016-02-10 19:10 +0100
Articles 5 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/5] Few misc Lustre fixes green@linuxhacker.ru - 2016-02-10 19:10 +0100
    [PATCH 5/5] staging/lustre: Remove unused LUSTRE_VERSION_ALLOWED_OFFSET define green@linuxhacker.ru - 2016-02-10 19:10 +0100
    [PATCH 3/5] staging/lustre: Adjust import state history output format green@linuxhacker.ru - 2016-02-10 19:10 +0100
    [PATCH 2/5] staging/lustre/obdecho: Better handle invalid create requests green@linuxhacker.ru - 2016-02-10 19:10 +0100
    [PATCH 4/5] staging/lustre: Update internal client version. green@linuxhacker.ru - 2016-02-10 19:10 +0100

#1331401 — [PATCH 0/5] Few misc Lustre fixes

Fromgreen@linuxhacker.ru
Date2016-02-10 19:10 +0100
Subject[PATCH 0/5] Few misc Lustre fixes
Message-ID<r0Hnc-5O7-7@gated-at.bofh.it>
From: Oleg Drokin <green@linuxhacker.ru>

This patchset fixes some minor Lustre problems and also
updates the internal version.

Please consider.

Oleg Drokin (5):
  staging/lustre/obdecho: Remove always true condition
  staging/lustre/obdecho: Better handle invalid create requests
  staging/lustre: Adjust import state history output format
  staging/lustre: Update internal client version.
  staging/lustre: Remove unused LUSTRE_VERSION_ALLOWED_OFFSET define

 drivers/staging/lustre/lustre/include/lustre_ver.h     | 18 ++++++------------
 .../staging/lustre/lustre/obdclass/lprocfs_status.c    | 14 +++++++-------
 drivers/staging/lustre/lustre/obdecho/echo_client.c    | 15 +++++----------
 3 files changed, 18 insertions(+), 29 deletions(-)

-- 
2.1.0

[toc] | [next] | [standalone]


#1331404 — [PATCH 5/5] staging/lustre: Remove unused LUSTRE_VERSION_ALLOWED_OFFSET define

Fromgreen@linuxhacker.ru
Date2016-02-10 19:10 +0100
Subject[PATCH 5/5] staging/lustre: Remove unused LUSTRE_VERSION_ALLOWED_OFFSET define
Message-ID<r0Hnc-5O7-19@gated-at.bofh.it>
In reply to#1331401
From: Oleg Drokin <green@linuxhacker.ru>

LUSTRE_VERSION_ALLOWED_OFFSET is only used on the server to disallow
connection of old userspace clients.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/include/lustre_ver.h | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_ver.h b/drivers/staging/lustre/lustre/include/lustre_ver.h
index 01205b8..64559a1 100644
--- a/drivers/staging/lustre/lustre/include/lustre_ver.h
+++ b/drivers/staging/lustre/lustre/include/lustre_ver.h
@@ -11,13 +11,10 @@
 					    LUSTRE_MINOR, LUSTRE_PATCH, \
 					    LUSTRE_FIX)
 
-/* liblustre clients are only allowed to connect if their LUSTRE_FIX mismatches
- * by this amount (set in lustre/autoconf/lustre-version.ac). */
-#define LUSTRE_VERSION_ALLOWED_OFFSET OBD_OCD_VERSION(0, 0, 1, 32)
-
-/* If lustre version of client and servers it connects to differs by more
+/*
+ * If lustre version of client and servers it connects to differs by more
  * than this amount, client would issue a warning.
- * (set in lustre/autoconf/lustre-version.ac) */
+ */
 #define LUSTRE_VERSION_OFFSET_WARN OBD_OCD_VERSION(0, 4, 0, 0)
 
 #endif
-- 
2.1.0

[toc] | [prev] | [next] | [standalone]


#1331406 — [PATCH 3/5] staging/lustre: Adjust import state history output format

Fromgreen@linuxhacker.ru
Date2016-02-10 19:10 +0100
Subject[PATCH 3/5] staging/lustre: Adjust import state history output format
Message-ID<r0Hnd-5O7-27@gated-at.bofh.it>
In reply to#1331401
From: Oleg Drokin <green@linuxhacker.ru>

New test scripts expect spaces around state names and square brackets
when parsing debugfs output, so add them to avoid false failures.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
index 9a1434d..eda44d8 100644
--- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
+++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
@@ -642,21 +642,21 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
 		     "    target: %s\n"
 		     "    state: %s\n"
 		     "    instance: %u\n"
-		     "    connect_flags: [",
+		     "    connect_flags: [ ",
 		     obd->obd_name,
 		     obd2cli_tgt(obd),
 		     ptlrpc_import_state_name(imp->imp_state),
 		     imp->imp_connect_data.ocd_instance);
 	obd_connect_seq_flags2str(m, imp->imp_connect_data.ocd_connect_flags, ", ");
 	seq_printf(m,
-		      "]\n"
-		      "    import_flags: [");
+		      " ]\n"
+		      "    import_flags: [ ");
 	obd_import_flags2str(imp, m);
 
 	seq_printf(m,
-		      "]\n"
+		      " ]\n"
 		      "    connection:\n"
-		      "       failover_nids: [");
+		      "       failover_nids: [ ");
 	spin_lock(&imp->imp_lock);
 	j = 0;
 	list_for_each_entry(conn, &imp->imp_conn_list, oic_item) {
@@ -671,7 +671,7 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
 	else
 		strncpy(nidstr, "<none>", sizeof(nidstr));
 	seq_printf(m,
-		      "]\n"
+		      " ]\n"
 		      "       current_connection: %s\n"
 		      "       connection_attempts: %u\n"
 		      "       generation: %u\n"
@@ -795,7 +795,7 @@ int lprocfs_rd_state(struct seq_file *m, void *data)
 			&imp->imp_state_hist[(k + j) % IMP_STATE_HIST_LEN];
 		if (ish->ish_state == 0)
 			continue;
-		seq_printf(m, " - [%lld, %s]\n", (s64)ish->ish_time,
+		seq_printf(m, " - [ %lld, %s ]\n", (s64)ish->ish_time,
 			   ptlrpc_import_state_name(ish->ish_state));
 	}
 
-- 
2.1.0

[toc] | [prev] | [next] | [standalone]


#1331410 — [PATCH 2/5] staging/lustre/obdecho: Better handle invalid create requests

Fromgreen@linuxhacker.ru
Date2016-02-10 19:10 +0100
Subject[PATCH 2/5] staging/lustre/obdecho: Better handle invalid create requests
Message-ID<r0Hnd-5O7-33@gated-at.bofh.it>
In reply to#1331401
From: Oleg Drokin <green@linuxhacker.ru>

When gettng an invalid create request in echo code (wrong group,
or no group at all), just return an error instead of crashing.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/obdecho/echo_client.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c
index e1c9d11..4ca82af 100644
--- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
+++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
@@ -1210,8 +1210,10 @@ static int echo_create_object(const struct lu_env *env, struct echo_device *ed,
 	int		     rc;
 	int		     created = 0;
 
-	if ((oa->o_valid & OBD_MD_FLID) == 0) { /* no obj id */
-		CERROR("No valid oid\n");
+	if (!(oa->o_valid & OBD_MD_FLID) ||
+	    !(oa->o_valid & OBD_MD_FLGROUP) ||
+	    !fid_seq_is_echo(ostid_seq(&oa->o_oi))) {
+		CERROR("invalid oid " DOSTID "\n", POSTID(&oa->o_oi));
 		return -EINVAL;
 	}
 
@@ -1222,16 +1224,11 @@ static int echo_create_object(const struct lu_env *env, struct echo_device *ed,
 	}
 
 	/* setup object ID here */
-	LASSERT(oa->o_valid & OBD_MD_FLGROUP);
 	lsm->lsm_oi = oa->o_oi;
 
 	if (ostid_id(&lsm->lsm_oi) == 0)
 		ostid_set_id(&lsm->lsm_oi, ++last_object_id);
 
-	/* Only echo objects are allowed to be created */
-	LASSERT((oa->o_valid & OBD_MD_FLGROUP) &&
-		(ostid_seq(&oa->o_oi) == FID_SEQ_ECHO));
-
 	rc = obd_create(env, ec->ec_exp, oa, &lsm, oti);
 	if (rc != 0) {
 		CERROR("Cannot create objects: rc = %d\n", rc);
-- 
2.1.0

[toc] | [prev] | [next] | [standalone]


#1331412 — [PATCH 4/5] staging/lustre: Update internal client version.

Fromgreen@linuxhacker.ru
Date2016-02-10 19:10 +0100
Subject[PATCH 4/5] staging/lustre: Update internal client version.
Message-ID<r0Hnd-5O7-51@gated-at.bofh.it>
In reply to#1331401
From: Oleg Drokin <green@linuxhacker.ru>

While initial code drop was corresponding to 2.3.64, lots of
different changes went in since then, and also quite a bunch of fixes,
but almost none of the new features.
Code-wise we are almost at 2.5.0, so let's call it 2.4.60 - this is a
version that was never reached in the actual pre-2.5 development, so
it should be a clear distinction of where we are now.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 drivers/staging/lustre/lustre/include/lustre_ver.h | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_ver.h b/drivers/staging/lustre/lustre/include/lustre_ver.h
index caa4da1..01205b8 100644
--- a/drivers/staging/lustre/lustre/include/lustre_ver.h
+++ b/drivers/staging/lustre/lustre/include/lustre_ver.h
@@ -1,14 +1,11 @@
 #ifndef _LUSTRE_VER_H_
 #define _LUSTRE_VER_H_
-/* This file automatically generated from lustre/include/lustre_ver.h.in,
- * based on parameters in lustre/autoconf/lustre-version.ac.
- * Changes made directly to this file will be lost. */
 
 #define LUSTRE_MAJOR 2
-#define LUSTRE_MINOR 3
-#define LUSTRE_PATCH 64
+#define LUSTRE_MINOR 4
+#define LUSTRE_PATCH 60
 #define LUSTRE_FIX 0
-#define LUSTRE_VERSION_STRING "2.3.64"
+#define LUSTRE_VERSION_STRING "2.4.60"
 
 #define LUSTRE_VERSION_CODE OBD_OCD_VERSION(LUSTRE_MAJOR, \
 					    LUSTRE_MINOR, LUSTRE_PATCH, \
-- 
2.1.0

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web