linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version
@ 2016-04-28  1:37 James Simmons
  2016-04-28  1:37 ` [PATCH 01/12] staging: lustre: obd: remove newline from LCONSOLE string James Simmons
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: James Simmons @ 2016-04-28  1:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
  Cc: Linux Kernel Mailing List, Lustre Development List, James Simmons

Assortment of bug fixes that are present in the 2.5.52 version
of lustre that is missing in the upstream client.

Amir Shehata (2):
  staging: lustre: obd: remove newline from LCONSOLE string
  staging: lustre: obd: add newline for dumped config record

Andreas Dilger (1):
  staging: lustre: llite: debugging for ll_file_open LASSERT

Andriy Skulysh (1):
  staging: lustre: libcfs: Fix NUMA emulated mode

Dmitry Eremin (2):
  staging: lustre: ldlm: check all errors during ldlm_debugfs_setup()
  staging: lustre: llite: fixup return value ll_direct_IO_26

Lai Siyao (2):
  staging: lustre: fid: add a connect flag for open by FID
  staging: lustre: llog: we don't need vfsmount

Mikhail Pershin (2):
  staging: lustre: ptlrpc: use unified handler for OST requests
  staging: lustre: ptlrpc: initialize request session early

Swapnil Pimpale (2):
  staging: lustre: obd: cleanup client import if client_obd_setup fails
  staging: lustre: llite: check ret of ll_prep_md_op_data in ll_dir_filler

 .../staging/lustre/lnet/libcfs/linux/linux-cpu.c   |  9 +++-
 .../lustre/lustre/include/lustre/lustre_idl.h      |  3 ++
 .../staging/lustre/lustre/include/lustre_disk.h    |  2 -
 .../lustre/lustre/include/lustre_req_layout.h      |  2 +-
 .../staging/lustre/lustre/include/obd_support.h    |  1 +
 drivers/staging/lustre/lustre/ldlm/ldlm_lib.c      |  1 +
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c |  6 +++
 drivers/staging/lustre/lustre/llite/dir.c          |  7 ++-
 drivers/staging/lustre/lustre/llite/file.c         |  4 +-
 drivers/staging/lustre/lustre/llite/rw26.c         |  2 +-
 .../staging/lustre/lustre/obdclass/obd_config.c    |  3 +-
 drivers/staging/lustre/lustre/ptlrpc/layout.c      | 16 +++++--
 drivers/staging/lustre/lustre/ptlrpc/service.c     | 53 +++++++++++++---------
 drivers/staging/lustre/lustre/ptlrpc/wiretest.c    |  2 +
 14 files changed, 74 insertions(+), 37 deletions(-)

--
2.7.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 01/12] staging: lustre: obd: remove newline from LCONSOLE string
  2016-04-28  1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
@ 2016-04-28  1:37 ` James Simmons
  2016-04-28  1:37 ` [PATCH 02/12] staging: lustre: obd: add newline for dumped config record James Simmons
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: James Simmons @ 2016-04-28  1:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
  Cc: Linux Kernel Mailing List, Lustre Development List, Amir Shehata,
	James Simmons

From: Amir Shehata <amir.shehata@intel.com>

Remove the newline from the LCONSOLE debug macro in the
function class_config_dump_handler().

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2149
Reviewed-on: http://review.whamcloud.com/4254
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/obdclass/obd_config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index 5395e99..084af1a 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -1368,7 +1368,7 @@ int class_config_dump_handler(const struct lu_env *env,
 
 	if (rec->lrh_type == OBD_CFG_REC) {
 		class_config_parse_rec(rec, outstr, 256);
-		LCONSOLE(D_WARNING, "   %s\n", outstr);
+		LCONSOLE(D_WARNING, "   %s", outstr);
 	} else {
 		LCONSOLE(D_WARNING, "unhandled lrh_type: %#x\n", rec->lrh_type);
 		rc = -EINVAL;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 02/12] staging: lustre: obd: add newline for dumped config record
  2016-04-28  1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
  2016-04-28  1:37 ` [PATCH 01/12] staging: lustre: obd: remove newline from LCONSOLE string James Simmons
