Whamcloud - gitweb
LU-9464 hsm: use OBD_ALLOC_LARGE() for hsm_scan_data array 14/27014/2
authorJohn L. Hammond <john.hammond@intel.com>
Tue, 9 May 2017 17:57:22 +0000 (12:57 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 16 May 2017 05:48:41 +0000 (05:48 +0000)
In mdt_coordinator() use OBD_ALLOC_LARGE() rather than OBD_ALLOC() for
the hsm_scan_data request array.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ieb648dfb92e6019ab316c7643aa0c0b5cf1d86f7
Reviewed-on: https://review.whamcloud.com/27014
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdt/mdt_coordinator.c

index c187fd3..5b93ead 100644 (file)
@@ -429,7 +429,7 @@ static int mdt_coordinator(void *data)
         */
        hsd.max_requests = cdt->cdt_max_requests;
        request_sz = hsd.max_requests * sizeof(*hsd.request);
-       OBD_ALLOC(hsd.request, request_sz);
+       OBD_ALLOC_LARGE(hsd.request, request_sz);
        if (!hsd.request)
                GOTO(out, rc = -ENOMEM);
 
@@ -471,10 +471,10 @@ static int mdt_coordinator(void *data)
                        /* cdt_max_requests has changed,
                         * we need to allocate a new buffer
                         */
-                       OBD_FREE(hsd.request, request_sz);
+                       OBD_FREE_LARGE(hsd.request, request_sz);
                        hsd.max_requests = cdt->cdt_max_requests;
                        request_sz = hsd.max_requests * sizeof(*hsd.request);
-                       OBD_ALLOC(hsd.request, request_sz);
+                       OBD_ALLOC_LARGE(hsd.request, request_sz);
                        if (!hsd.request) {
                                rc = -ENOMEM;
                                break;
@@ -554,7 +554,7 @@ clean_cb_alloc:
        EXIT;
 out:
        if (hsd.request)
-               OBD_FREE(hsd.request, request_sz);
+               OBD_FREE_LARGE(hsd.request, request_sz);
 
        if (cdt->cdt_state == CDT_STOPPING) {
                /* request comes from /proc path, so we need to clean cdt