Whamcloud - gitweb
LU-13680 osd-ldiskfs: handle large allocations 43/38943/4
authorAndreas Dilger <adilger@whamcloud.com>
Mon, 15 Jun 2020 19:46:07 +0000 (13:46 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 4 Jul 2020 03:04:29 +0000 (03:04 +0000)
Use OBD_ALLOC_PAGE_ARRAY_LARGE() for oti_dio_pages, as this allocation
can be as large as 512KB due to large PTLRPC_MAX_BRW_PAGES.

Test-Parameters: trivial
Fixes: 72372486a5e9 ("LU-11347 osd: do not use pagecache for I/O")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I0a0557e42bb5db5612c78e6d9b87f366a23ebbe5
Reviewed-on: https://review.whamcloud.com/38943
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-ldiskfs/osd_io.c

index 58a8cc2..da20b66 100644 (file)
@@ -7477,7 +7477,8 @@ static void osd_key_fini(const struct lu_context *ctx,
                                __free_page(page);
                        }
                }
-               OBD_FREE_PTR_ARRAY(info->oti_dio_pages, PTLRPC_MAX_BRW_PAGES);
+               OBD_FREE_PTR_ARRAY_LARGE(info->oti_dio_pages,
+                                        PTLRPC_MAX_BRW_PAGES);
        }
 
        if (info->oti_inode != NULL)
index 7880dec..d40117c 100644 (file)
@@ -857,7 +857,8 @@ static int osd_bufs_get(const struct lu_env *env, struct dt_object *dt,
 
 bypass_checks:
        if (!cache && unlikely(!oti->oti_dio_pages)) {
-               OBD_ALLOC_PTR_ARRAY(oti->oti_dio_pages, PTLRPC_MAX_BRW_PAGES);
+               OBD_ALLOC_PTR_ARRAY_LARGE(oti->oti_dio_pages,
+                                         PTLRPC_MAX_BRW_PAGES);
                if (!oti->oti_dio_pages)
                        return -ENOMEM;
        }