@ 2016-04-28  1:37 ` James Simmons
  2016-04-28  1:37 ` [PATCH 03/12] staging: lustre: ptlrpc: use unified handler for OST requests James Simmons
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: James Simmons @ 2016-04-28  1:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
  Cc: Linux Kernel Mailing List, Lustre Development List, Amir Shehata,
	James Simmons

From: Amir Shehata <amir.shehata@intel.com>

The function class_config_parse_rec() parses the llog record
and places it into a buffer to be returned. That buffer needs
to end with a newline which is currently missing.

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2149
Reviewed-on: http://review.whamcloud.com/4254
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/obdclass/obd_config.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c
index 084af1a..e60ef4a 100644
--- a/drivers/staging/lustre/lustre/obdclass/obd_config.c
+++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c
@@ -1350,6 +1350,7 @@ static int class_config_parse_rec(struct llog_rec_hdr *rec, char *buf,
 					lustre_cfg_string(lcfg, i));
 		}
 	}
+	ptr += snprintf(ptr, end - ptr, "\n");
 	/* return consumed bytes */
 	rc = ptr - buf;
 	return rc;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 03/12] staging: lustre: ptlrpc: use unified handler for OST requests
  2016-04-28  1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
  2016-04-28  1:37 ` [PATCH 01/12] staging: lustre: obd: remove newline from LCONSOLE string James Simmons
  2016-04-28  1:37 ` [PATCH 02/12] staging: lustre: obd: add newline for dumped config record James Simmons
@ 2016-04-28  1:37 ` James Simmons
  2016-04-28  1:37 ` [PATCH 04/12] staging: lustre: ldlm: check all errors during ldlm_debugfs_setup() James Simmons
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: James Simmons @ 2016-04-28  1:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
  Cc: Linux Kernel Mailing List, Lustre Development List,
	Mikhail Pershin, James Simmons

From: Mikhail Pershin <mike.pershin@intel.com>

Switch OST/OFD request processing to the unified request
handle.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3467
Reviewed-on: http://review.whamcloud.com/7130
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 .../staging/lustre/lustre/include/lustre_req_layout.h    |  2 +-
 drivers/staging/lustre/lustre/include/obd_support.h      |  1 +
 drivers/staging/lustre/lustre/ptlrpc/layout.c            | 16 +++++++++++-----
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_req_layout.h b/drivers/staging/lustre/lustre/include/lustre_req_layout.h
index b2e67fc..b0bc751 100644
--- a/drivers/staging/lustre/lustre/include/lustre_req_layout.h
+++ b/drivers/staging/lustre/lustre/include/lustre_req_layout.h
@@ -199,7 +199,7 @@ extern struct req_format RQF_OST_BRW_READ;
 extern struct req_format RQF_OST_BRW_WRITE;
 extern struct req_format RQF_OST_STATFS;
 extern struct req_format RQF_OST_SET_GRANT_INFO;
-extern struct req_format RQF_OST_GET_INFO_GENERIC;
+extern struct req_format RQF_OST_GET_INFO;
 extern struct req_format RQF_OST_GET_INFO_LAST_ID;
 extern struct req_format RQF_OST_GET_INFO_LAST_FID;
 extern struct req_format RQF_OST_SET_INFO_LAST_FID;
diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h
index c7267b7..2aaa343 100644
--- a/drivers/staging/lustre/lustre/include/obd_support.h
+++ b/drivers/staging/lustre/lustre/include/obd_support.h
@@ -290,6 +290,7 @@ extern char obd_jobid_var[];
 #define OBD_FAIL_OST_ENOINO	      0x229
 #define OBD_FAIL_OST_DQACQ_NET	   0x230
 #define OBD_FAIL_OST_STATFS_EINPROGRESS  0x231
+#define OBD_FAIL_OST_SET_INFO_NET		0x232
 
 #define OBD_FAIL_LDLM		    0x300
 #define OBD_FAIL_LDLM_NAMESPACE_NEW      0x301
diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c
index 5b06901..ccc1f3e 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/layout.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c
@@ -566,7 +566,7 @@ static const struct req_msg_field *ost_get_info_generic_server[] = {
 
 static const struct req_msg_field *ost_get_info_generic_client[] = {
 	&RMF_PTLRPC_BODY,
-	&RMF_SETINFO_KEY
+	&RMF_GETINFO_KEY
 };
 
 static const struct req_msg_field *ost_get_last_id_server[] = {
@@ -574,6 +574,12 @@ static const struct req_msg_field *ost_get_last_id_server[] = {
 	&RMF_OBD_ID
 };
 
+static const struct req_msg_field *ost_get_last_fid_client[] = {
+	&RMF_PTLRPC_BODY,
+	&RMF_GETINFO_KEY,
+	&RMF_FID,
+};
+
 static const struct req_msg_field *ost_get_last_fid_server[] = {
 	&RMF_PTLRPC_BODY,
 	&RMF_FID,
@@ -696,7 +702,7 @@ static struct req_format *req_formats[] = {
 	&RQF_OST_BRW_WRITE,
 	&RQF_OST_STATFS,
 	&RQF_OST_SET_GRANT_INFO,
-	&RQF_OST_GET_INFO_GENERIC,
+	&RQF_OST_GET_INFO,
 	&RQF_OST_GET_INFO_LAST_ID,
 	&RQF_OST_GET_INFO_LAST_FID,
 	&RQF_OST_SET_INFO_LAST_FID,
@@ -1519,10 +1525,10 @@ struct req_format RQF_OST_SET_GRANT_INFO =
 			ost_body_only);
 EXPORT_SYMBOL(RQF_OST_SET_GRANT_INFO);
 
-struct req_format RQF_OST_GET_INFO_GENERIC =
+struct req_format RQF_OST_GET_INFO =
 	DEFINE_REQ_FMT0("OST_GET_INFO", ost_get_info_generic_client,
 			ost_get_info_generic_server);
-EXPORT_SYMBOL(RQF_OST_GET_INFO_GENERIC);
+EXPORT_SYMBOL(RQF_OST_GET_INFO);
 
 struct req_format RQF_OST_GET_INFO_LAST_ID =
 	DEFINE_REQ_FMT0("OST_GET_INFO_LAST_ID", ost_get_info_generic_client,
@@ -1530,7 +1536,7 @@ struct req_format RQF_OST_GET_INFO_LAST_ID =
 EXPORT_SYMBOL(RQF_OST_GET_INFO_LAST_ID);
 
 struct req_format RQF_OST_GET_INFO_LAST_FID =
-	DEFINE_REQ_FMT0("OST_GET_INFO_LAST_FID", obd_set_info_client,
+	DEFINE_REQ_FMT0("OST_GET_INFO_LAST_FID", ost_get_last_fid_client,
 			ost_get_last_fid_server);
 EXPORT_SYMBOL(RQF_OST_GET_INFO_LAST_FID);
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 04/12] staging: lustre: ldlm: check all errors during ldlm_debugfs_setup()
  2016-04-28  1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
                   ` (2 preceding siblings ...)
  2016-04-28  1:37 ` [PATCH 03/12] staging: lustre: ptlrpc: use unified handler for OST requests James Simmons
@ 2016-04-28  1:37 ` James Simmons
  2016-04-28  1:37 ` [PATCH 05/12] staging: lustre: obd: cleanup client import if client_obd_setup fails James Simmons
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: James Simmons @ 2016-04-28  1:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
  Cc: Linux Kernel Mailing List, Lustre Development List,
	Dmitry Eremin, James Simmons

From: Dmitry Eremin <dmitry.eremin@intel.com>

Fix ignoring errors from ldebugfs_add_vars() function.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3885
Reviewed-on: http://review.whamcloud.com/8115
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
index 475fabb..e99c89c 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
@@ -124,9 +124,15 @@ int ldlm_debugfs_setup(void)
 	}
 
 	rc = ldebugfs_add_vars(ldlm_debugfs_dir, ldlm_debugfs_list, NULL);
+	if (rc) {
+		CERROR("LProcFS failed in ldlm-init\n");
+		goto err_svc;
+	}
 
 	return 0;
 
+err_svc:
+	ldebugfs_remove(&ldlm_svc_debugfs_dir);
 err_ns:
 	ldebugfs_remove(&ldlm_ns_debugfs_dir);
 err_type:
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 05/12] staging: lustre: obd: cleanup client import if client_obd_setup fails
  2016-04-28  1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
                   ` (3 preceding siblings ...)
  2016-04-28  1:37 ` [PATCH 04/12] staging: lustre: ldlm: check all errors during ldlm_debugfs_setup() James Simmons
@ 2016-04-28  1:37 ` James Simmons
  2016-04-28  1:37 ` [PATCH 06/12] staging: lustre: fid: add a connect flag for open by FID James Simmons
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: James Simmons @ 2016-04-28  1:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
  Cc: Linux Kernel Mailing List, Lustre Development List,
	Swapnil Pimpale, James Simmons

From: Swapnil Pimpale <spimpale@ddn.com>

client_obd_setup() allocates an obd_import which should be cleaned up
if there is any failure afterwards in callers of client_obd_setup().
This patch fixes the bug in osc_setup(), mgc_setup(), mdc_setup() and
lwp_setup(). The fix is to call obd_cleanup_client_import() before
calling client_obd_cleanup() in case of an error.

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3810
Reviewed-on: http://review.whamcloud.com/7561
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
index 932aef2..00c93f3 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
@@ -439,6 +439,7 @@ int client_obd_cleanup(struct obd_device *obddev)
 	ldlm_namespace_free_post(obddev->obd_namespace);
 	obddev->obd_namespace = NULL;
 
+	obd_cleanup_client_import(obddev);
 	LASSERT(!obddev->u.cli.cl_import);
 
 	ldlm_put_ref();
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 06/12] staging: lustre: fid: add a connect flag for open by FID
  2016-04-28  1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
                   ` (4 preceding siblings ...)
  2016-04-28  1:37 ` [PATCH 05/12] staging: lustre: obd: cleanup client import if client_obd_setup fails James Simmons
@ 2016-04-28  1:37 ` James Simmons
  2016-04-28  1:37 ` [PATCH 07/12] staging: lustre: libcfs: Fix NUMA emulated mode James Simmons
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: James Simmons @ 2016-04-28  1:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
  Cc: Linux Kernel Mailing List, Lustre Development List, Lai Siyao,
	James Simmons

From: Lai Siyao <lai.siyao@intel.com>

Add OBD_CONNECT_OPEN_BY_FID for open by FID, if MDS supports this,
for open by FID, it won't retry with name if object with the FID
doesn't exist; while if client supports this, client won't pack
name in open request if FID is known.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3544
Reviewed-on: http://review.whamcloud.com/8093
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 3 +++
 drivers/staging/lustre/lustre/ptlrpc/wiretest.c           | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 26819ee..0ef540a 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -1257,6 +1257,9 @@ void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
 #define OBD_CONNECT_PINGLESS	0x4000000000000ULL/* pings not required */
 #define OBD_CONNECT_FLOCK_DEAD	0x8000000000000ULL/* flock deadlock detection */
 #define OBD_CONNECT_DISP_STRIPE 0x10000000000000ULL/*create stripe disposition*/
+#define OBD_CONNECT_OPEN_BY_FID	0x20000000000000ULL	/* open by fid won't pack
+							 * name in request
+							 */
 
 /* XXX README XXX:
  * Please DO NOT add flag values here before first ensuring that this same
diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
index 87555e4..308b6b96 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c
@@ -1069,6 +1069,8 @@ void lustre_assert_wire_constants(void)
 		 OBD_CONNECT_PINGLESS);
 	LASSERTF(OBD_CONNECT_FLOCK_DEAD == 0x8000000000000ULL,
 		 "found 0x%.16llxULL\n", OBD_CONNECT_FLOCK_DEAD);
+	LASSERTF(OBD_CONNECT_OPEN_BY_FID == 0x20000000000000ULL,
+		 "found 0x%.16llxULL\n", OBD_CONNECT_OPEN_BY_FID);
 	LASSERTF(OBD_CKSUM_CRC32 == 0x00000001UL, "found 0x%.8xUL\n",
 		(unsigned)OBD_CKSUM_CRC32);
 	LASSERTF(OBD_CKSUM_ADLER == 0x00000002UL, "found 0x%.8xUL\n",
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 07/12] staging: lustre: libcfs: Fix NUMA emulated mode
  2016-04-28  1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
                   ` (5 preceding siblings ...)
  2016-04-28  1:37 ` [PATCH 06/12] staging: lustre: fid: add a connect flag for open by FID James Simmons
@ 2016-04-28  1:37 ` James Simmons
  2016-04-28  1:37 ` [PATCH 08/12] staging: lustre: llite: debugging for ll_file_open LASSERT James Simmons
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: James Simmons @ 2016-04-28  1:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
  Cc: Linux Kernel Mailing List, Lustre Development List,
	Andriy Skulysh, James Simmons

From: Andriy Skulysh <Andriy_Skulysh@xyratex.com>

Kernel commit c1c3443c9c5e9be92641029ed229a41563e44506
assigns all allowed cpus to emulated node.

End cpt initialization loop when all CPUs are assigned.

Signed-off-by: Andriy Skulysh <Andriy_Skulysh@xyratex.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3992
Reviewed-on: http://review.whamcloud.com/7724
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c
index 389fb9e..b52518c5 100644
--- a/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c
+++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-cpu.c
@@ -755,8 +755,13 @@ cfs_cpt_table_create(int ncpt)
 			struct cfs_cpu_partition *part;
 			int    n;
 
-			if (cpt >= ncpt)
-				goto failed;
+			/*
+			 * Each emulated NUMA node has all allowed CPUs in
+			 * the mask.
+			 * End loop when all partitions have assigned CPUs.
+			 */
+			if (cpt == ncpt)
+				break;
 
 			part = &cptab->ctb_parts[cpt];
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 08/12] staging: lustre: llite: debugging for ll_file_open LASSERT
  2016-04-28  1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
                   ` (6 preceding siblings ...)
  2016-04-28  1:37 ` [PATCH 07/12] staging: lustre: libcfs: Fix NUMA emulated mode James Simmons
