public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: green@linuxhacker.ru
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org,
	Andreas Dilger <andreas.dilger@intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Lustre Development List <lustre-devel@lists.lustre.org>,
	Oleg Drokin <green@linuxhacker.ru>
Subject: [PATCH 05/25] staging/lustre: Remove unused lustre_build_lock_params()
Date: Fri, 26 Feb 2016 01:49:53 -0500	[thread overview]
Message-ID: <1456469413-931943-6-git-send-email-green@linuxhacker.ru> (raw)
In-Reply-To: <1456469413-931943-1-git-send-email-green@linuxhacker.ru>

From: Oleg Drokin <green@linuxhacker.ru>

And also struct lustre_rw_params that is only referenced by it.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
 .../staging/lustre/lustre/include/lustre_lite.h    | 48 ----------------------
 1 file changed, 48 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_lite.h b/drivers/staging/lustre/lustre/include/lustre_lite.h
index f6d7aae..9852325 100644
--- a/drivers/staging/lustre/lustre/include/lustre_lite.h
+++ b/drivers/staging/lustre/lustre/include/lustre_lite.h
@@ -53,54 +53,6 @@
 #define LL_MAX_BLKSIZE_BITS     (22)
 #define LL_MAX_BLKSIZE	  (1UL<<LL_MAX_BLKSIZE_BITS)
 
-#include "lustre/lustre_user.h"
-
-struct lustre_rw_params {
-	int		lrp_lock_mode;
-	ldlm_policy_data_t lrp_policy;
-	u32		lrp_brw_flags;
-	int		lrp_ast_flags;
-};
-
-/*
- * XXX nikita: this function lives in the header because it is used by both
- * llite kernel module and liblustre library, and there is no (?) better place
- * to put it in.
- */
-static inline void lustre_build_lock_params(int cmd, unsigned long open_flags,
-					    __u64 connect_flags,
-					    loff_t pos, ssize_t len,
-					    struct lustre_rw_params *params)
-{
-	params->lrp_lock_mode = (cmd == OBD_BRW_READ) ? LCK_PR : LCK_PW;
-	params->lrp_brw_flags = 0;
-
-	params->lrp_policy.l_extent.start = pos;
-	params->lrp_policy.l_extent.end = pos + len - 1;
-	/*
-	 * for now O_APPEND always takes local locks.
-	 */
-	if (cmd == OBD_BRW_WRITE && (open_flags & O_APPEND)) {
-		params->lrp_policy.l_extent.start = 0;
-		params->lrp_policy.l_extent.end   = OBD_OBJECT_EOF;
-	} else if (LIBLUSTRE_CLIENT && (connect_flags & OBD_CONNECT_SRVLOCK)) {
-		/*
-		 * liblustre: OST-side locking for all non-O_APPEND
-		 * reads/writes.
-		 */
-		params->lrp_lock_mode = LCK_NL;
-		params->lrp_brw_flags = OBD_BRW_SRVLOCK;
-	} else {
-		/*
-		 * nothing special for the kernel. In the future llite may use
-		 * OST-side locks for small writes into highly contended
-		 * files.
-		 */
-	}
-	params->lrp_ast_flags = (open_flags & O_NONBLOCK) ?
-		LDLM_FL_BLOCK_NOWAIT : 0;
-}
-
 /*
  * This is embedded into liblustre and llite super-blocks to keep track of
  * connect flags (capabilities) supported by all imports given mount is
-- 
2.1.0

  parent reply	other threads:[~2016-02-26  6:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26  6:49 [PATCH 00/25] Lustre cleanups continued green
2016-02-26  6:49 ` [PATCH 01/25] staging/lustre/llite: Fix style vs open parenthesis alignment green
2016-02-26  6:49 ` [PATCH 02/25] staging/lustre/include: Fix style of function declarations green
2016-02-26  6:49 ` [PATCH 03/25] staging/lustre/fld: Fix style vs open parenthesis alignment green
2016-02-26  6:49 ` [PATCH 04/25] staging/lustre: Remove unused liblustre_check_services prototype green
2016-02-26  6:49 ` green [this message]
2016-02-26  6:49 ` [PATCH 06/25] staging/lustre: Convert ptlrpc_at_check_timed to void green
2016-02-26  6:49 ` [PATCH 07/25] staging/lustre: Remove misleading liblustre comments green
2016-02-26  6:49 ` [PATCH 08/25] staging/lustre: Remove liblustre references from explanations green
2016-02-26  6:49 ` [PATCH 09/25] staging/lustre/lmv: Remove commented out MDS selection policies green
2016-02-26  6:49 ` [PATCH 10/25] staging/lustre: F_SETLKW64 F_SETLK64 F_GETLK64 are always defined green
2016-02-26  6:49 ` [PATCH 11/25] staging/lustre: MS_POSIXACL is always defined, don't check for it green
2016-02-26  6:50 ` [PATCH 12/25] staging/lustre: Remove RELEASEPAGE_ARG_TYPE compat macro green
2016-02-26  6:50 ` [PATCH 13/25] staging/lustre: NEED_QUOTA_DEFS is never defined, drop it green
2016-02-26  6:50 ` [PATCH 14/25] staging/lustre/ptlrpc: Fix style vs open parenthesis alignment green
2016-02-26  6:50 ` [PATCH 15/25] staging/lustre/osc: " green
2016-02-26  6:50 ` [PATCH 16/25] staging/lustre/obdclass: " green
2016-02-26  6:50 ` [PATCH 17/25] staging/lustre/lov: " green
2016-02-26  6:50 ` [PATCH 18/25] staging/lustre/mdc: " green
2016-02-26  6:50 ` [PATCH 19/25] staging/lustre/mgc: " green
2016-02-26  6:50 ` [PATCH 20/25] staging/lustre/obdecho: " green
2016-02-26  6:50 ` [PATCH 21/25] staging/lustre/lmv: " green
2016-02-26  6:50 ` [PATCH 22/25] staging/lustre: Fix lines that start with spaces green
2016-02-26  6:50 ` [PATCH 23/25] staging/lustre: Rework MAX_DIO_SIZE macro green
2016-02-26  6:50 ` [PATCH 24/25] staging/lustre: Remove unneeded {} in lprocfs_stats_unlock() green
2016-02-26  6:50 ` [PATCH 25/25] staging/lustre/ptlrpc: Fix ENABLE_PINGER ifdef green

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=1456469413-931943-6-git-send-email-green@linuxhacker.ru \
    --to=green@linuxhacker.ru \
    --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 \
    /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