]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Suppress 'zfs receive' memory warning
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 20 Apr 2011 17:18:56 +0000 (10:18 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 20 Apr 2011 17:22:31 +0000 (10:22 -0700)
As part of zfs_ioc_recv() a zfs_cmd_t is allocated in the kernel
which is 17808 bytes in size.  This sort of thing in general should
be avoided.  However, since this should be an infrequent event for
now we allow it and simply suppress the warning with the KM_NODEBUG
flag.  This can be revisited latter if/when it becomes an issue.

Closes #178

module/zfs/zfs_ioctl.c

index 1d3ef0fd714c5021011ec8e54d8794794224e8c3..edfda7656adbc6ea1e6adb17409d8b72ab520f3c 100644 (file)
@@ -3455,7 +3455,7 @@ zfs_check_clearable(char *dataset, nvlist_t *props, nvlist_t **errlist)
 
        VERIFY(nvlist_alloc(&errors, NV_UNIQUE_NAME, KM_SLEEP) == 0);
 
-       zc = kmem_alloc(sizeof (zfs_cmd_t), KM_SLEEP);
+       zc = kmem_alloc(sizeof (zfs_cmd_t), KM_SLEEP | KM_NODEBUG);
        (void) strcpy(zc->zc_name, dataset);
        pair = nvlist_next_nvpair(props, NULL);
        while (pair != NULL) {