Whamcloud - gitweb
LU-10331 out: use OBD_ALLOC_LARGE() for update buffers 55/30455/2
authorJohn L. Hammond <john.hammond@intel.com>
Fri, 8 Dec 2017 19:10:21 +0000 (13:10 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 17 Dec 2017 06:20:58 +0000 (06:20 +0000)
In out_handle() the update buffers may be up to 100KB so use
OBD_ALLOC_LARGE() to avoid high order page allocation errors.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: Ie9970eb219ff0e5357132e0858cb16db8f703209
Reviewed-on: https://review.whamcloud.com/30455
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
lustre/target/out_handler.c

index 8e761c1..d62bb26 100644 (file)
@@ -964,7 +964,7 @@ int out_handle(struct tgt_session_info *tsi)
                        if (tmp->oub_size >= OUT_MAXREQSIZE)
                                GOTO(out_free, rc = err_serious(-EPROTO));
 
-                       OBD_ALLOC(update_bufs[i], tmp->oub_size);
+                       OBD_ALLOC_LARGE(update_bufs[i], tmp->oub_size);
                        if (update_bufs[i] == NULL)
                                GOTO(out_free, rc = err_serious(-ENOMEM));
 
@@ -1162,7 +1162,8 @@ out_free:
                if (oub != NULL) {
                        for (i = 0; i < update_buf_count; i++, oub++) {
                                if (update_bufs[i] != NULL)
-                                       OBD_FREE(update_bufs[i], oub->oub_size);
+                                       OBD_FREE_LARGE(update_bufs[i],
+                                                      oub->oub_size);
                        }
                }