From b974e4bf4d6b589dbd7fb6ad5458ee250e64a686 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 20 May 2010 10:00:03 -0700 Subject: [PATCH 1/3] Fix error message to reference the new libuuid package. It used to be the case that libuuid was part of e2fsprogs. However, since other projects unrelated to e2fsprogs make use of that library it was getting aukward to have that dependency. The package was split from e2fsprogs and moved to its own devel package in the util-linux-ng project. Anyway, I'm just updating the error message to reflect the new upstream reality. --- config/user-libuuid.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/user-libuuid.m4 b/config/user-libuuid.m4 index 0a669b7d6a..aba375a228 100644 --- a/config/user-libuuid.m4 +++ b/config/user-libuuid.m4 @@ -5,13 +5,13 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_LIBUUID], [ LIBUUID= AC_CHECK_HEADER([uuid/uuid.h], [], [AC_MSG_FAILURE([ - *** uuid/uuid.h missing, e2fsprogs-devel package required])]) + *** uuid/uuid.h missing, libuuid-devel package required])]) AC_CHECK_LIB([uuid], [uuid_generate], [], [AC_MSG_FAILURE([ - *** uuid_generate() missing, e2fsprogs-devel package required])]) + *** uuid_generate() missing, libuuid-devel package required])]) AC_CHECK_LIB([uuid], [uuid_is_null], [], [AC_MSG_FAILURE([ - *** uuid_is_null() missing, e2fsprogs-devel package required])]) + *** uuid_is_null() missing, libuuid-devel package required])]) AC_SUBST([LIBUUID], ["-luuid"]) AC_DEFINE([HAVE_LIBUUID], 1, [Define if you have libuuid]) From b50494ba2d3b20295149cc1edcfb411f364da099 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 20 May 2010 10:04:10 -0700 Subject: [PATCH 2/3] Add missing header observed after linux-legacy was reverted. Interestingly this has only been a problem on a clean RHEL6 install so I suspect the include was removed from one of the standard system include headers. We should be including it explicitly anyway since it's used in both of these .c files. --- lib/libzfs/libzfs_pool.c | 1 + lib/libzfs/libzfs_util.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/libzfs/libzfs_pool.c b/lib/libzfs/libzfs_pool.c index e8c0e7e273..8519ea9fbb 100644 --- a/lib/libzfs/libzfs_pool.c +++ b/lib/libzfs/libzfs_pool.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c index 91a48bfd10..79b8eb50fa 100644 --- a/lib/libzfs/libzfs_util.c +++ b/lib/libzfs/libzfs_util.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include From 4ae64a8acd7b3a856e3e8ac4ae54aaa722725553 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 20 May 2010 10:06:32 -0700 Subject: [PATCH 3/3] Move from kmem_alloc() to vmem_alloc(). These two allocations are 16k in size which trips the SPL warning about large kmem_allocs(). For now simply shift them to a vmem_alloc(). Yes, this has it's own set of problems but this happens infrequently enough not to be a real issue. But more importantly it means that we've flagged this place in the code via this topic branch as a place which still needs long term work. --- module/zfs/spa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/zfs/spa.c b/module/zfs/spa.c index d147b8e910..7e4f307351 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -3928,7 +3928,7 @@ spa_sync_nvlist(spa_t *spa, uint64_t obj, nvlist_t *nv, dmu_tx_t *tx) * saves us a pre-read to get data we don't actually care about. */ bufsize = P2ROUNDUP(nvsize, SPA_CONFIG_BLOCKSIZE); - packed = kmem_alloc(bufsize, KM_SLEEP); + packed = vmem_alloc(bufsize, KM_SLEEP); VERIFY(nvlist_pack(nv, &packed, &nvsize, NV_ENCODE_XDR, KM_SLEEP) == 0); @@ -3936,7 +3936,7 @@ spa_sync_nvlist(spa_t *spa, uint64_t obj, nvlist_t *nv, dmu_tx_t *tx) dmu_write(spa->spa_meta_objset, obj, 0, bufsize, packed, tx); - kmem_free(packed, bufsize); + vmem_free(packed, bufsize); VERIFY(0 == dmu_bonus_hold(spa->spa_meta_objset, obj, FTAG, &db)); dmu_buf_will_dirty(db, tx);