aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>2008-11-03 21:51:33 +0000
committerbehlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c>2008-11-03 21:51:33 +0000
commitc22e7a427bfbea456e783c918fad817f3c4f34ce (patch)
tree967a5e2f18783b488e9552215327a523da3c330e
parenta0f6da3d9590ece3c7a056f235aab28880dbd67c (diff)
Under Solaris KM_SLEEP ensures success (or at least you hang forever).
That said when working with a finite resource like memory failure really is always a possibility. It would be far better longer term if the ZFS code could be weened off this assumption and properly handle the cases where an allocation fails. Still I've applied the patch to spl-0.3.4 since this layer is supposed to emulate Solaris as closely as possible. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@164 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
-rw-r--r--include/sys/kmem.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sys/kmem.h b/include/sys/kmem.h
index 828481070..ef401ade4 100644
--- a/include/sys/kmem.h
+++ b/include/sys/kmem.h
@@ -49,7 +49,7 @@ extern "C" {
/*
* Memory allocation interfaces
*/
-#define KM_SLEEP GFP_KERNEL
+#define KM_SLEEP (GFP_KERNEL | __GFP_NOFAIL)
#define KM_NOSLEEP GFP_ATOMIC
#undef KM_PANIC /* No linux analog */
#define KM_PUSHPAGE (KM_SLEEP | __GFP_HIGH)