Whamcloud - gitweb
LU-10331 out: use OBD_ALLOC_LARGE() for update buffers 74/31474/2
authorJohn L. Hammond <john.hammond@intel.com>
Thu, 1 Mar 2018 04:52:31 +0000 (20:52 -0800)
committerJohn L. Hammond <john.hammond@intel.com>
Tue, 13 Mar 2018 16:08:52 +0000 (16:08 +0000)
In out_handle() the update buffers may be up to 100KB so use
OBD_ALLOC_LARGE() to avoid high order page allocation errors.

This patch is back-ported from the following one:
Lustre-commit: f8987f51967ff5be46fa1d232de21644af927037
Lustre-change: https://review.whamcloud.com/30455

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

index bd7dc7f..c342ae4 100644 (file)
@@ -967,7 +967,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));
 
@@ -1165,7 +1165,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);
                        }
                }