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>,
	Dmitry Eremin <dmitry.eremin@intel.com>,
	James Simmons <jsimmons@infradead.org>
Subject: [PATCH 092/124] staging: lustre: ptlrpc: fix comparison between signed and unsigned
Date: Sun, 18 Sep 2016 16:38:31 -0400	[thread overview]
Message-ID: <1474231143-4061-93-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1474231143-4061-1-git-send-email-jsimmons@infradead.org>

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

Change return type and size argiments of lustre_msg_hdr_size(),
lustre_msg_buf{len,count}() and req_capsule_*_size() to __u32.
Change type of req_format->rf_idx and req_format->rf_fields.nr
to size_t. Also return zero for incorrect message magic instead
of -EINVAL. This will be more robust because of few of them after
LASSERTF(0, "...") and will not be returned. In the rest places
it return zero size instead of huge number after implicit
unsigned conversion.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577
Reviewed-on: http://review.whamcloud.com/12475
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Fan Yong <fan.yong@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/include/lustre_net.h |   34 ++++----
 .../lustre/lustre/include/lustre_req_layout.h      |   20 +++---
 drivers/staging/lustre/lustre/ldlm/ldlm_request.c  |    4 +-
 drivers/staging/lustre/lustre/ptlrpc/layout.c      |   83 ++++++++++----------
 .../staging/lustre/lustre/ptlrpc/pack_generic.c    |   62 +++++++--------
 5 files changed, 101 insertions(+), 102 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h
index 531c628..21e2267 100644
--- a/drivers/staging/lustre/lustre/include/lustre_net.h
+++ b/drivers/staging/lustre/lustre/include/lustre_net.h
@@ -2616,9 +2616,9 @@ int ptlrpc_reconnect_import(struct obd_import *imp);
  * @{
  */
 int ptlrpc_buf_need_swab(struct ptlrpc_request *req, const int inout,
-			 int index);
+			 u32 index);
 void ptlrpc_buf_set_swabbed(struct ptlrpc_request *req, const int inout,
-			    int index);
+			    u32 index);
 int ptlrpc_unpack_rep_msg(struct ptlrpc_request *req, int len);
 int ptlrpc_unpack_req_msg(struct ptlrpc_request *req, int len);
 
@@ -2637,27 +2637,27 @@ int lustre_shrink_msg(struct lustre_msg *msg, int segment,
 		      unsigned int newlen, int move_data);
 void lustre_free_reply_state(struct ptlrpc_reply_state *rs);
 int __lustre_unpack_msg(struct lustre_msg *m, int len);
-int lustre_msg_hdr_size(__u32 magic, int count);
-int lustre_msg_size(__u32 magic, int count, __u32 *lengths);
-int lustre_msg_size_v2(int count, __u32 *lengths);
-int lustre_packed_msg_size(struct lustre_msg *msg);
-int lustre_msg_early_size(void);
-void *lustre_msg_buf_v2(struct lustre_msg_v2 *m, int n, int min_size);
-void *lustre_msg_buf(struct lustre_msg *m, int n, int minlen);
-int lustre_msg_buflen(struct lustre_msg *m, int n);
-int lustre_msg_bufcount(struct lustre_msg *m);
-char *lustre_msg_string(struct lustre_msg *m, int n, int max_len);
+u32 lustre_msg_hdr_size(__u32 magic, u32 count);
+u32 lustre_msg_size(__u32 magic, int count, __u32 *lengths);
+u32 lustre_msg_size_v2(int count, __u32 *lengths);
+u32 lustre_packed_msg_size(struct lustre_msg *msg);
+u32 lustre_msg_early_size(void);
+void *lustre_msg_buf_v2(struct lustre_msg_v2 *m, u32 n, u32 min_size);
+void *lustre_msg_buf(struct lustre_msg *m, u32 n, u32 minlen);
+u32 lustre_msg_buflen(struct lustre_msg *m, u32 n);
+u32 lustre_msg_bufcount(struct lustre_msg *m);
+char *lustre_msg_string(struct lustre_msg *m, u32 n, u32 max_len);
 __u32 lustre_msghdr_get_flags(struct lustre_msg *msg);
 void lustre_msghdr_set_flags(struct lustre_msg *msg, __u32 flags);
 __u32 lustre_msg_get_flags(struct lustre_msg *msg);
-void lustre_msg_add_flags(struct lustre_msg *msg, int flags);
-void lustre_msg_set_flags(struct lustre_msg *msg, int flags);
-void lustre_msg_clear_flags(struct lustre_msg *msg, int flags);
+void lustre_msg_add_flags(struct lustre_msg *msg, u32 flags);
+void lustre_msg_set_flags(struct lustre_msg *msg, u32 flags);
+void lustre_msg_clear_flags(struct lustre_msg *msg, u32 flags);
 __u32 lustre_msg_get_op_flags(struct lustre_msg *msg);
-void lustre_msg_add_op_flags(struct lustre_msg *msg, int flags);
+void lustre_msg_add_op_flags(struct lustre_msg *msg, u32 flags);
 struct lustre_handle *lustre_msg_get_handle(struct lustre_msg *msg);
 __u32 lustre_msg_get_type(struct lustre_msg *msg);
-void lustre_msg_add_version(struct lustre_msg *msg, int version);
+void lustre_msg_add_version(struct lustre_msg *msg, u32 version);
 __u32 lustre_msg_get_opc(struct lustre_msg *msg);
 __u64 lustre_msg_get_last_committed(struct lustre_msg *msg);
 __u64 *lustre_msg_get_versions(struct lustre_msg *msg);
