Whamcloud - gitweb
LU-10467 ptlrpc: discard SVC_SIGNAL and related functions
[fs/lustre-release.git] / lustre / include / lustre_net.h
index 7ad28ce..38ccbde 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
 
 #define OST_NBUFS              64
 /** OST_BUFSIZE = max_reqsize + max sptlrpc payload size */
-#define OST_BUFSIZE            max_t(int, OST_MAXREQSIZE + 1024, 16 * 1024)
+#define OST_BUFSIZE            max_t(int, OST_MAXREQSIZE + 1024, 32 * 1024)
 /**
  * OST_IO_MAXREQSIZE is 18K, giving extra 46K can increase buffer utilization
  * rate of request buffer, please check comment of MDS_LOV_BUFSIZE for details.
@@ -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, ...)
@@ -1503,7 +1507,6 @@ enum {
        SVC_STARTING    = 1 << 2,
        SVC_RUNNING     = 1 << 3,
        SVC_EVENT       = 1 << 4,
-       SVC_SIGNAL      = 1 << 5,
 };
 
 #define PTLRPC_THR_NAME_LEN            32
@@ -1573,11 +1576,6 @@ static inline int thread_is_event(struct ptlrpc_thread *thread)
         return !!(thread->t_flags & SVC_EVENT);
 }
 
-static inline int thread_is_signal(struct ptlrpc_thread *thread)
-{
-        return !!(thread->t_flags & SVC_SIGNAL);
-}
-
 static inline void thread_clear_flags(struct ptlrpc_thread *thread, __u32 flags)
 {
         thread->t_flags &= ~flags;