Whamcloud - gitweb
LU-13441 osd-zfs: remove OSD thread info cache size assertion 87/38187/2
authorSam Atkinson <samatk@amazon.com>
Thu, 19 Mar 2020 14:14:57 +0000 (10:14 -0400)
committerOleg Drokin <green@whamcloud.com>
Sun, 19 Apr 2020 08:45:36 +0000 (08:45 +0000)
Remove assertion which kept OSD thread info cache size under 1000.
This assertion is hit when creating a file with more than 511 stripes.

Signed-off-by: Samuel Atkinson <samatk@amazon.com>
Change-Id: If926ec6653cdd85fb654b2960bc0391442bc0674
Reviewed-on: https://review.whamcloud.com/38187
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-zfs/osd_handler.c
lustre/osd-zfs/osd_oi.c

index ba29c08..1b9d0f4 100644 (file)
@@ -743,7 +743,7 @@ static void osd_key_fini(const struct lu_context *ctx,
 
        if (idc != NULL) {
                LASSERT(info->oti_ins_cache_size > 0);
 
        if (idc != NULL) {
                LASSERT(info->oti_ins_cache_size > 0);
-               OBD_FREE(idc, sizeof(*idc) * info->oti_ins_cache_size);
+               OBD_FREE_LARGE(idc, sizeof(*idc) * info->oti_ins_cache_size);
                info->oti_ins_cache = NULL;
                info->oti_ins_cache_size = 0;
        }
                info->oti_ins_cache = NULL;
                info->oti_ins_cache_size = 0;
        }
index e4244dc..f62a68c 100644 (file)
@@ -1011,16 +1011,15 @@ struct osd_idmap_cache *osd_idc_add(const struct lu_env *env,
 
        if (unlikely(oti->oti_ins_cache_used >= oti->oti_ins_cache_size)) {
                i = oti->oti_ins_cache_size * 2;
 
        if (unlikely(oti->oti_ins_cache_used >= oti->oti_ins_cache_size)) {
                i = oti->oti_ins_cache_size * 2;
-               LASSERT(i < 1000);
                if (i == 0)
                        i = OSD_INS_CACHE_SIZE;
                if (i == 0)
                        i = OSD_INS_CACHE_SIZE;
-               OBD_ALLOC(idc, sizeof(*idc) * i);
+               OBD_ALLOC_LARGE(idc, sizeof(*idc) * i);
                if (idc == NULL)
                        return ERR_PTR(-ENOMEM);
                if (oti->oti_ins_cache != NULL) {
                        memcpy(idc, oti->oti_ins_cache,
                               oti->oti_ins_cache_used * sizeof(*idc));
                if (idc == NULL)
                        return ERR_PTR(-ENOMEM);
                if (oti->oti_ins_cache != NULL) {
                        memcpy(idc, oti->oti_ins_cache,
                               oti->oti_ins_cache_used * sizeof(*idc));
-                       OBD_FREE(oti->oti_ins_cache,
+                       OBD_FREE_LARGE(oti->oti_ins_cache,
                                 oti->oti_ins_cache_used * sizeof(*idc));
                }
                oti->oti_ins_cache = idc;
                                 oti->oti_ins_cache_used * sizeof(*idc));
                }
                oti->oti_ins_cache = idc;