@ 2016-04-28  1:37 ` James Simmons
  2016-04-28  1:37 ` [PATCH 09/12] staging: lustre: llite: check ret of ll_prep_md_op_data in ll_dir_filler James Simmons
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: James Simmons @ 2016-04-28  1:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
  Cc: Linux Kernel Mailing List, Lustre Development List,
	Andreas Dilger, James Simmons

From: Andreas Dilger <andreas.dilger@intel.com>

Add debugging for LASSERTF(it_disposition(it, DISP_ENQ_OPEN_REF)
in ll_file_open(), since this is a rarely hit failure under racer,
and it would be useful to get more information if this is hit
again.  Print the full intent disposition, as well as the status,
in case Oleg's earlier comment about bailing out on any error is
actually the case here.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1993
Reviewed-on: http://review.whamcloud.com/6250
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/llite/file.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index a8de10e..f47f2ac 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -679,7 +679,9 @@ restart:
 		if (rc)
 			goto out_och_free;
 
-		LASSERT(it_disposition(it, DISP_ENQ_OPEN_REF));
+		LASSERTF(it_disposition(it, DISP_ENQ_OPEN_REF),
+			 "inode %p: disposition %x, status %d\n", inode,
+			 it_disposition(it, ~0), it->d.lustre.it_status);
 
 		rc = ll_local_open(file, it, fd, *och_p);
 		if (rc)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 09/12] staging: lustre: llite: check ret of ll_prep_md_op_data in ll_dir_filler
  2016-04-28  1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
                   ` (7 preceding siblings ...)
  2016-04-28  1:37 ` [PATCH 08/12] staging: lustre: llite: debugging for ll_file_open LASSERT James Simmons
