Whamcloud - gitweb
LU-1757 brw: Fix short i/o and enable for mdc 35/30435/3
authorPatrick Farrell <paf@cray.com>
Thu, 7 Dec 2017 13:00:58 +0000 (07:00 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 22 Dec 2017 06:48:50 +0000 (06:48 +0000)
The short i/o flag was left out of the OST flags in the
original patch, meaning it was not really on.  Also, the
short_io_size value was used uninitialized, meaning it
was sometimes non-zero, which coudl lead to several issues.

Also add the short i/o flag to the MDC/MDT for data on MDT.
Quick testing suggests this works fine with no further
changes.

Cray-bug-id: LUS-187
Signed-off-by: Patrick Farrell <paf@cray.com>
Change-Id: I4154b87d5ad73b53467b0382368fad7c5ba177fe
Reviewed-on: https://review.whamcloud.com/30435
Tested-by: Jenkins
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_net.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/llite/llite_lib.c
lustre/osc/osc_request.c

index 353cb7a..91d014d 100644 (file)
@@ -2071,11 +2071,12 @@ static inline int ptlrpc_client_bulk_active(struct ptlrpc_request *req)
        LASSERT(req != NULL);
        desc = req->rq_bulk;
 
+       if (!desc)
+               return 0;
+
        if (req->rq_bulk_deadline > ktime_get_real_seconds())
                return 1;
 
-       if (!desc)
-               return 0;
 
        spin_lock(&desc->bd_lock);
        rc = desc->bd_md_count;
index 9e199d2..fac28da 100644 (file)
@@ -851,7 +851,7 @@ struct ptlrpc_body_v2 {
                                OBD_CONNECT_MULTIMODRPCS | \
                                OBD_CONNECT_SUBTREE | OBD_CONNECT_LARGE_ACL | \
                                OBD_CONNECT_GRANT_PARAM | \
-                               OBD_CONNECT_FLAGS2)
+                               OBD_CONNECT_SHORTIO | OBD_CONNECT_FLAGS2)
 
 #define MDT_CONNECT_SUPPORTED2 OBD_CONNECT2_FILE_SECCTX
 
@@ -871,7 +871,8 @@ struct ptlrpc_body_v2 {
                                OBD_CONNECT_LAYOUTLOCK | OBD_CONNECT_FID | \
                                OBD_CONNECT_PINGLESS | OBD_CONNECT_LFSCK | \
                                OBD_CONNECT_BULK_MBITS | \
-                               OBD_CONNECT_GRANT_PARAM | OBD_CONNECT_FLAGS2)
+                               OBD_CONNECT_GRANT_PARAM | \
+                               OBD_CONNECT_SHORTIO | OBD_CONNECT_FLAGS2)
 
 #define OST_CONNECT_SUPPORTED2 OBD_CONNECT2_LOCKAHEAD
 
index 72b77fc..89d438a 100644 (file)
@@ -220,7 +220,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
                                  OBD_CONNECT_BULK_MBITS | OBD_CONNECT_CKSUM |
                                  OBD_CONNECT_SUBTREE |
                                  OBD_CONNECT_MULTIMODRPCS |
-                                 OBD_CONNECT_GRANT_PARAM | OBD_CONNECT_FLAGS2;
+                                 OBD_CONNECT_GRANT_PARAM |
+                                 OBD_CONNECT_SHORTIO | OBD_CONNECT_FLAGS2;
 
        data->ocd_connect_flags2 = 0;
 
index 9509ff2..006715f 100644 (file)
@@ -1093,7 +1093,7 @@ osc_brw_prep_request(int cmd, struct client_obd *cli, struct obdo *oa,
         struct ost_body         *body;
         struct obd_ioobj        *ioobj;
         struct niobuf_remote    *niobuf;
-       int niocount, i, requested_nob, opc, rc, short_io_size;
+       int niocount, i, requested_nob, opc, rc, short_io_size = 0;
         struct osc_brw_async_args *aa;
         struct req_capsule      *pill;
         struct brw_page *pg_prev;