aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/llite/xattr_cache.c
diff options
context:
space:
mode:
authorAnn Koehler <amk@cray.com>2014-04-27 13:06:36 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-27 10:23:15 -0700
commit0be19afa74b73a2132dc02b4fea0c6b5a2e29151 (patch)
treeae4cd809a3f32d1b58421979e5a56d75a28c011d /drivers/staging/lustre/lustre/llite/xattr_cache.c
parentstaging/lustre/ptlrpc: add rpc_cache (diff)
downloadlinux-dev-0be19afa74b73a2132dc02b4fea0c6b5a2e29151.tar.xz
linux-dev-0be19afa74b73a2132dc02b4fea0c6b5a2e29151.zip
staging/lustre: restore __GFP_WAIT flag to memalloc calls
In Lustre 2.4, the flags passed to the memory allocation functions are translated from CFS enumeration values types to the kernel GFP values by calling cfs_alloc_flags_to_gfp(). This function adds __GFP_WAIT to all flags except CFS_ALLOC_ATOMIC. In 2.5, when the cfs wrappers were dropped, cfs_alloc_flags_to_gfp() was removed and the CFS_ALLOC_xxxx was simply replaced with __GFP_xxxx. This means that most memory allocation calls are missing the __GFP_WAIT flag. The result is that Lustre experiences more ENOMEM errors, many of which the higher levels of Lustre do not handle robustly. Notes GFP_NOFS = __GFP_WAIT | __GFP_IO. So the patch replaces __GFP_IO with GFP_NOFS. Patch does not add __GFP_WAIT to GFP_IOFS. GFP_IOFS was not used in Lustre 2.4 so it has never been used with __GFP_WAIT. Signed-off-by: Ann Koehler <amk@cray.com> Signed-off-by: Emoly Liu <emoly.liu@intel.com> Reviewed-on: http://review.whamcloud.com/9223 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4357 Reviewed-by: Liang Zhen <liang.zhen@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/xattr_cache.c')
-rw-r--r--drivers/staging/lustre/lustre/llite/xattr_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/llite/xattr_cache.c b/drivers/staging/lustre/lustre/llite/xattr_cache.c
index 4defa2fd83b3..dfd19f801013 100644
--- a/drivers/staging/lustre/lustre/llite/xattr_cache.c
+++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c
@@ -120,7 +120,7 @@ static int ll_xattr_cache_add(struct list_head *cache,
return -EPROTO;
}
- OBD_SLAB_ALLOC_PTR_GFP(xattr, xattr_kmem, __GFP_IO);
+ OBD_SLAB_ALLOC_PTR_GFP(xattr, xattr_kmem, GFP_NOFS);
if (xattr == NULL) {
CDEBUG(D_CACHE, "failed to allocate xattr\n");
return -ENOMEM;