@ 2016-04-28  1:37 ` James Simmons
  2016-04-28  1:37 ` [PATCH 10/12] staging: lustre: llog: we don't need vfsmount James Simmons
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: James Simmons @ 2016-04-28  1:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
  Cc: Linux Kernel Mailing List, Lustre Development List,
	Swapnil Pimpale, James Simmons

From: Swapnil Pimpale <spimpale@ddn.com>

ll_dir_filler() now checks the returned pointer from
ll_prep_md_op_data() using IS_ERR()

Signed-off-by: Swapnil Pimpale <spimpale@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4082
Reviewed-on: http://review.whamcloud.com/8073
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/llite/dir.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
index 09d3297..56aa7de 100644
--- a/drivers/staging/lustre/lustre/llite/dir.c
+++ b/drivers/staging/lustre/lustre/llite/dir.c
@@ -163,6 +163,11 @@ static int ll_dir_filler(void *_hash, struct page *page0)
 
 	LASSERT(max_pages > 0 && max_pages <= MD_MAX_BRW_PAGES);
 
+	op_data = ll_prep_md_op_data(NULL, inode, NULL, NULL, 0, 0,
+				     LUSTRE_OPC_ANY, NULL);
+	if (IS_ERR(op_data))
+		return PTR_ERR(op_data);
+
 	page_pool = kcalloc(max_pages, sizeof(page), GFP_NOFS);
 	if (page_pool) {
 		page_pool[0] = page0;
@@ -177,8 +182,6 @@ static int ll_dir_filler(void *_hash, struct page *page0)
 		page_pool[npages] = page;
 	}
 
