Whamcloud - gitweb
LU-3030 build: Update Master Copyrights pre 2.4 split
[fs/lustre-release.git] / lustre / quota / qsd_request.c
index 50bf8db..66fa4b8 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012 Intel, Inc.
+ * Copyright (c) 2012, 2013, Intel Corporation.
  * Use is subject to license terms.
  *
  * Author: Johann Lombardi <johann.lombardi@intel.com>
@@ -374,7 +374,7 @@ int qsd_fetch_index(const struct lu_env *env, struct obd_export *exp,
        ptlrpc_at_set_req_timeout(req);
 
        /* allocate bulk descriptor */
-       desc = ptlrpc_prep_bulk_imp(req, npages, BULK_PUT_SINK,
+       desc = ptlrpc_prep_bulk_imp(req, npages, 1, BULK_PUT_SINK,
                                    MDS_BULK_PORTAL);
        if (desc == NULL) {
                ptlrpc_request_free(req);
@@ -400,7 +400,10 @@ int qsd_fetch_index(const struct lu_env *env, struct obd_export *exp,
                                          req->rq_bulk->bd_nob_transferred);
        if (rc < 0)
                GOTO(out, rc);
-       rc = 0;
+       else
+               /* sptlrpc_cli_unwrap_bulk_read() returns the number of bytes
+                * transferred*/
+               rc = 0;
 
        req_ii = req_capsule_server_get(&req->rq_pill, &RMF_IDX_INFO);
        *ii = *req_ii;