diff --git a/drivers/staging/lustre/lustre/include/lustre_req_layout.h b/drivers/staging/lustre/lustre/include/lustre_req_layout.h
index ca0e683..a13558e 100644
--- a/drivers/staging/lustre/lustre/include/lustre_req_layout.h
+++ b/drivers/staging/lustre/lustre/include/lustre_req_layout.h
@@ -76,7 +76,8 @@ void req_capsule_init(struct req_capsule *pill, struct ptlrpc_request *req,
 void req_capsule_fini(struct req_capsule *pill);
 
 void req_capsule_set(struct req_capsule *pill, const struct req_format *fmt);
-int req_capsule_filled_sizes(struct req_capsule *pill, enum req_location loc);
+size_t req_capsule_filled_sizes(struct req_capsule *pill,
+				enum req_location loc);
 int  req_capsule_server_pack(struct req_capsule *pill);
 
 void *req_capsule_client_get(struct req_capsule *pill,
@@ -86,27 +87,27 @@ void *req_capsule_client_swab_get(struct req_capsule *pill,
 				  void *swabber);
 void *req_capsule_client_sized_get(struct req_capsule *pill,
 				   const struct req_msg_field *field,
-				   int len);
+				   u32 len);
 void *req_capsule_server_get(struct req_capsule *pill,
 			     const struct req_msg_field *field);
 void *req_capsule_server_sized_get(struct req_capsule *pill,
 				   const struct req_msg_field *field,
-				   int len);
+				   u32 len);
 void *req_capsule_server_swab_get(struct req_capsule *pill,
 				  const struct req_msg_field *field,
 				  void *swabber);
 void *req_capsule_server_sized_swab_get(struct req_capsule *pill,
 					const struct req_msg_field *field,
-					int len, void *swabber);
+					u32 len, void *swabber);
 
 void req_capsule_set_size(struct req_capsule *pill,
 			  const struct req_msg_field *field,
-			  enum req_location loc, int size);
-int req_capsule_get_size(const struct req_capsule *pill,
+			  enum req_location loc, u32 size);
+u32 req_capsule_get_size(const struct req_capsule *pill,
 			 const struct req_msg_field *field,
 			 enum req_location loc);
-int req_capsule_msg_size(struct req_capsule *pill, enum req_location loc);
-int req_capsule_fmt_size(__u32 magic, const struct req_format *fmt,
+u32 req_capsule_msg_size(struct req_capsule *pill, enum req_location loc);
+u32 req_capsule_fmt_size(__u32 magic, const struct req_format *fmt,
 			 enum req_location loc);
 void req_capsule_extend(struct req_capsule *pill, const struct req_format *fmt);
 
@@ -115,8 +116,7 @@ int req_capsule_has_field(const struct req_capsule *pill,
 			  enum req_location loc);
 void req_capsule_shrink(struct req_capsule *pill,
 			const struct req_msg_field *field,
-			unsigned int newlen,
-			enum req_location loc);
+			u32 newlen, enum req_location loc);
 int  req_layout_init(void);
 void req_layout_fini(void);
 
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
index 582de52..35ba6f1 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
@@ -561,7 +561,7 @@ static inline int ldlm_capsule_handles_avail(struct req_capsule *pill,
 					     enum req_location loc,
 					     int off)
 {
-	int size = req_capsule_msg_size(pill, loc);
+	u32 size = req_capsule_msg_size(pill, loc);
 
 	return ldlm_req_handles_avail(size, off);
 }
@@ -570,7 +570,7 @@ static inline int ldlm_format_handles_avail(struct obd_import *imp,
 					    const struct req_format *fmt,
 					    enum req_location loc, int off)
 {
-	int size = req_capsule_fmt_size(imp->imp_msg_magic, fmt, loc);
+	u32 size = req_capsule_fmt_size(imp->imp_msg_magic, fmt, loc);
 
 	return ldlm_req_handles_avail(size, off);
 }
diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c
index 101ac87..839ef3e 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/layout.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c
@@ -1113,9 +1113,9 @@ EXPORT_SYMBOL(RMF_SWAP_LAYOUTS);
 
 struct req_format {
 	const char *rf_name;
-	int rf_idx;
+	size_t rf_idx;
 	struct {
-		int nr;
+		size_t nr;
 		const struct req_msg_field **d;
 	} rf_fields[RCL_NR];
 };