-	op_data = ll_prep_md_op_data(NULL, inode, NULL, NULL, 0, 0,
-				     LUSTRE_OPC_ANY, NULL);
 	op_data->op_npages = npages;
 	op_data->op_offset = hash;
 	rc = md_readpage(exp, op_data, page_pool, &request);
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 10/12] staging: lustre: llog: we don't need vfsmount
  2016-04-28  1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
                   ` (8 preceding siblings ...)
  2016-04-28  1:37 ` [PATCH 09/12] staging: lustre: llite: check ret of ll_prep_md_op_data in ll_dir_filler James Simmons
@ 2016-04-28  1:37 ` James Simmons
  2016-04-28  1:37 ` [PATCH 11/12] staging: lustre: ptlrpc: initialize request session early James Simmons
  2016-04-28  1:37 ` [PATCH 12/12] staging: lustre: llite: fixup return value ll_direct_IO_26 James Simmons
  11 siblings, 0 replies; 13+ messages in thread
From: James Simmons @ 2016-04-28  1:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
  Cc: Linux Kernel Mailing List, Lustre Development List, Lai Siyao,
	James Simmons

From: Lai Siyao <lai.siyao@intel.com>

The patch for LU-3286 removed vfsmount instances used
on the server side. Since this is server side only we
can remove it from the upstream client.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3286
Reviewed-on: http://review.whamcloud.com/8286
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/include/lustre_disk.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_disk.h b/drivers/staging/lustre/lustre/include/lustre_disk.h
index 95fd360..b36821f 100644
--- a/drivers/staging/lustre/lustre/include/lustre_disk.h
+++ b/drivers/staging/lustre/lustre/include/lustre_disk.h
@@ -130,7 +130,6 @@ struct lustre_sb_info {
 	struct lustre_mount_data *lsi_lmd;     /* mount command info */
 	struct ll_sb_info	*lsi_llsbi;   /* add'l client sbi info */
 	struct dt_device	 *lsi_dt_dev;  /* dt device to access disk fs*/
-	struct vfsmount	  *lsi_srv_mnt; /* the one server mount */
 	atomic_t	      lsi_mounts;  /* references to the srv_mnt */
 	char			  lsi_svname[MTI_NAME_MAXLEN];
 	char			  lsi_osd_obdname[64];
@@ -158,7 +157,6 @@ struct lustre_sb_info {
 struct lustre_mount_info {
 	char		 *lmi_name;
 	struct super_block   *lmi_sb;
-	struct vfsmount      *lmi_mnt;
 	struct list_head	    lmi_list_chain;
 };
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 11/12] staging: lustre: ptlrpc: initialize request session early
  2016-04-28  1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
                   ` (9 preceding siblings ...)
  2016-04-28  1:37 ` [PATCH 10/12] staging: lustre: llog: we don't need vfsmount James Simmons
@ 2016-04-28  1:37 ` James Simmons
  2016-04-28  1:37 ` [PATCH 12/12] staging: lustre: llite: fixup return value ll_direct_IO_26 James Simmons
  11 siblings, 0 replies; 13+ messages in thread
From: James Simmons @ 2016-04-28  1:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
  Cc: Linux Kernel Mailing List, Lustre Development List,
	Mikhail Pershin, James Simmons

From: Mikhail Pershin <mike.pershin@intel.com>

Initialize request session early to make it available in
high-priority handlers

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3467
Reviewed-on: http://review.whamcloud.com/7350
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/ptlrpc/service.c | 53 +++++++++++++++-----------
 1 file changed, 31 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c
index fc2632f..17c7b97 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/service.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/service.c
@@ -838,6 +838,11 @@ static void ptlrpc_server_finish_request(struct ptlrpc_service_part *svcpt,
 {
 	ptlrpc_server_hpreq_fini(req);
 
+	if (req->rq_session.lc_thread) {
+		lu_context_exit(&req->rq_session);
+		lu_context_fini(&req->rq_session);
+	}
+
 	ptlrpc_server_drop_request(req);
 }
 
@@ -1579,6 +1584,21 @@ ptlrpc_server_handle_req_in(struct ptlrpc_service_part *svcpt,
 	}
 
 	req->rq_svc_thread = thread;
+	if (thread) {
+		/* initialize request session, it is needed for request
+		 * processing by target
+		 */
+		rc = lu_context_init(&req->rq_session,
+				     LCT_SERVER_SESSION | LCT_NOREF);
+		if (rc) {
+			CERROR("%s: failure to initialize session: rc = %d\n",
+			       thread->t_name, rc);
+			goto err_req;
+		}
+		req->rq_session.lc_thread = thread;
+		lu_context_enter(&req->rq_session);
+		req->rq_svc_thread->t_env->le_ses = &req->rq_session;
+	}
 
 	ptlrpc_at_add_timed(req);
 
@@ -1612,7 +1632,6 @@ ptlrpc_server_handle_request(struct ptlrpc_service_part *svcpt,
 	struct timespec64 arrived;
 	unsigned long timediff_usecs;
 	unsigned long arrived_usecs;
-	int rc;
 	int fail_opc = 0;
 
 	request = ptlrpc_server_request_get(svcpt, false);
@@ -1649,22 +1668,6 @@ ptlrpc_server_handle_request(struct ptlrpc_service_part *svcpt,
 				    at_get(&svcpt->scp_at_estimate));
 	}
 
-	rc = lu_context_init(&request->rq_session, LCT_SERVER_SESSION |
-						   LCT_NOREF);
-	if (rc) {
-		CERROR("Failure to initialize session: %d\n", rc);
-		goto out_req;
-	}
-	request->rq_session.lc_thread = thread;
-	request->rq_session.lc_cookie = 0x5;
-	lu_context_enter(&request->rq_session);
-
-	CDEBUG(D_NET, "got req %llu\n", request->rq_xid);
-
-	request->rq_svc_thread = thread;
-	if (thread)
-		request->rq_svc_thread->t_env->le_ses = &request->rq_session;
-
 	if (likely(request->rq_export)) {
 		if (unlikely(ptlrpc_check_req(request)))
 			goto put_conn;
@@ -1696,14 +1699,21 @@ ptlrpc_server_handle_request(struct ptlrpc_service_part *svcpt,
 	if (lustre_msg_get_opc(request->rq_reqmsg) != OBD_PING)
 		CFS_FAIL_TIMEOUT_MS(OBD_FAIL_PTLRPC_PAUSE_REQ, cfs_fail_val);
 
-	rc = svc->srv_ops.so_req_handler(request);
+	CDEBUG(D_NET, "got req %llu\n", request->rq_xid);
+
+	/* re-assign request and sesson thread to the current one */
+	request->rq_svc_thread = thread;
+	if (thread) {
+		LASSERT(request->rq_session.lc_thread);
+		request->rq_session.lc_thread = thread;
+		request->rq_session.lc_cookie = 0x55;
+		thread->t_env->le_ses = &request->rq_session;
+	}
+	svc->srv_ops.so_req_handler(request);
 
 	ptlrpc_rqphase_move(request, RQ_PHASE_COMPLETE);
 
 put_conn:
-	lu_context_exit(&request->rq_session);
-	lu_context_fini(&request->rq_session);
-
 	if (unlikely(ktime_get_real_seconds() > request->rq_deadline)) {
 		DEBUG_REQ(D_WARNING, request,
 			  "Request took longer than estimated (%lld:%llds); "
@@ -1757,7 +1767,6 @@ put_conn:
 			  request->rq_arrival_time.tv_sec);
 	}
 
-out_req:
 	ptlrpc_server_finish_active_request(svcpt, request);
 
 	return 1;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH 12/12] staging: lustre: llite: fixup return value ll_direct_IO_26
  2016-04-28  1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
                   ` (10 preceding siblings ...)
  2016-04-28  1:37 ` [PATCH 11/12] staging: lustre: ptlrpc: initialize request session early James Simmons
@ 2016-04-28  1:37 ` James Simmons
  11 siblings, 0 replies; 13+ messages in thread
