mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Simmons <jsimmons@infradead.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Andreas Dilger <andreas.dilger@intel.com>,
	Oleg Drokin <oleg.drokin@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>,
	Sebastien Buisson <sbuisson@ddn.com>,
	James Simmons <jsimmons@infradead.org>
Subject: [PATCH 5/8] staging: lustre: ldlm: dont always check max_pages_per_rpc alignement
Date: Thu, 28 Apr 2016 12:07:35 -0400	[thread overview]
Message-ID: <1461859658-22200-6-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1461859658-22200-1-git-send-email-jsimmons@infradead.org>

From: Sebastien Buisson <sbuisson@ddn.com>

If connection is not established yet, cli->cl_chunkbits is
uninitilized so we cannot use it to check max_pages_per_rpc
alignment.

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4379
Reviewed-on: http://review.whamcloud.com/8558
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Emoly Liu <emoly.liu@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
index 00c93f3..a80569c 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
@@ -356,6 +356,12 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg)
 	cli->cl_max_pages_per_rpc = min_t(int, PTLRPC_MAX_BRW_PAGES,
 					  LNET_MTU >> PAGE_SHIFT);
 
+	/*
+	 * set cl_chunkbits default value to PAGE_CACHE_SHIFT,
+	 * it will be updated at OSC connection time.
+	 */
+	cli->cl_chunkbits = PAGE_SHIFT;
+
 	if (!strcmp(name, LUSTRE_MDC_NAME)) {
 		cli->cl_max_rpcs_in_flight = MDC_MAX_RIF_DEFAULT;
 	} else if (totalram_pages >> (20 - PAGE_SHIFT) <= 128 /* MB */) {
-- 
2.7.4

  parent reply	other threads:[~2016-04-28 16:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 16:07 [PATCH 0/8] staging : lustre : missing fixes for lustre 2.5.53 James Simmons
2016-04-28 16:07 ` [PATCH 1/8] staging: lustre: debug: initialize debug_msg_data if needed James Simmons
2016-04-28 16:07 ` [PATCH 2/8] staging: lustre: echo: remove echo_env_info() regions from echo_client.c James Simmons
2016-04-28 16:07 ` [PATCH 3/8] staging: lustre: brw: added OBDO short io flag James Simmons
2016-04-28 16:07 ` [PATCH 4/8] staging: lustre: fld: add local fldb to each target James Simmons
2016-04-28 16:07 ` James Simmons [this message]
2016-04-28 16:07 ` [PATCH 6/8] staging: lustre: obd: add case LCFG_PARAM to osd_process_config James Simmons
2016-04-28 16:07 ` [PATCH 7/8] staging: lustre: debugfs: improve osc/mdc "imports" connect data James Simmons
2016-04-28 16:07 ` [PATCH 8/8] staging: lustre: llite: quiet overly verbose info message James Simmons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461859658-22200-6-git-send-email-jsimmons@infradead.org \
    --to=jsimmons@infradead.org \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    --cc=sbuisson@ddn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®