@@ -1555,9 +1555,9 @@ EXPORT_SYMBOL(RQF_OST_GET_INFO_FIEMAP);
  */
 int req_layout_init(void)
 {
-	int i;
-	int j;
-	int k;
+	size_t i;
+	size_t j;
+	size_t k;
 	struct req_format *rf = NULL;
 
 	for (i = 0; i < ARRAY_SIZE(req_formats); ++i) {
@@ -1599,7 +1599,7 @@ EXPORT_SYMBOL(req_layout_fini);
  */
 static void req_capsule_init_area(struct req_capsule *pill)
 {
-	int i;
+	size_t i;
 
 	for (i = 0; i < ARRAY_SIZE(pill->rc_area[RCL_CLIENT]); i++) {
 		pill->rc_area[RCL_CLIENT][i] = -1;
@@ -1650,8 +1650,7 @@ EXPORT_SYMBOL(req_capsule_fini);
 
 static int __req_format_is_sane(const struct req_format *fmt)
 {
-	return
-		0 <= fmt->rf_idx && fmt->rf_idx < ARRAY_SIZE(req_formats) &&
+	return fmt->rf_idx < ARRAY_SIZE(req_formats) &&
 		req_formats[fmt->rf_idx] == fmt;
 }
 
@@ -1685,11 +1684,11 @@ EXPORT_SYMBOL(req_capsule_set);
  * variable-sized fields.  The field sizes come from the declared \a rmf_size
  * field of a \a pill's \a rc_fmt's RMF's.
  */
-int req_capsule_filled_sizes(struct req_capsule *pill,
-			     enum req_location loc)
+size_t req_capsule_filled_sizes(struct req_capsule *pill,
+				enum req_location loc)
 {
 	const struct req_format *fmt = pill->rc_fmt;
-	int i;
+	size_t i;
 
 	for (i = 0; i < fmt->rf_fields[loc].nr; ++i) {
 		if (pill->rc_area[loc][i] == -1) {
@@ -1744,11 +1743,11 @@ EXPORT_SYMBOL(req_capsule_server_pack);
  * Returns the PTLRPC request or reply (\a loc) buffer offset of a \a pill
  * corresponding to the given RMF (\a field).
  */
-static int __req_capsule_offset(const struct req_capsule *pill,
+static u32 __req_capsule_offset(const struct req_capsule *pill,
 				const struct req_msg_field *field,
 				enum req_location loc)
 {
-	int offset;
+	u32 offset;
 
 	offset = field->rmf_offset[pill->rc_fmt->rf_idx][loc];
 	LASSERTF(offset > 0, "%s:%s, off=%d, loc=%d\n", pill->rc_fmt->rf_name,
@@ -1852,10 +1851,10 @@ static void *__req_capsule_get(struct req_capsule *pill,
 	const struct req_format *fmt;
 	struct lustre_msg *msg;
 	void *value;
-	int len;
-	int offset;
+	u32 len;
+	u32 offset;
 
-	void *(*getter)(struct lustre_msg *m, int n, int minlen);
+	void *(*getter)(struct lustre_msg *m, u32 n, u32 minlen);
 
 	static const char *rcl_names[RCL_NR] = {
 		[RCL_CLIENT] = "client",
@@ -1882,20 +1881,20 @@ static void *__req_capsule_get(struct req_capsule *pill,
 		 */
 		len = lustre_msg_buflen(msg, offset);
 		if ((len % field->rmf_size) != 0) {
-			CERROR("%s: array field size mismatch %d modulo %d != 0 (%d)\n",
+			CERROR("%s: array field size mismatch %d modulo %u != 0 (%d)\n",
 			       field->rmf_name, len, field->rmf_size, loc);
 			return NULL;
 		}
 	} else if (pill->rc_area[loc][offset] != -1) {
 		len = pill->rc_area[loc][offset];
 	} else {
-		len = max(field->rmf_size, 0);
+		len = max_t(typeof(field->rmf_size), field->rmf_size, 0);
 	}
 	value = getter(msg, offset, len);
 
 	if (!value) {
 		DEBUG_REQ(D_ERROR, pill->rc_req,
-			  "Wrong buffer for field `%s' (%d of %d) in format `%s': %d vs. %d (%s)\n",
+			  "Wrong buffer for field `%s' (%u of %u) in format `%s': %u vs. %u (%s)\n",
 			  field->rmf_name, offset, lustre_msg_bufcount(msg),
 			  fmt->rf_name, lustre_msg_buflen(msg, offset), len,
 			  rcl_names[loc]);
@@ -1941,7 +1940,7 @@ EXPORT_SYMBOL(req_capsule_client_swab_get);
  */
 void *req_capsule_client_sized_get(struct req_capsule *pill,
 				   const struct req_msg_field *field,
-				   int len)
+				   u32 len)
 {
 	req_capsule_set_size(pill, field, RCL_CLIENT, len);
 	return __req_capsule_get(pill, field, RCL_CLIENT, NULL, 0);
@@ -1982,7 +1981,7 @@ EXPORT_SYMBOL(req_capsule_server_swab_get);
  */
 void *req_capsule_server_sized_get(struct req_capsule *pill,
 				   const struct req_msg_field *field,
-				   int len)
+				   u32 len)
 {
 	req_capsule_set_size(pill, field, RCL_SERVER, len);
 	return __req_capsule_get(pill, field, RCL_SERVER, NULL, 0);
@@ -1991,7 +1990,7 @@ EXPORT_SYMBOL(req_capsule_server_sized_get);
 
 void *req_capsule_server_sized_swab_get(struct req_capsule *pill,
 					const struct req_msg_field *field,
-					int len, void *swabber)
+					u32 len, void *swabber)
 {
 	req_capsule_set_size(pill, field, RCL_SERVER, len);
 	return __req_capsule_get(pill, field, RCL_SERVER, swabber, 0);
@@ -2007,23 +2006,25 @@ EXPORT_SYMBOL(req_capsule_server_sized_swab_get);
  */
 void req_capsule_set_size(struct req_capsule *pill,
 			  const struct req_msg_field *field,
-			  enum req_location loc, int size)
+			  enum req_location loc, u32 size)
 {
 	LASSERT(loc == RCL_SERVER || loc == RCL_CLIENT);
 
-	if ((size != field->rmf_size) &&
+	if ((size != (u32)field->rmf_size) &&
 	    (field->rmf_size != -1) &&
 	    !(field->rmf_flags & RMF_F_NO_SIZE_CHECK) &&
 	    (size > 0)) {
+		u32 rmf_size = (u32)field->rmf_size;
+
 		if ((field->rmf_flags & RMF_F_STRUCT_ARRAY) &&
-		    (size % field->rmf_size != 0)) {
-			CERROR("%s: array field size mismatch %d %% %d != 0 (%d)\n",
-			       field->rmf_name, size, field->rmf_size, loc);
+		    (size % rmf_size != 0)) {
+			CERROR("%s: array field size mismatch %u %% %u != 0 (%d)\n",
+			       field->rmf_name, size, rmf_size, loc);
 			LBUG();
 		} else if (!(field->rmf_flags & RMF_F_STRUCT_ARRAY) &&
-		    size < field->rmf_size) {
-			CERROR("%s: field size mismatch %d != %d (%d)\n",
-			       field->rmf_name, size, field->rmf_size, loc);
+			   size < rmf_size) {
+			CERROR("%s: field size mismatch %u != %u (%d)\n",
+			       field->rmf_name, size, rmf_size, loc);
 			LBUG();
 		}
 	}
@@ -2040,7 +2041,7 @@ EXPORT_SYMBOL(req_capsule_set_size);
  * actually sets the size in pill.rc_area[loc][offset], but this function
  * returns the message buflen[offset], maybe we should use another name.
  */
-int req_capsule_get_size(const struct req_capsule *pill,
+u32 req_capsule_get_size(const struct req_capsule *pill,
 			 const struct req_msg_field *field,
 			 enum req_location loc)
 {
@@ -2058,7 +2059,7 @@ EXPORT_SYMBOL(req_capsule_get_size);
  *
  * See also req_capsule_set_size().
  */
-int req_capsule_msg_size(struct req_capsule *pill, enum req_location loc)
+u32 req_capsule_msg_size(struct req_capsule *pill, enum req_location loc)
 {
 	return lustre_msg_size(pill->rc_req->rq_import->imp_msg_magic,
 			       pill->rc_fmt->rf_fields[loc].nr,
@@ -2073,10 +2074,11 @@ int req_capsule_msg_size(struct req_capsule *pill, enum req_location loc)
  * This function should not be used for formats which contain variable size
  * fields.
  */
-int req_capsule_fmt_size(__u32 magic, const struct req_format *fmt,
+u32 req_capsule_fmt_size(__u32 magic, const struct req_format *fmt,
 			 enum req_location loc)
 {
-	int size, i = 0;
+	size_t i = 0;
+	u32 size;
 
 	/*
 	 * This function should probably LASSERT() that fmt has no fields with
@@ -2086,7 +2088,7 @@ int req_capsule_fmt_size(__u32 magic, const struct req_format *fmt,
 	 * we do.
 	 */
 	size = lustre_msg_hdr_size(magic, fmt->rf_fields[loc].nr);
-	if (size < 0)
+	if (!size)
 		return size;
 
 	for (; i < fmt->rf_fields[loc].nr; ++i)
@@ -2118,7 +2120,7 @@ int req_capsule_fmt_size(__u32 magic, const struct req_format *fmt,
 void req_capsule_extend(struct req_capsule *pill, const struct req_format *fmt)
 {
 	int i;
-	int j;
+	size_t j;
 
 	const struct req_format *old;
 
@@ -2176,7 +2178,7 @@ static int req_capsule_field_present(const struct req_capsule *pill,
 				     const struct req_msg_field *field,
 				     enum req_location loc)
 {
-	int offset;
+	u32 offset;
 
 	LASSERT(loc == RCL_SERVER || loc == RCL_CLIENT);
 	LASSERT(req_capsule_has_field(pill, field, loc));
@@ -2193,12 +2195,11 @@ static int req_capsule_field_present(const struct req_capsule *pill,
  */
 void req_capsule_shrink(struct req_capsule *pill,
 			const struct req_msg_field *field,
-			unsigned int newlen,
-			enum req_location loc)
+			u32 newlen, enum req_location loc)
 {
 	const struct req_format *fmt;
 	struct lustre_msg *msg;
-	int len;
+	u32 len;
 	int offset;
 
 	fmt = pill->rc_fmt;
@@ -2211,7 +2212,7 @@ void req_capsule_shrink(struct req_capsule *pill,
 
 	msg = __req_msg(pill, loc);
 	len = lustre_msg_buflen(msg, offset);
-	LASSERTF(newlen <= len, "%s:%s, oldlen=%d, newlen=%d\n",
+	LASSERTF(newlen <= len, "%s:%s, oldlen=%u, newlen=%u\n",
 		 fmt->rf_name, field->rmf_name, len, newlen);
 
 	if (loc == RCL_CLIENT)
diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
index 87027c5..a1ea0c2 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
@@ -50,26 +50,26 @@
 
 #include "ptlrpc_internal.h"
 
-static inline int lustre_msg_hdr_size_v2(int count)
+static inline u32 lustre_msg_hdr_size_v2(u32 count)
 {
 	return cfs_size_round(offsetof(struct lustre_msg_v2,
 				       lm_buflens[count]));
 }
 
-int lustre_msg_hdr_size(__u32 magic, int count)
+u32 lustre_msg_hdr_size(__u32 magic, u32 count)
 {
 	switch (magic) {
 	case LUSTRE_MSG_MAGIC_V2:
 		return lustre_msg_hdr_size_v2(count);
 	default:
 		LASSERTF(0, "incorrect message magic: %08x\n", magic);
-		return -EINVAL;
+		return 0;
 	}
 }
 EXPORT_SYMBOL(lustre_msg_hdr_size);
 
 void ptlrpc_buf_set_swabbed(struct ptlrpc_request *req, const int inout,
-			    int index)
+			    u32 index)
 {
 	if (inout)
 		lustre_set_req_swabbed(req, index);
@@ -79,7 +79,7 @@ void ptlrpc_buf_set_swabbed(struct ptlrpc_request *req, const int inout,
 EXPORT_SYMBOL(ptlrpc_buf_set_swabbed);
 
 int ptlrpc_buf_need_swab(struct ptlrpc_request *req, const int inout,
-			 int index)
+			 u32 index)
 {
 	if (inout)
 		return (ptlrpc_req_need_swab(req) &&
@@ -91,9 +91,9 @@ int ptlrpc_buf_need_swab(struct ptlrpc_request *req, const int inout,
 EXPORT_SYMBOL(ptlrpc_buf_need_swab);
 
 /* early reply size */
-int lustre_msg_early_size(void)
+u32 lustre_msg_early_size(void)
 {
-	static int size;
+	static u32 size;
 
 	if (!size) {
 		/* Always reply old ptlrpc_body_v2 to keep interoperability
@@ -111,9 +111,9 @@ int lustre_msg_early_size(void)
 }
 EXPORT_SYMBOL(lustre_msg_early_size);
 
-int lustre_msg_size_v2(int count, __u32 *lengths)
+u32 lustre_msg_size_v2(int count, __u32 *lengths)
 {
-	int size;
+	u32 size;
 	int i;
 
 	size = lustre_msg_hdr_size_v2(count);
@@ -131,7 +131,7 @@ EXPORT_SYMBOL(lustre_msg_size_v2);
  *       target then the first buffer will be stripped because the ptlrpc
  *       data is part of the lustre_msg_v1 header. b=14043
  */
-int lustre_msg_size(__u32 magic, int count, __u32 *lens)
+u32 lustre_msg_size(__u32 magic, int count, __u32 *lens)
 {
 	__u32 size[] = { sizeof(struct ptlrpc_body) };
 
@@ -148,7 +148,7 @@ int lustre_msg_size(__u32 magic, int count, __u32 *lens)
 		return lustre_msg_size_v2(count, lens);
 	default:
 		LASSERTF(0, "incorrect message magic: %08x\n", magic);
-		return -EINVAL;
+		return 0;
 	}
 }
 EXPORT_SYMBOL(lustre_msg_size);
@@ -156,7 +156,7 @@ EXPORT_SYMBOL(lustre_msg_size);
 /* This is used to determine the size of a buffer that was already packed
  * and will correctly handle the different message formats.
  */
-int lustre_packed_msg_size(struct lustre_msg *msg)
+u32 lustre_packed_msg_size(struct lustre_msg *msg)
 {
 	switch (msg->lm_magic) {
 	case LUSTRE_MSG_MAGIC_V2:
@@ -378,11 +378,9 @@ int lustre_pack_reply(struct ptlrpc_request *req, int count, __u32 *lens,
 }
 EXPORT_SYMBOL(lustre_pack_reply);
 
-void *lustre_msg_buf_v2(struct lustre_msg_v2 *m, int n, int min_size)
+void *lustre_msg_buf_v2(struct lustre_msg_v2 *m, u32 n, u32 min_size)
 {
-	int i, offset, buflen, bufcount;
-
-	LASSERT(n >= 0);
+	u32 i, offset, buflen, bufcount;
 
 	bufcount = m->lm_bufcount;
 	if (unlikely(n >= bufcount)) {
@@ -406,7 +404,7 @@ void *lustre_msg_buf_v2(struct lustre_msg_v2 *m, int n, int min_size)
 	return (char *)m + offset;
 }
 
-void *lustre_msg_buf(struct lustre_msg *m, int n, int min_size)
+void *lustre_msg_buf(struct lustre_msg *m, u32 n, u32 min_size)
 {
 	switch (m->lm_magic) {
 	case LUSTRE_MSG_MAGIC_V2:
@@ -419,7 +417,7 @@ void *lustre_msg_buf(struct lustre_msg *m, int n, int min_size)
 }
 EXPORT_SYMBOL(lustre_msg_buf);
 
-static int lustre_shrink_msg_v2(struct lustre_msg_v2 *msg, int segment,
+static int lustre_shrink_msg_v2(struct lustre_msg_v2 *msg, u32 segment,
 				unsigned int newlen, int move_data)
 {
 	char *tail = NULL, *newpos;
@@ -647,7 +645,7 @@ int lustre_unpack_rep_ptlrpc_body(struct ptlrpc_request *req, int offset)
 	}
 }
 
-static inline int lustre_msg_buflen_v2(struct lustre_msg_v2 *m, int n)
+static inline u32 lustre_msg_buflen_v2(struct lustre_msg_v2 *m, u32 n)
 {
 	if (n >= m->lm_bufcount)
 		return 0;
@@ -662,14 +660,14 @@ static inline int lustre_msg_buflen_v2(struct lustre_msg_v2 *m, int n)
  *
  * returns zero for non-existent message indices
  */
-int lustre_msg_buflen(struct lustre_msg *m, int n)
+u32 lustre_msg_buflen(struct lustre_msg *m, u32 n)
 {
 	switch (m->lm_magic) {
 	case LUSTRE_MSG_MAGIC_V2:
 		return lustre_msg_buflen_v2(m, n);
 	default:
 		CERROR("incorrect message magic: %08x\n", m->lm_magic);
-		return -EINVAL;
+		return 0;
 	}
 }
 EXPORT_SYMBOL(lustre_msg_buflen);
@@ -677,23 +675,23 @@ EXPORT_SYMBOL(lustre_msg_buflen);
 /* NB return the bufcount for lustre_msg_v2 format, so if message is packed
  * in V1 format, the result is one bigger. (add struct ptlrpc_body).
  */
-int lustre_msg_bufcount(struct lustre_msg *m)
+u32 lustre_msg_bufcount(struct lustre_msg *m)
 {
 	switch (m->lm_magic) {
 	case LUSTRE_MSG_MAGIC_V2:
 		return m->lm_bufcount;
 	default:
 		CERROR("incorrect message magic: %08x\n", m->lm_magic);
-		return -EINVAL;
+		return 0;
 	}
 }
 EXPORT_SYMBOL(lustre_msg_bufcount);
 
-char *lustre_msg_string(struct lustre_msg *m, int index, int max_len)
+char *lustre_msg_string(struct lustre_msg *m, u32 index, u32 max_len)
 {
 	/* max_len == 0 means the string should fill the buffer */
 	char *str;
-	int slen, blen;
+	u32 slen, blen;
 
 	switch (m->lm_magic) {
 	case LUSTRE_MSG_MAGIC_V2:
@@ -734,8 +732,8 @@ char *lustre_msg_string(struct lustre_msg *m, int index, int max_len)
 EXPORT_SYMBOL(lustre_msg_string);
 
 /* Wrap up the normal fixed length cases */
-static inline void *__lustre_swab_buf(struct lustre_msg *msg, int index,
-				      int min_size, void *swabber)
+static inline void *__lustre_swab_buf(struct lustre_msg *msg, u32 index,
+				      u32 min_size, void *swabber)
 {
 	void *ptr = NULL;
 
@@ -804,7 +802,7 @@ __u32 lustre_msg_get_flags(struct lustre_msg *msg)
 }
 EXPORT_SYMBOL(lustre_msg_get_flags);
 
-void lustre_msg_add_flags(struct lustre_msg *msg, int flags)
+void lustre_msg_add_flags(struct lustre_msg *msg, u32 flags)
 {
 	switch (msg->lm_magic) {
 	case LUSTRE_MSG_MAGIC_V2: {
@@ -820,7 +818,7 @@ void lustre_msg_add_flags(struct lustre_msg *msg, int flags)
 }
 EXPORT_SYMBOL(lustre_msg_add_flags);
 
-void lustre_msg_set_flags(struct lustre_msg *msg, int flags)
+void lustre_msg_set_flags(struct lustre_msg *msg, u32 flags)
 {
 	switch (msg->lm_magic) {
 	case LUSTRE_MSG_MAGIC_V2: {
@@ -836,7 +834,7 @@ void lustre_msg_set_flags(struct lustre_msg *msg, int flags)
 }
 EXPORT_SYMBOL(lustre_msg_set_flags);
 
-void lustre_msg_clear_flags(struct lustre_msg *msg, int flags)
+void lustre_msg_clear_flags(struct lustre_msg *msg, u32 flags)
 {
 	switch (msg->lm_magic) {
 	case LUSTRE_MSG_MAGIC_V2: {
@@ -870,7 +868,7 @@ __u32 lustre_msg_get_op_flags(struct lustre_msg *msg)
 }
 EXPORT_SYMBOL(lustre_msg_get_op_flags);
 
-void lustre_msg_add_op_flags(struct lustre_msg *msg, int flags)
+void lustre_msg_add_op_flags(struct lustre_msg *msg, u32 flags)
 {
 	switch (msg->lm_magic) {
 	case LUSTRE_MSG_MAGIC_V2: {
@@ -924,7 +922,7 @@ __u32 lustre_msg_get_type(struct lustre_msg *msg)
 }
 EXPORT_SYMBOL(lustre_msg_get_type);
 
-void lustre_msg_add_version(struct lustre_msg *msg, int version)
+void lustre_msg_add_version(struct lustre_msg *msg, u32 version)
 {
 	switch (msg->lm_magic) {
 	case LUSTRE_MSG_MAGIC_V2: {
-- 
1.7.1

  parent reply	other threads:[~2016-09-18 20:53 UTC|newest]

Thread overview: 131+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-18 20:36 [PATCH 000/124] missing patches from Lustre 2.7 release James Simmons
2016-09-18 20:37 ` [PATCH 001/124] staging: lustre: llite: fix ll_statahead_thread() problems on failure James Simmons
2016-09-18 20:37 ` [PATCH 002/124] staging: lustre: ptlrpc: enlarge OST_MAXREQSIZE for 4MB RPC James Simmons
2016-09-18 20:37 ` [PATCH 003/124] staging: lustre: ldlm: fix a use after free in ldlm_resource_get() James Simmons
2016-09-18 20:37 ` [PATCH 004/124] staging: lustre: lmv: honor MDT index when creating volatile file James Simmons
2016-09-18 20:37 ` [PATCH 005/124] staging: lustre: obdclass: optimize busy loop wait James Simmons
2016-09-18 20:37 ` [PATCH 006/124] staging: lustre: lmv: Do not ignore ENOENT in lmv_unlink James Simmons
2016-09-18 20:37 ` [PATCH 007/124] staging: lustre: obd: add lnb_ prefix to members of struct niobuf_local James Simmons
2016-09-18 20:37 ` [PATCH 008/124] staging: lustre: obd: add rnb_ prefix to struct niobuf_remote members James Simmons
2016-09-18 20:37 ` [PATCH 009/124] staging: lustre: obdclass: serialize lu_site purge James Simmons
2016-09-18 20:37 ` [PATCH 010/124] staging: lustre: llite: add LL_LEASE_{RD,WR,UN}LCK James Simmons
2016-09-18 20:37 ` [PATCH 011/124] staging: lustre: llite: update ras stride offset James Simmons
2016-09-18 20:37 ` [PATCH 012/124] staging: lustre: lmv: fix some byte order issues James Simmons
2016-09-18 20:37 ` [PATCH 013/124] staging: lustre: osc: update kms in brw_interpret() properly James Simmons
2016-09-18 20:37 ` [PATCH 014/124] staging: lustre: lmv: release locks if lmv_intent_lock() fails James Simmons
2016-09-18 20:37 ` [PATCH 015/124] staging: lustre: clio: lu_ref_del() mismatch ref add scope James Simmons
2016-09-18 20:37 ` [PATCH 016/124] staging: lustre: fix comparison between signed and unsigned James Simmons
2016-09-18 20:37 ` [PATCH 017/124] staging: lustre: lov: adjust page bufsize after layout change James Simmons
2016-09-18 20:37 ` [PATCH 018/124] staging: lustre: obdclass: fix comparison between signed and unsigned James Simmons
2016-09-18 20:37 ` [PATCH 019/124] staging: lustre: ptlrpc: fix magic return value of ptlrpc_init_portals James Simmons
2016-09-18 20:37 ` [PATCH 020/124] staging: lustre: lmv: release request in lmv_revalidate_slaves() James Simmons
2016-09-18 20:37 ` [PATCH 021/124] staging: lustre: build: bump build version warnings to x.y.53 James Simmons
2016-09-18 20:37 ` [PATCH 022/124] staging: lustre: llog: add newly opened llog at tail of handle list James Simmons
2016-09-18 20:37 ` [PATCH 023/124] staging: lustre: mdc: Report D_CHANGELOG messages as D_HSM James Simmons
2016-09-18 20:37 ` [PATCH 024/124] staging: lustre: remove RCU2HANDLE macro James Simmons
2016-09-18 20:37 ` [PATCH 025/124] staging: lustre: llite: Compare of unsigned value against 0 is always true James Simmons
2016-09-18 20:37 ` [PATCH 026/124] staging: lustre: statahead: statahead thread wait for RPCs to finish James Simmons
2016-09-18 20:37 ` [PATCH 027/124] staging: lustre: ldlm: reconstruct proper flags on enqueue resend James Simmons
2016-09-18 20:37 ` [PATCH 028/124] staging: lustre: ldlm: resend AST callbacks James Simmons
2016-09-18 20:37 ` [PATCH 029/124] staging: lustre: ldlm: restore some of the interval functionality James Simmons
2016-09-18 20:37 ` [PATCH 030/124] staging: lustre: llite: Replace write mutex with range lock James Simmons
2016-09-19  7:28   ` Greg Kroah-Hartman
2016-09-19  9:25     ` [lustre-devel] " Dilger, Andreas
2016-09-19  9:59       ` Jan Kara
2016-09-18 20:37 ` [PATCH 031/124] staging: lustre: vvp: Use lockless __generic_file_aio_write James Simmons
2016-09-18 20:37 ` [PATCH 032/124] staging: lustre: llite: remove lookup_flags from ll_lookup_it() James Simmons
2016-09-18 20:37 ` [PATCH 033/124] staging: lustre: llite: remove mode from ll_create_it() James Simmons
2016-09-18 20:37 ` [PATCH 034/124] staging: lustre: llite: turn mode to umode_t for ll_new_inode() James Simmons
2016-09-18 20:37 ` [PATCH 035/124] staging: lustre: llite: style cleanup for ll_mkdir James Simmons
2016-09-18 20:37 ` [PATCH 036/124] staging: lustre: llite: no need to check dentry is NULL James Simmons
2016-09-18 20:37 ` [PATCH 037/124] staging: lustre: cleanup lustre_lib.h James Simmons
2016-09-18 20:37 ` [PATCH 038/124] staging: lustre: osc: debug to match extent to brw RPC James Simmons
2016-09-18 20:37 ` [PATCH 039/124] staging: lustre: remove lustre_lite.h James Simmons
2016-09-18 20:37 ` [PATCH 040/124] staging: lustre: obd: rename LUSTRE_STRIPE_MAXBYTES James Simmons
2016-09-18 20:37 ` [PATCH 041/124] staging: lustre: llite: don't call make_bad_inode() on an old inode James Simmons
2016-09-18 20:37 ` [PATCH 042/124] staging: lustre: obd: change type of lmv_tgt_desc->ltd_idx to u32 James Simmons
2016-09-18 20:37 ` [PATCH 043/124] staging: lustre: lmv: change type of lmv_obd->tgts_size " James Simmons
2016-09-18 20:37 ` [PATCH 044/124] staging: lustre: misc: Reduce exposure to overflow on page counters James Simmons
2016-09-18 20:37 ` [PATCH 045/124] staging: lustre: lmv: remove dead code James Simmons
2016-09-18 20:37 ` [PATCH 046/124] staging: lustre: llite: handle concurrent use of cob_transient_pages James Simmons
2016-09-18 20:37 ` [PATCH 047/124] staging: lustre: llite: enforce pool name length limit James Simmons
2016-09-18 20:37 ` [PATCH 048/124] staging: lustre: Flexible changelog format James Simmons
2016-09-18 20:37 ` [PATCH 049/124] staging: lustre: lmv: move some inline functions to lustre_lmv.h James Simmons
2016-09-18 20:37 ` [PATCH 050/124] staging: lustre: ldlm: per-export lock callback timeout James Simmons
2016-09-18 20:37 ` [PATCH 051/124] staging: lustre: llite: ensure all data flush out when umount James Simmons
2016-09-18 20:37 ` [PATCH 052/124] staging: lustre: lmv: add testing for bad name hash James Simmons
2016-09-18 20:37 ` [PATCH 053/124] staging: lustre: obd: restore linkea support James Simmons
2016-09-18 20:37 ` [PATCH 054/124] staging: lustre: llite: Add ioctl to get parent fids from link EA James Simmons
2016-09-18 20:37 ` [PATCH 055/124] staging: lustre: llite: allow setting stripes to specify OSTs James Simmons
2016-09-18 20:37 ` [PATCH 056/124] staging: lustre: statahead: use dcache-like interface for sa entry James Simmons
2016-09-18 20:37 ` [PATCH 057/124] staging: lustre: statahead: ll_intent_drop_lock() called in spinlock James Simmons
2016-09-18 20:37 ` [PATCH 058/124] staging: lustre: statahead: race in start/stop statahead James Simmons
2016-09-18 20:37 ` [PATCH 059/124] staging: lustre: at: net AT after connect James Simmons
2016-09-18 20:37 ` [PATCH 060/124] staging: lustre: mdc: fix comparison between signed and unsigned James Simmons
2016-09-18 20:38 ` [PATCH 061/124] staging: lustre: obd: cleanup struct md_op_data and uses James Simmons
2016-09-18 20:38 ` [PATCH 062/124] staging: lustre: replace direct HZ access with kernel APIs James Simmons
2016-09-18 20:38 ` [PATCH 063/124] staging: lustre: ldlm: count of pools is unsigned long James Simmons
2016-09-18 20:38 ` [PATCH 064/124] staging: lustre: lu_dirent_calc_size() return type to size_t James Simmons
2016-09-18 20:38 ` [PATCH 065/124] staging: lustre: obdclass: change lu_site->ls_purge_start to unsigned James Simmons
2016-09-18 20:38 ` [PATCH 066/124] staging: lustre: lov: remove LL_IOC_RECREATE_{FID,OBJ} James Simmons
2016-09-18 20:38 ` [PATCH 067/124] staging: lustre: changelog: fix comparison between signed and unsigned James Simmons
2016-09-18 20:38 ` [PATCH 068/124] staging: lustre: lov: remove unused {get,set}_info handlers James Simmons
2016-09-18 20:38 ` [PATCH 069/124] staging: lustre: fix messages with missing newlines James Simmons
2016-09-18 20:38 ` [PATCH 070/124] staging: lustre: statahead: small fixes and cleanup James Simmons
2016-09-19  7:51   ` Greg Kroah-Hartman
2016-09-18 20:38 ` [PATCH 071/124] staging: lustre: obd: remove unused obd methods James Simmons
2016-09-18 20:38 ` [PATCH 072/124] staging: lustre: echo: replace lov_stripe_md with lov_oinfo James Simmons
2016-09-18 20:38 ` [PATCH 073/124] staging: lustre: llite: remove ll_objects_destroy() James Simmons
2016-09-18 20:38 ` [PATCH 074/124] staging: lustre: changelog: Proper record remapping James Simmons
2016-09-18 20:38 ` [PATCH 075/124] staging: lustre: recovery: don't replay closed open James Simmons
2016-09-18 20:38 ` [PATCH 076/124] staging: lustre: ldlm: revert the changes for lock canceling policy James Simmons
2016-09-18 20:38 ` [PATCH 077/124] staging: lustre: ptlrpc: quiet errors on initial connection James Simmons
2016-09-18 20:38 ` [PATCH 078/124] staging: lustre: llog: prevent out-of-bound index James Simmons
2016-09-18 20:38 ` [PATCH 079/124] staging: lustre: mgc: add nid iteration James Simmons
2016-09-18 20:38 ` [PATCH 080/124] staging: lustre: llite: fix dup flags names James Simmons
2016-09-18 20:38 ` [PATCH 081/124] staging: lustre: obdclass: lu_htable_order() return type to long James Simmons
2016-09-18 20:38 ` [PATCH 082/124] staging: lustre: mdc: Proper accessing struct lov_user_md James Simmons
2016-09-18 20:38 ` [PATCH 083/124] staging: lustre: ldlm: evict clients returning errors on ASTs James Simmons
2016-09-18 20:38 ` [PATCH 084/124] staging: lustre: fiemap: set FIEMAP_EXTENT_LAST correctly James Simmons
2016-09-18 20:38 ` [PATCH 085/124] staging: lustre: obdclass: change loop indexes to unsigned James Simmons
2016-09-18 20:38 ` [PATCH 086/124] staging: lustre: obdclass: eliminate NULL error return James Simmons
2016-09-18 20:38 ` [PATCH 087/124] staging: lustre: ptlrpc: Suppress error message when imp_sec is freed James Simmons
2016-09-18 20:38 ` [PATCH 088/124] staging: lustre: ldlm: Recalculate interval in ldlm_pool_recalc() James Simmons
2016-09-18 20:38 ` [PATCH 089/124] staging: lustre: obd: change brw_page->count to unsigned James Simmons
2016-09-18 20:38 ` [PATCH 090/124] staging: lustre: obdclass: change cl_fault_io->ft_nob to size_t James Simmons
2016-09-18 20:38 ` [PATCH 091/124] staging: lustre: clio: add coo_getstripe interface James Simmons
2016-09-18 20:38 ` James Simmons [this message]
2016-09-18 20:38 ` [PATCH 093/124] staging: lustre: ldlm: move LDLM_GID_ANY to lustre_dlm.h James Simmons
2016-09-18 20:38 ` [PATCH 094/124] staging: lustre: lov: flatten struct lov_stripe_md James Simmons
2016-09-18 20:38 ` [PATCH 095/124] staging: lustre: ptlrpc: fix race between connect vs resend James Simmons
2016-09-18 20:38 ` [PATCH 096/124] staging: lustre: osc: osc_object_ast_clear() LBUG James Simmons
2016-09-18 20:38 ` [PATCH 097/124] staging: lustre: osc: change cl_extent_tax and *grants to unsigned James Simmons
2016-09-18 20:38 ` [PATCH 098/124] staging: lustre: lprocfs: cleanup stats locking code James Simmons
2016-09-18 20:38 ` [PATCH 099/124] staging: lustre: llite: unlock inode size in ll_lov_setstripe_ea_info() James Simmons
2016-09-18 20:38 ` [PATCH 100/124] staging: lustre: obd: change type of cl_conn_count to size_t James Simmons
2016-09-18 20:38 ` [PATCH 101/124] staging: lustre: libcfs: check mask returned by cpumask_of_node James Simmons
2016-09-18 20:38 ` [PATCH 102/124] staging: lustre: remove lustre/include/linux/ James Simmons
2016-09-18 20:38 ` [PATCH 103/124] staging: lustre: llite: pack suppgid to MDS correctly James Simmons
2016-09-18 20:38 ` [PATCH 104/124] staging: lustre: clio: rename coo_attr_set to coo_attr_update James Simmons
2016-09-18 20:38 ` [PATCH 105/124] staging: lustre: clio: pass fid for OST setattr James Simmons
2016-09-18 20:38 ` [PATCH 106/124] staging: lustre: client: Fix mkdir -i 1 from DNE2 client to DNE1 server James Simmons
2016-09-18 20:38 ` [PATCH 107/124] staging: lustre: lmv: Do not revalidate stripes with master lock James Simmons
2016-09-18 20:38 ` [PATCH 108/124] staging: lustre: grant: quiet message on grant waiting timeout James Simmons
2016-09-18 20:38 ` [PATCH 109/124] staging: lustre: misc: remove unnecessary EXPORT_SYMBOL James Simmons
2016-09-18 20:38 ` [PATCH 110/124] staging: lustre: obdclass: " James Simmons
2016-09-18 20:38 ` [PATCH 111/124] staging: lustre: llite: lock the inode to be migrated James Simmons
2016-09-18 20:38 ` [PATCH 112/124] staging: lustre: ptlrpc: remove unnecessary EXPORT_SYMBOL James Simmons
2016-09-19  5:43   ` kbuild test robot
2016-09-18 20:38 ` [PATCH 113/124] staging: lustre: obd: use proper flags for call_usermodehelper James Simmons
2016-09-18 20:38 ` [PATCH 114/124] staging: lustre: ptlrpc: prevent request timeout grow due to recovery James Simmons
2016-09-18 20:38 ` [PATCH 115/124] staging: lustre: mdt: add indexing option to default dir stripe James Simmons
2016-09-18 20:38 ` [PATCH 116/124] staging: lustre: llite: make default_easize writeable in /sysfs James Simmons
2016-09-18 20:38 ` [PATCH 117/124] staging: lustre: mdc: cl_default_mds_easize not refreshed James Simmons
2016-09-18 20:38 ` [PATCH 118/124] staging: lustre: lmv: fix parent FID for migration James Simmons
2016-09-18 20:38 ` [PATCH 119/124] staging: lustre: lnet: potential deadlock in lnet James Simmons
2016-09-18 20:38 ` [PATCH 120/124] staging: lustre: lnet: check if ni is in current net namespace James Simmons
2016-09-18 20:39 ` [PATCH 121/124] staging: lustre: lnet: Ensure routing is turned on first time James Simmons
2016-09-18 20:39 ` [PATCH 122/124] staging: lustre: lnet: Enable setting per NI peer_credits James Simmons
2016-09-18 20:39 ` [PATCH 123/124] staging: lustre: o2iblnd: Put back work queue check previously removed James Simmons
2016-09-18 20:39 ` [PATCH 124/124] staging: lustre: update version to 2.6.99 James Simmons
2016-09-19  8:10 ` [PATCH 000/124] missing patches from Lustre 2.7 release Greg Kroah-Hartman

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=1474231143-4061-93-git-send-email-jsimmons@infradead.org \
    --to=jsimmons@infradead.org \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dmitry.eremin@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.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).