From: James Simmons @ 2016-04-28  1:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, devel, Andreas Dilger, Oleg Drokin
  Cc: Linux Kernel Mailing List, Lustre Development List,
	Dmitry Eremin, James Simmons

From: Dmitry Eremin <dmitry.eremin@intel.com>

Return the correct values from ll_direct_IO_26.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4069
Reviewed-on: http://review.whamcloud.com/8080
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-Off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/llite/rw26.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/llite/rw26.c b/drivers/staging/lustre/lustre/llite/rw26.c
index a740c7a..9341189 100644
--- a/drivers/staging/lustre/lustre/llite/rw26.c
+++ b/drivers/staging/lustre/lustre/llite/rw26.c
@@ -446,7 +446,7 @@ out:
 	}
 
 	cl_env_put(env, &refcheck);
-	return tot_bytes ? : result;
+	return tot_bytes ? tot_bytes : result;
 }
 
 /**
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-04-28  1:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-28  1:37 [PATCH 00/12] staging: lustre: add patches from lustre 2.5.52 version James Simmons
2016-04-28  1:37 ` [PATCH 01/12] staging: lustre: obd: remove newline from LCONSOLE string James Simmons
2016-04-28  1:37 ` [PATCH 02/12] staging: lustre: obd: add newline for dumped config record James Simmons
2016-04-28  1:37 ` [PATCH 03/12] staging: lustre: ptlrpc: use unified handler for OST requests James Simmons
2016-04-28  1:37 ` [PATCH 04/12] staging: lustre: ldlm: check all errors during ldlm_debugfs_setup() James Simmons
2016-04-28  1:37 ` [PATCH 05/12] staging: lustre: obd: cleanup client import if client_obd_setup fails James Simmons
2016-04-28  1:37 ` [PATCH 06/12] staging: lustre: fid: add a connect flag for open by FID James Simmons
2016-04-28  1:37 ` [PATCH 07/12] staging: lustre: libcfs: Fix NUMA emulated mode James Simmons
2016-04-28  1:37 ` [PATCH 08/12] staging: lustre: llite: debugging for ll_file_open LASSERT James Simmons
2016-04-28  1:37 ` [PATCH 09/12] staging: lustre: llite: check ret of ll_prep_md_op_data in ll_dir_filler James Simmons
2016-04-28  1:37 ` [PATCH 10/12] staging: lustre: llog: we don't need vfsmount James Simmons
2016-04-28  1:37 ` [PATCH 11/12] staging: lustre: ptlrpc: initialize request session early James Simmons
2016-04-28  1:37 ` [PATCH 12/12] staging: lustre: llite: fixup return value ll_direct_IO_26 James Simmons

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).