linux-kernel.vger.kernel.org archive mirror
 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>,
	James Simmons <jsimmons@infradead.org>,
	James Simmons <uja.ornl@yahoo.com>
Subject: [PATCH 01/29] staging: lustre: osc: remove handling cl_avail_grant less than zero
Date: Thu, 27 Oct 2016 18:11:35 -0400	[thread overview]
Message-ID: <1477606323-30325-2-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1477606323-30325-1-git-send-email-jsimmons@infradead.org>

Earlier cl_avail_grant was changed to an unsigned int. Juila
Lawall reported for the upstream client the following which
affects the Intel branch as well:

drivers/staging/lustre/lustre/osc/osc_request.c:1045:5-24: WARNING: Unsigned
expression compared with zero: cli -> cl_avail_grant < 0

Since cl_avail_grant can never be negative we can remove the
code handling the negative value case.

Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: LU-8697 https://jira.hpdd.intel.com/browse/LU-6303
Reviewed-on: http://review.whamcloud.com/23155
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Frank Zago <fzago@cray.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/osc/osc_request.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
index 038f00c..efd938a 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -801,16 +801,6 @@ static void osc_init_grant(struct client_obd *cli, struct obd_connect_data *ocd)
 		cli->cl_avail_grant = ocd->ocd_grant -
 				      (cli->cl_dirty_pages << PAGE_SHIFT);
 
-	if (cli->cl_avail_grant < 0) {
-		CWARN("%s: available grant < 0: avail/ocd/dirty %ld/%u/%ld\n",
-		      cli->cl_import->imp_obd->obd_name, cli->cl_avail_grant,
-		      ocd->ocd_grant, cli->cl_dirty_pages << PAGE_SHIFT);
-		/* workaround for servers which do not have the patch from
-		 * LU-2679
-		 */
-		cli->cl_avail_grant = ocd->ocd_grant;
-	}
-
 	/* determine the appropriate chunk size used by osc_extent. */
 	cli->cl_chunkbits = max_t(int, PAGE_SHIFT, ocd->ocd_blocksize);
 	spin_unlock(&cli->cl_loi_list_lock);
-- 
1.7.1

  reply	other threads:[~2016-10-27 22:12 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27 22:11 [PATCH 00/29] Batch one for work from 2.7.55 to 2.7.59 James Simmons
2016-10-27 22:11 ` James Simmons [this message]
2016-10-27 22:11 ` [PATCH 02/29] staging: lustre: llite: remove IS_ERR(master_inode) check James Simmons
2016-10-27 22:11 ` [PATCH 03/29] staging: lustre: llite: restart short read/write for normal IO James Simmons
2016-10-27 22:11 ` [PATCH 04/29] staging: lustre: obdclass: variable llog chunk size James Simmons
2016-10-27 22:11 ` [PATCH 05/29] staging: lustre: lmv: allow cross-MDT rename and link James Simmons
2016-10-27 22:11 ` [PATCH 06/29] staging: lustre: ptlrpc: Introduce iovec to bulk descriptor James Simmons
2016-10-27 22:11 ` [PATCH 07/29] staging: lustre: lov: remove LSM from struct lustre_md James Simmons
2016-10-27 22:11 ` [PATCH 08/29] staging: lustre: clio: update file attributes after sync James Simmons
2016-10-27 22:11 ` [PATCH 09/29] staging: lustre: dne: setdirstripe should fail if not supported James Simmons
2016-10-27 22:11 ` [PATCH 10/29] staging: lustre: ptlrpc: embed highest XID in each request James Simmons
2016-10-27 22:11 ` [PATCH 11/29] staging: lustre: llite: basic support of SELinux in CLIO James Simmons
2016-10-27 22:11 ` [PATCH 12/29] staging: lustre: mdc: manage number of modify RPCs in flight James Simmons
2016-10-27 23:40   ` kbuild test robot
2016-10-30 15:04   ` Greg Kroah-Hartman
2016-10-27 22:11 ` [PATCH 13/29] staging: lustre: llite: report back to user bad stripe count James Simmons
2016-10-27 22:11 ` [PATCH 14/29] staging: lustre: ptlrpc: Do not resend req with allow_replay James Simmons
2016-10-27 22:11 ` [PATCH 15/29] staging: lustre: obdecho: don't copy lu_site James Simmons
2016-10-27 22:11 ` [PATCH 16/29] staging: lustre: mdc: deactive MDT permanently James Simmons
2016-10-27 22:11 ` [PATCH 17/29] staging: lustre: ptlrpc: replay bulk request James Simmons
2016-10-27 22:11 ` [PATCH 18/29] staging: lustre: mdt: disable IMA support James Simmons
2016-10-27 22:11 ` [PATCH 19/29] staging: lustre: ldlm: reclaim granted locks defensively James Simmons
2016-10-27 22:11 ` [PATCH 20/29] staging: lustre: recovery: don't skip open replay on reconnect James Simmons
2016-10-27 22:11 ` [PATCH 21/29] staging: lustre: obdclass: race lustre_profile_list James Simmons
2016-10-27 22:11 ` [PATCH 22/29] staging: lustre: llite: add LL_IOC_FUTIMES_3 James Simmons
2016-10-30 14:59   ` Greg Kroah-Hartman
2016-11-07  3:47     ` James Simmons
2016-10-27 22:11 ` [PATCH 23/29] staging: lustre: ptlrpc: do not sleep if encpool reached max capacity James Simmons
2016-10-27 22:11 ` [PATCH 24/29] staging: lustre: ptlrpc: Forbid too early NRS policy tunings James Simmons
2016-10-27 22:11 ` [PATCH 25/29] staging: lustre: llite: Inform copytool of dataversion changes James Simmons
2016-10-27 22:12 ` [PATCH 26/29] staging: lustre: ptlrpc: do not switch out-of-date context James Simmons
2016-10-27 22:12 ` [PATCH 27/29] staging: lustre: headers: Create single .h for lu_seq_range James Simmons
2016-10-27 22:12 ` [PATCH 28/29] staging: lustre: ptlrpc: imp_peer_committed_transno should increase James Simmons
2016-10-27 22:12 ` [PATCH 29/29] staging: lustre: llog: record the minimum record size 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=1477606323-30325-2-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=uja.ornl@yahoo.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;
as well as URLs for NNTP newsgroup(s).