Whamcloud - gitweb
LU-12333 ptlrpc: Add more flags to DEBUG_REQ_FLAGS macro
[fs/lustre-release.git] / lustre / include / lustre_net.h
index 3e1e299..b3833a7 100644 (file)
@@ -76,7 +76,7 @@
  * value.  The client is free to limit the actual RPC size for any bulk
  * transfer via cl_max_pages_per_rpc to some non-power-of-two value.
  * NOTE: This is limited to 16 (=64GB RPCs) by IOOBJ_MAX_BRW_BITS. */
-#define PTLRPC_BULK_OPS_BITS   4
+#define PTLRPC_BULK_OPS_BITS   6
 #if PTLRPC_BULK_OPS_BITS > 16
 #error "More than 65536 BRW RPCs not allowed by IOOBJ_MAX_BRW_BITS."
 #endif
  * - OST_IO_MAXREQSIZE must be at least 1 page of cookies plus some spillover
  * - Must be a multiple of 1024
  */
-#define _OST_MAXREQSIZE_BASE (sizeof(struct lustre_msg) + \
-                             sizeof(struct ptlrpc_body) + \
-                             sizeof(struct obdo) + \
-                             sizeof(struct obd_ioobj) + \
-                             sizeof(struct niobuf_remote))
-#define _OST_MAXREQSIZE_SUM (_OST_MAXREQSIZE_BASE + \
-                            sizeof(struct niobuf_remote) * \
-                            (DT_MAX_BRW_PAGES - 1))
+#define _OST_MAXREQSIZE_BASE ((unsigned long)(sizeof(struct lustre_msg) + \
+                                   sizeof(struct ptlrpc_body) +          \
+                                   sizeof(struct obdo) +                 \
+                                   sizeof(struct obd_ioobj) +            \
+                                   sizeof(struct niobuf_remote)))
+#define _OST_MAXREQSIZE_SUM ((unsigned long)(_OST_MAXREQSIZE_BASE +      \
+                                  sizeof(struct niobuf_remote) *         \
+                                  (DT_MAX_BRW_PAGES - 1)))
 /**
  * FIEMAP request can be 4K+ for now
  */
-#define OST_MAXREQSIZE         (16 * 1024)
-#define OST_IO_MAXREQSIZE      max_t(int, OST_MAXREQSIZE, \
-                               (((_OST_MAXREQSIZE_SUM - 1) | (1024 - 1)) + 1))
+#define OST_MAXREQSIZE         (16UL * 1024UL)
+#define OST_IO_MAXREQSIZE      max(OST_MAXREQSIZE,                     \
+                                  ((_OST_MAXREQSIZE_SUM - 1) |         \
+                                   (1024UL - 1)) + 1)
 /* Safe estimate of free space in standard RPC, provides upper limit for # of
  * bytes of i/o to pack in RPC (skipping bulk transfer). */
 #define OST_SHORT_IO_SPACE     (OST_IO_MAXREQSIZE - _OST_MAXREQSIZE_BASE)
 /* Actual size used for short i/o buffer.  Calculation means this:
  * At least one page (for large PAGE_SIZE), or 16 KiB, but not more
  * than the available space aligned to a page boundary. */
-#define OBD_MAX_SHORT_IO_BYTES (min(max(PAGE_SIZE, 16UL * 1024UL), \
-                                   OST_SHORT_IO_SPACE & PAGE_MASK))
+#define OBD_MAX_SHORT_IO_BYTES min(max(PAGE_SIZE, 16UL * 1024UL), \
+                                   OST_SHORT_IO_SPACE & PAGE_MASK)
 
 #define OST_MAXREPSIZE         (9 * 1024)
 #define OST_IO_MAXREPSIZE      OST_MAXREPSIZE
@@ -1279,9 +1280,12 @@ ptlrpc_rqphase2str(struct ptlrpc_request *req)
        FLAG(req->rq_no_resend, "N"),                                          \
        FLAG(req->rq_waiting, "W"),                                            \
        FLAG(req->rq_wait_ctx, "C"), FLAG(req->rq_hp, "H"),                    \
-       FLAG(req->rq_committed, "M")
+       FLAG(req->rq_committed, "M"),                                          \
+       FLAG(req->rq_req_unlinked, "Q"),                                       \
+       FLAG(req->rq_reply_unlinked, "U"),                                     \
+       FLAG(req->rq_receiving_reply, "r")
 
-#define REQ_FLAGS_FMT "%s:%s%s%s%s%s%s%s%s%s%s%s%s%s"
+#define REQ_FLAGS_FMT "%s:%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"
 
 void _debug_req(struct ptlrpc_request *req,
                 struct libcfs_debug_msg_data *data, const char *fmt, ...)