* [PATCH 0/5] Few misc Lustre fixes
@ 2016-02-10 18:00 green
2016-02-10 18:00 ` [PATCH 1/5] staging/lustre/obdecho: Remove always true condition green
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: green @ 2016-02-10 18:00 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, Andreas Dilger
Cc: Linux Kernel Mailing List, Lustre Development List, Oleg Drokin
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/5] staging/lustre/obdecho: Remove always true condition
2016-02-10 18:00 [PATCH 0/5] Few misc Lustre fixes green
@ 2016-02-10 18:00 ` green
2016-02-10 18:00 ` [PATCH 2/5] staging/lustre/obdecho: Better handle invalid create requests green
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: green @ 2016-02-10 18:00 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, Andreas Dilger
Cc: Linux Kernel Mailing List, Lustre Development List, Oleg Drokin
From: Oleg Drokin <green@linuxhacker.ru>
Dan Carpenter noticed that since we already checked for
(oa->o_valid & OBD_MD_FLID) == 0, that means
(oa->o_valid & OBD_MD_FLID) is always true after that so
no point in checking for it.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/staging/lustre/lustre/obdecho/echo_client.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c
index d3e398f..e1c9d11 100644
--- a/drivers/staging/lustre/lustre/obdecho/echo_client.c
+++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c
@@ -1222,10 +1222,8 @@ static int echo_create_object(const struct lu_env *env, struct echo_device *ed,
}
/* setup object ID here */
- if (oa->o_valid & OBD_MD_FLID) {
- LASSERT(oa->o_valid & OBD_MD_FLGROUP);
- lsm->lsm_oi = oa->o_oi;
- }
+ 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);
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/5] staging/lustre/obdecho: Better handle invalid create requests
2016-02-10 18:00 [PATCH 0/5] Few misc Lustre fixes green
2016-02-10 18:00 ` [PATCH 1/5] staging/lustre/obdecho: Remove always true condition green
@ 2016-02-10 18:00 ` green
2016-02-10 18:00 ` [PATCH 3/5] staging/lustre: Adjust import state history output format green
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: green @ 2016-02-10 18:00 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, Andreas Dilger
Cc: Linux Kernel Mailing List, Lustre Development List, Oleg Drokin
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/5] staging/lustre: Adjust import state history output format
2016-02-10 18:00 [PATCH 0/5] Few misc Lustre fixes green
2016-02-10 18:00 ` [PATCH 1/5] staging/lustre/obdecho: Remove always true condition green
2016-02-10 18:00 ` [PATCH 2/5] staging/lustre/obdecho: Better handle invalid create requests green
@ 2016-02-10 18:00 ` green
2016-02-10 18:00 ` [PATCH 4/5] staging/lustre: Update internal client version green
2016-02-10 18:00 ` [PATCH 5/5] staging/lustre: Remove unused LUSTRE_VERSION_ALLOWED_OFFSET define green
4 siblings, 0 replies; 6+ messages in thread
From: green @ 2016-02-10 18:00 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, Andreas Dilger
Cc: Linux Kernel Mailing List, Lustre Development List, Oleg Drokin
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/5] staging/lustre: Update internal client version.
2016-02-10 18:00 [PATCH 0/5] Few misc Lustre fixes green
` (2 preceding siblings ...)
2016-02-10 18:00 ` [PATCH 3/5] staging/lustre: Adjust import state history output format green
@ 2016-02-10 18:00 ` green
2016-02-10 18:00 ` [PATCH 5/5] staging/lustre: Remove unused LUSTRE_VERSION_ALLOWED_OFFSET define green
4 siblings, 0 replies; 6+ messages in thread
From: green @ 2016-02-10 18:00 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, Andreas Dilger
Cc: Linux Kernel Mailing List, Lustre Development List, Oleg Drokin
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 5/5] staging/lustre: Remove unused LUSTRE_VERSION_ALLOWED_OFFSET define
2016-02-10 18:00 [PATCH 0/5] Few misc Lustre fixes green
` (3 preceding siblings ...)
2016-02-10 18:00 ` [PATCH 4/5] staging/lustre: Update internal client version green
@ 2016-02-10 18:00 ` green
4 siblings, 0 replies; 6+ messages in thread
From: green @ 2016-02-10 18:00 UTC (permalink / raw)
To: Greg Kroah-Hartman, devel, Andreas Dilger
Cc: Linux Kernel Mailing List, Lustre Development List, Oleg Drokin
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-02-10 18:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-10 18:00 [PATCH 0/5] Few misc Lustre fixes green
2016-02-10 18:00 ` [PATCH 1/5] staging/lustre/obdecho: Remove always true condition green
2016-02-10 18:00 ` [PATCH 2/5] staging/lustre/obdecho: Better handle invalid create requests green
2016-02-10 18:00 ` [PATCH 3/5] staging/lustre: Adjust import state history output format green
2016-02-10 18:00 ` [PATCH 4/5] staging/lustre: Update internal client version green
2016-02-10 18:00 ` [PATCH 5/5] staging/lustre: Remove unused LUSTRE_VERSION_ALLOWED_OFFSET define green
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).