]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging/lustre: restore __GFP_WAIT flag to memalloc calls
authorAnn Koehler <amk@cray.com>
Sun, 27 Apr 2014 17:06:36 +0000 (13:06 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Apr 2014 17:23:15 +0000 (10:23 -0700)
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>
33 files changed:
drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
drivers/staging/lustre/lustre/include/obd_class.h
drivers/staging/lustre/lustre/include/obd_support.h
drivers/staging/lustre/lustre/lclient/lcommon_cl.c
drivers/staging/lustre/lustre/ldlm/ldlm_extent.c
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
drivers/staging/lustre/lustre/llite/file.c
drivers/staging/lustre/lustre/llite/super25.c
drivers/staging/lustre/lustre/llite/vvp_dev.c
drivers/staging/lustre/lustre/llite/xattr_cache.c
drivers/staging/lustre/lustre/lov/lov_dev.c
drivers/staging/lustre/lustre/lov/lov_ea.c
drivers/staging/lustre/lustre/lov/lov_lock.c
drivers/staging/lustre/lustre/lov/lov_object.c
drivers/staging/lustre/lustre/lov/lovsub_dev.c
drivers/staging/lustre/lustre/lov/lovsub_lock.c
drivers/staging/lustre/lustre/lov/lovsub_object.c
drivers/staging/lustre/lustre/obdclass/cl_lock.c
drivers/staging/lustre/lustre/obdclass/cl_object.c
drivers/staging/lustre/lustre/obdclass/cl_page.c
drivers/staging/lustre/lustre/obdclass/genops.c
drivers/staging/lustre/lustre/obdecho/echo_client.c
drivers/staging/lustre/lustre/osc/osc_dev.c
drivers/staging/lustre/lustre/osc/osc_io.c
drivers/staging/lustre/lustre/osc/osc_lock.c
drivers/staging/lustre/lustre/osc/osc_object.c
drivers/staging/lustre/lustre/ptlrpc/client.c
drivers/staging/lustre/lustre/ptlrpc/nrs.c
drivers/staging/lustre/lustre/ptlrpc/sec.c
drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c
drivers/staging/lustre/lustre/ptlrpc/service.c

index dddccca120c90be3a5d4a366b1a55caabe873971..740bfcd2f09aad5f0e680d5c45d6a761865339f8 100644 (file)
@@ -153,7 +153,7 @@ do {                                                                            \
  * default allocator
  */
 #define LIBCFS_ALLOC(ptr, size) \
-       LIBCFS_ALLOC_GFP(ptr, size, __GFP_IO)
+       LIBCFS_ALLOC_GFP(ptr, size, GFP_NOFS)
 
 /**
  * non-sleeping allocator
@@ -177,7 +177,7 @@ do {                                                                            \
 
 /** default numa allocator */
 #define LIBCFS_CPT_ALLOC(ptr, cptab, cpt, size)                                    \
-       LIBCFS_CPT_ALLOC_GFP(ptr, cptab, cpt, size, __GFP_IO)
+       LIBCFS_CPT_ALLOC_GFP(ptr, cptab, cpt, size, GFP_NOFS)
 
 #define LIBCFS_FREE(ptr, size)                                   \
 do {                                                               \
index 0061c8afa206af92e5c527a1c995451c22d2ee18..892c41991f83cd27b4aa651b972b11ca1888117e 100644 (file)
@@ -1141,7 +1141,7 @@ kiblnd_alloc_pages(kib_pages_t **pp, int cpt, int npages)
        for (i = 0; i < npages; i++) {
                p->ibp_pages[i] = alloc_pages_node(
                                    cfs_cpt_spread_node(lnet_cpt_table(), cpt),
-                                   __GFP_IO, 0);
+                                   GFP_NOFS, 0);
                if (p->ibp_pages[i] == NULL) {
                        CERROR("Can't allocate page %d of %d\n", i, npages);
                        kiblnd_free_pages(p);
index 9d1f266e55e4f52c20bf4c5d46a1f3cccc20bfc0..6c8e1ab9e6b4572ec6b308e994a707411199caa8 100644 (file)
@@ -2133,7 +2133,7 @@ extern struct kmem_cache *obdo_cachep;
 
 #define OBDO_ALLOC(ptr)                                                       \
 do {                                                                     \
-       OBD_SLAB_ALLOC_PTR_GFP((ptr), obdo_cachep, __GFP_IO);        \
+       OBD_SLAB_ALLOC_PTR_GFP((ptr), obdo_cachep, GFP_NOFS);             \
 } while(0)
 
 #define OBDO_FREE(ptr)                                                 \
index 5ec336968fc876c15be23a3ca86f872eae08ab96..cc5af509b2616fa988e6cacdfab53151794cab80 100644 (file)
@@ -641,8 +641,8 @@ do {                                                                              \
 #define OBD_ALLOC_GFP(ptr, size, gfp_mask)                                   \
        __OBD_MALLOC_VERBOSE(ptr, NULL, 0, size, gfp_mask)
 
-#define OBD_ALLOC(ptr, size) OBD_ALLOC_GFP(ptr, size, __GFP_IO)
-#define OBD_ALLOC_WAIT(ptr, size) OBD_ALLOC_GFP(ptr, size, GFP_IOFS)
+#define OBD_ALLOC(ptr, size) OBD_ALLOC_GFP(ptr, size, GFP_NOFS)
+#define OBD_ALLOC_WAIT(ptr, size) OBD_ALLOC_GFP(ptr, size, GFP_KERNEL)
 #define OBD_ALLOC_PTR(ptr) OBD_ALLOC(ptr, sizeof(*(ptr)))
 #define OBD_ALLOC_PTR_WAIT(ptr) OBD_ALLOC_WAIT(ptr, sizeof(*(ptr)))
 
@@ -650,7 +650,7 @@ do {                                                                              \
        __OBD_MALLOC_VERBOSE(ptr, cptab, cpt, size, gfp_mask)
 
 #define OBD_CPT_ALLOC(ptr, cptab, cpt, size)                                 \
-       OBD_CPT_ALLOC_GFP(ptr, cptab, cpt, size, __GFP_IO)
+       OBD_CPT_ALLOC_GFP(ptr, cptab, cpt, size, GFP_NOFS)
 
 #define OBD_CPT_ALLOC_PTR(ptr, cptab, cpt)                                   \
        OBD_CPT_ALLOC(ptr, cptab, cpt, sizeof(*(ptr)))
@@ -793,10 +793,10 @@ do {                                                                        \
 } while(0)
 
 #define OBD_SLAB_ALLOC(ptr, slab, size)                                              \
-       OBD_SLAB_ALLOC_GFP(ptr, slab, size, __GFP_IO)
+       OBD_SLAB_ALLOC_GFP(ptr, slab, size, GFP_NOFS)
 
 #define OBD_SLAB_CPT_ALLOC(ptr, slab, cptab, cpt, size)                              \
-       OBD_SLAB_CPT_ALLOC_GFP(ptr, slab, cptab, cpt, size, __GFP_IO)
+       OBD_SLAB_CPT_ALLOC_GFP(ptr, slab, cptab, cpt, size, GFP_NOFS)
 
 #define OBD_SLAB_ALLOC_PTR(ptr, slab)                                        \
        OBD_SLAB_ALLOC(ptr, slab, sizeof(*(ptr)))
index 6907a16dbbd1dc39ca9e10445978eb8560348088..12812fcc70b141323584a60d3c20f74d6ea2b681 100644 (file)
@@ -112,12 +112,11 @@ static struct lu_kmem_descr ccc_caches[] = {
  *
  */
 
-void *ccc_key_init(const struct lu_context *ctx,
-                         struct lu_context_key *key)
+void *ccc_key_init(const struct lu_context *ctx, struct lu_context_key *key)
 {
        struct ccc_thread_info *info;
 
-       OBD_SLAB_ALLOC_PTR_GFP(info, ccc_thread_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(info, ccc_thread_kmem, GFP_NOFS);
        if (info == NULL)
                info = ERR_PTR(-ENOMEM);
        return info;
@@ -135,7 +134,7 @@ void *ccc_session_key_init(const struct lu_context *ctx,
 {
        struct ccc_session *session;
 
-       OBD_SLAB_ALLOC_PTR_GFP(session, ccc_session_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(session, ccc_session_kmem, GFP_NOFS);
        if (session == NULL)
                session = ERR_PTR(-ENOMEM);
        return session;
@@ -251,7 +250,7 @@ int ccc_req_init(const struct lu_env *env, struct cl_device *dev,
        struct ccc_req *vrq;
        int result;
 
-       OBD_SLAB_ALLOC_PTR_GFP(vrq, ccc_req_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(vrq, ccc_req_kmem, GFP_NOFS);
        if (vrq != NULL) {
                cl_req_slice_add(req, &vrq->crq_cl, dev, &ccc_req_ops);
                result = 0;
@@ -327,7 +326,7 @@ struct lu_object *ccc_object_alloc(const struct lu_env *env,
        struct ccc_object *vob;
        struct lu_object  *obj;
 
-       OBD_SLAB_ALLOC_PTR_GFP(vob, ccc_object_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(vob, ccc_object_kmem, GFP_NOFS);
        if (vob != NULL) {
                struct cl_object_header *hdr;
 
@@ -396,7 +395,7 @@ int ccc_lock_init(const struct lu_env *env,
 
        CLOBINVRNT(env, obj, ccc_object_invariant(obj));
 
-       OBD_SLAB_ALLOC_PTR_GFP(clk, ccc_lock_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(clk, ccc_lock_kmem, GFP_NOFS);
        if (clk != NULL) {
                cl_lock_slice_add(lock, &clk->clk_cl, obj, lkops);
                result = 0;
index ac5d66aa7f022969fd7e37e6f3cc31f1965a76cc..bde3a82ce0dd29d944a926f0dcb075b885bf939b 100644 (file)
@@ -104,7 +104,7 @@ struct ldlm_interval *ldlm_interval_alloc(struct ldlm_lock *lock)
        struct ldlm_interval *node;
 
        LASSERT(lock->l_resource->lr_type == LDLM_EXTENT);
-       OBD_SLAB_ALLOC_PTR_GFP(node, ldlm_interval_slab, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(node, ldlm_interval_slab, GFP_NOFS);
        if (node == NULL)
                return NULL;
 
index 1066e00d541f84b0abcbe0a53aee6807310d243b..1b3f5c1eb80857c0109d0b9a8b525357d29af316 100644 (file)
@@ -437,7 +437,7 @@ static struct ldlm_lock *ldlm_lock_new(struct ldlm_resource *resource)
        if (resource == NULL)
                LBUG();
 
-       OBD_SLAB_ALLOC_PTR_GFP(lock, ldlm_lock_slab, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(lock, ldlm_lock_slab, GFP_NOFS);
        if (lock == NULL)
                return NULL;
 
@@ -1624,7 +1624,7 @@ ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *ns,
         * have to allocate the interval node early otherwise we can't regrant
         * this lock in the future. - jay */
        if (!local && (*flags & LDLM_FL_REPLAY) && res->lr_type == LDLM_EXTENT)
-               OBD_SLAB_ALLOC_PTR_GFP(node, ldlm_interval_slab, __GFP_IO);
+               OBD_SLAB_ALLOC_PTR_GFP(node, ldlm_interval_slab, GFP_NOFS);
 
        lock_res_and_lock(lock);
        if (local && lock->l_req_mode == lock->l_granted_mode) {
@@ -2146,7 +2146,7 @@ struct ldlm_resource *ldlm_lock_convert(struct ldlm_lock *lock, int new_mode,
 
        /* I can't check the type of lock here because the bitlock of lock
         * is not held here, so do the allocation blindly. -jay */
-       OBD_SLAB_ALLOC_PTR_GFP(node, ldlm_interval_slab, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(node, ldlm_interval_slab, GFP_NOFS);
        if (node == NULL)
                /* Actually, this causes EDEADLOCK to be returned */
                return NULL;
index 2824d4a9a85b39422f8b4f75a715d96bc4baf7ff..a4cec5e63ce07cae7bc814cba4f201b29f7b1846 100644 (file)
@@ -1014,7 +1014,7 @@ static struct ldlm_resource *ldlm_resource_new(void)
        struct ldlm_resource *res;
        int idx;
 
-       OBD_SLAB_ALLOC_PTR_GFP(res, ldlm_resource_slab, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(res, ldlm_resource_slab, GFP_NOFS);
        if (res == NULL)
                return NULL;
 
index 8e844a6371e0600c76ae814e080df1cfd1d3099d..d01c864053f29cbbee831808ea02875a3020fc87 100644 (file)
@@ -54,7 +54,7 @@ struct ll_file_data *ll_file_data_get(void)
 {
        struct ll_file_data *fd;
 
-       OBD_SLAB_ALLOC_PTR_GFP(fd, ll_file_data_slab, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(fd, ll_file_data_slab, GFP_NOFS);
        if (fd == NULL)
                return NULL;
        fd->fd_write_failed = false;
index e21e1c760a8ec690d0a873c36e63967e9911f043..58bb8f21dbe558329b36c6551c75eb63f0918a0a 100644 (file)
@@ -52,7 +52,7 @@ static struct inode *ll_alloc_inode(struct super_block *sb)
 {
        struct ll_inode_info *lli;
        ll_stats_ops_tally(ll_s2sbi(sb), LPROC_LL_ALLOC_INODE, 1);
-       OBD_SLAB_ALLOC_PTR_GFP(lli, ll_inode_cachep, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(lli, ll_inode_cachep, GFP_NOFS);
        if (lli == NULL)
                return NULL;
 
index c4d1580b7be53530a646f054db571043c46ff23a..a9778b874e30ea0260c0767c70f4f8f1f9efd1c7 100644 (file)
@@ -80,7 +80,7 @@ static void *vvp_key_init(const struct lu_context *ctx,
 {
        struct vvp_thread_info *info;
 
-       OBD_SLAB_ALLOC_PTR_GFP(info, vvp_thread_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(info, vvp_thread_kmem, GFP_NOFS);
        if (info == NULL)
                info = ERR_PTR(-ENOMEM);
        return info;
@@ -98,7 +98,7 @@ static void *vvp_session_key_init(const struct lu_context *ctx,
 {
        struct vvp_session *session;
 
-       OBD_SLAB_ALLOC_PTR_GFP(session, vvp_session_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(session, vvp_session_kmem, GFP_NOFS);
        if (session == NULL)
                session = ERR_PTR(-ENOMEM);
        return session;
index 4defa2fd83b35687697c6fac6213372da1cd4e94..dfd19f8010136d9b67f81038d674274d10d6d7dc 100644 (file)
@@ -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;
index 1f33b04b0c38c06c02f9dae360ff5269666d63e4..53e5781ba1d9d7fbe1d1f4bbbb89511d19c6c1ce 100644 (file)
@@ -143,7 +143,7 @@ static void *lov_key_init(const struct lu_context *ctx,
 {
        struct lov_thread_info *info;
 
-       OBD_SLAB_ALLOC_PTR_GFP(info, lov_thread_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(info, lov_thread_kmem, GFP_NOFS);
        if (info != NULL)
                INIT_LIST_HEAD(&info->lti_closure.clc_list);
        else
@@ -170,7 +170,7 @@ static void *lov_session_key_init(const struct lu_context *ctx,
 {
        struct lov_session *info;
 
-       OBD_SLAB_ALLOC_PTR_GFP(info, lov_session_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(info, lov_session_kmem, GFP_NOFS);
        if (info == NULL)
                info = ERR_PTR(-ENOMEM);
        return info;
@@ -260,7 +260,7 @@ static int lov_req_init(const struct lu_env *env, struct cl_device *dev,
        struct lov_req *lr;
        int result;
 
-       OBD_SLAB_ALLOC_PTR_GFP(lr, lov_req_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(lr, lov_req_kmem, GFP_NOFS);
        if (lr != NULL) {
                cl_req_slice_add(req, &lr->lr_cl, dev, &lov_req_ops);
                result = 0;
index 6f356e025543739f0a39f68a061756b2be5e0ab5..b91cb2ab8e21a7abea094632c5ee5ae070aa071f 100644 (file)
@@ -101,7 +101,7 @@ struct lov_stripe_md *lsm_alloc_plain(__u16 stripe_count, int *size)
                return NULL;
 
        for (i = 0; i < stripe_count; i++) {
-               OBD_SLAB_ALLOC_PTR_GFP(loi, lov_oinfo_slab, __GFP_IO);
+               OBD_SLAB_ALLOC_PTR_GFP(loi, lov_oinfo_slab, GFP_NOFS);
                if (loi == NULL)
                        goto err;
                lsm->lsm_oinfo[i] = loi;
index ed2726e523e8bae70e3dbd831064b813f2b51cb5..0bbe141bf4e4f2d7eedb4a1f88b01151c31d3e3f 100644 (file)
@@ -144,7 +144,7 @@ static struct cl_lock *lov_sublock_alloc(const struct lu_env *env,
 
        LASSERT(idx < lck->lls_nr);
 
-       OBD_SLAB_ALLOC_PTR_GFP(link, lov_lock_link_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(link, lov_lock_link_kmem, GFP_NOFS);
        if (link != NULL) {
                struct lov_sublock_env *subenv;
                struct lov_lock_sub  *lls;
@@ -1159,7 +1159,7 @@ int lov_lock_init_raid0(const struct lu_env *env, struct cl_object *obj,
        struct lov_lock *lck;
        int result;
 
-       OBD_SLAB_ALLOC_PTR_GFP(lck, lov_lock_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(lck, lov_lock_kmem, GFP_NOFS);
        if (lck != NULL) {
                cl_lock_slice_add(lock, &lck->lls_cl, obj, &lov_lock_ops);
                result = lov_lock_sub_init(env, lck, io);
@@ -1194,7 +1194,7 @@ int lov_lock_init_empty(const struct lu_env *env, struct cl_object *obj,
        struct lov_lock *lck;
        int result = -ENOMEM;
 
-       OBD_SLAB_ALLOC_PTR_GFP(lck, lov_lock_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(lck, lov_lock_kmem, GFP_NOFS);
        if (lck != NULL) {
                cl_lock_slice_add(lock, &lck->lls_cl, obj, &lov_empty_lock_ops);
                lck->lls_orig = lock->cll_descr;
index d6b2cb45b938fb01b7d91158adbe9f27adb29f84..f20e497c5404944a0f3e7a2eb5c548e84aeaf402 100644 (file)
@@ -885,7 +885,7 @@ struct lu_object *lov_object_alloc(const struct lu_env *env,
        struct lov_object *lov;
        struct lu_object  *obj;
 
-       OBD_SLAB_ALLOC_PTR_GFP(lov, lov_object_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(lov, lov_object_kmem, GFP_NOFS);
        if (lov != NULL) {
                obj = lov2lu(lov);
                lu_object_init(obj, NULL, dev);
index 926c35a25ceb6e7faf0507d4e7ad7ae393882760..52fb6c162ad7dc6e18049d6133137e70943cc299 100644 (file)
@@ -146,7 +146,7 @@ static int lovsub_req_init(const struct lu_env *env, struct cl_device *dev,
        struct lovsub_req *lsr;
        int result;
 
-       OBD_SLAB_ALLOC_PTR_GFP(lsr, lovsub_req_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(lsr, lovsub_req_kmem, GFP_NOFS);
        if (lsr != NULL) {
                cl_req_slice_add(req, &lsr->lsrq_cl, dev, &lovsub_req_ops);
                result = 0;
index 80305aa61712350e2fe23023470785699f8dfdbf..62b696d25d81242fdafb7a6b7b4318a017ecd162 100644 (file)
@@ -453,7 +453,7 @@ int lovsub_lock_init(const struct lu_env *env, struct cl_object *obj,
        struct lovsub_lock *lsk;
        int result;
 
-       OBD_SLAB_ALLOC_PTR_GFP(lsk, lovsub_lock_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(lsk, lovsub_lock_kmem, GFP_NOFS);
        if (lsk != NULL) {
                INIT_LIST_HEAD(&lsk->lss_parents);
                cl_lock_slice_add(lock, &lsk->lss_cl, obj, &lovsub_lock_ops);
index 89760b3bf3f7aebb82793c5c7e3fce23a3d91e5f..57e3629fccee30fe8f57a1500fe33d86c3f774bb 100644 (file)
@@ -145,7 +145,7 @@ struct lu_object *lovsub_object_alloc(const struct lu_env *env,
        struct lovsub_object *los;
        struct lu_object     *obj;
 
-       OBD_SLAB_ALLOC_PTR_GFP(los, lovsub_object_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(los, lovsub_object_kmem, GFP_NOFS);
        if (los != NULL) {
                struct cl_object_header *hdr;
 
index 8eb1785645ba0807ccc4ac94c72e763fcdcbe6ae..918f433b22d94fcac55d937f1b0e2049f78cfe4e 100644 (file)
@@ -360,7 +360,7 @@ static struct cl_lock *cl_lock_alloc(const struct lu_env *env,
        struct cl_lock    *lock;
        struct lu_object_header *head;
 
-       OBD_SLAB_ALLOC_PTR_GFP(lock, cl_lock_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(lock, cl_lock_kmem, GFP_NOFS);
        if (lock != NULL) {
                atomic_set(&lock->cll_ref, 1);
                lock->cll_descr = *descr;
index 0fc256f59e92ae7303bb5ce64f8751cc80dc70fd..2837cbc8865d0b7bf81b62cd55a29648742e24a0 100644 (file)
@@ -684,7 +684,7 @@ static struct lu_env *cl_env_new(__u32 ctx_tags, __u32 ses_tags, void *debug)
        struct lu_env *env;
        struct cl_env *cle;
 
-       OBD_SLAB_ALLOC_PTR_GFP(cle, cl_env_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(cle, cl_env_kmem, GFP_NOFS);
        if (cle != NULL) {
                int rc;
 
index 2a5ce376e577747a6f820163a1adbcefdcb1be08..a4b04cba0b24d8b7df432d7a5c55dec207cac3e7 100644 (file)
@@ -292,7 +292,7 @@ static struct cl_page *cl_page_alloc(const struct lu_env *env,
        struct lu_object_header *head;
 
        OBD_ALLOC_GFP(page, cl_object_header(o)->coh_page_bufsize,
-                       __GFP_IO);
+                       GFP_NOFS);
        if (page != NULL) {
                int result = 0;
                atomic_set(&page->cp_ref, 1);
index 350b6f079d927926dba46e3853865fa3639a992c..3210ad8184b9e636374f9b6b50e85ff26335453c 100644 (file)
@@ -72,7 +72,7 @@ static struct obd_device *obd_device_alloc(void)
 {
        struct obd_device *obd;
 
-       OBD_SLAB_ALLOC_PTR_GFP(obd, obd_device_cachep, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(obd, obd_device_cachep, GFP_NOFS);
        if (obd != NULL) {
                obd->obd_magic = OBD_DEVICE_MAGIC;
        }
index a7f5e41ebf77c6a9405114d8487bd39995720ddc..0eb39f25d9c2d49e6a972b29e3d3a4720d198200 100644 (file)
@@ -428,7 +428,7 @@ static int echo_lock_init(const struct lu_env *env,
 {
        struct echo_lock *el;
 
-       OBD_SLAB_ALLOC_PTR_GFP(el, echo_lock_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(el, echo_lock_kmem, GFP_NOFS);
        if (el != NULL) {
                cl_lock_slice_add(lock, &el->el_cl, obj, &echo_lock_ops);
                el->el_object = cl2echo_obj(obj);
@@ -599,7 +599,7 @@ static struct lu_object *echo_object_alloc(const struct lu_env *env,
 
        /* we're the top dev. */
        LASSERT(hdr == NULL);
-       OBD_SLAB_ALLOC_PTR_GFP(eco, echo_object_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(eco, echo_object_kmem, GFP_NOFS);
        if (eco != NULL) {
                struct cl_object_header *hdr = &eco->eo_hdr;
 
@@ -663,7 +663,7 @@ static void *echo_thread_key_init(const struct lu_context *ctx,
 {
        struct echo_thread_info *info;
 
-       OBD_SLAB_ALLOC_PTR_GFP(info, echo_thread_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(info, echo_thread_kmem, GFP_NOFS);
        if (info == NULL)
                info = ERR_PTR(-ENOMEM);
        return info;
@@ -693,7 +693,7 @@ static void *echo_session_key_init(const struct lu_context *ctx,
 {
        struct echo_session_info *session;
 
-       OBD_SLAB_ALLOC_PTR_GFP(session, echo_session_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(session, echo_session_kmem, GFP_NOFS);
        if (session == NULL)
                session = ERR_PTR(-ENOMEM);
        return session;
index 35f25786763719a0b1ac407a5b3dae0015612fb6..6a6483920c4d9b84f1f58b41a9d833864de533f7 100644 (file)
@@ -122,7 +122,7 @@ static void *osc_key_init(const struct lu_context *ctx,
 {
        struct osc_thread_info *info;
 
-       OBD_SLAB_ALLOC_PTR_GFP(info, osc_thread_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(info, osc_thread_kmem, GFP_NOFS);
        if (info == NULL)
                info = ERR_PTR(-ENOMEM);
        return info;
@@ -146,7 +146,7 @@ static void *osc_session_init(const struct lu_context *ctx,
 {
        struct osc_session *info;
 
-       OBD_SLAB_ALLOC_PTR_GFP(info, osc_session_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(info, osc_session_kmem, GFP_NOFS);
        if (info == NULL)
                info = ERR_PTR(-ENOMEM);
        return info;
index 5f3c545418d11cd765068ae6f3d5409e82618c5f..6744dc620840ff51497ba81e0217d4bd47bdf6fb 100644 (file)
@@ -812,7 +812,7 @@ int osc_req_init(const struct lu_env *env, struct cl_device *dev,
        struct osc_req *or;
        int result;
 
-       OBD_SLAB_ALLOC_PTR_GFP(or, osc_req_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(or, osc_req_kmem, GFP_NOFS);
        if (or != NULL) {
                cl_req_slice_add(req, &or->or_cl, dev, &osc_req_ops);
                result = 0;
index 1c6cafa3de707c1f559f0ba403351f48db4f6248..a46129bec17af74e0974c9529debd70f579bb967 100644 (file)
@@ -1559,7 +1559,7 @@ int osc_lock_init(const struct lu_env *env,
        struct osc_lock *clk;
        int result;
 
-       OBD_SLAB_ALLOC_PTR_GFP(clk, osc_lock_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(clk, osc_lock_kmem, GFP_NOFS);
        if (clk != NULL) {
                __u32 enqflags = lock->cll_descr.cld_enq_flags;
 
index 9d34de873fac8e5062d112c05b3bddf0cddec8dd..f9bfdc8201256263ee7d67117b3c379cfd933034 100644 (file)
@@ -260,7 +260,7 @@ struct lu_object *osc_object_alloc(const struct lu_env *env,
        struct osc_object *osc;
        struct lu_object  *obj;
 
-       OBD_SLAB_ALLOC_PTR_GFP(osc, osc_object_kmem, __GFP_IO);
+       OBD_SLAB_ALLOC_PTR_GFP(osc, osc_object_kmem, GFP_NOFS);
        if (osc != NULL) {
                obj = osc2lu(osc);
                lu_object_init(obj, NULL, dev);
index 5bee8206d70bb7be9390e4bf18b8ed72d5c6e9a6..20987723bb56a2b8962143cc9136a92dea002cd6 100644 (file)
@@ -455,7 +455,7 @@ void ptlrpc_add_rqs_to_pool(struct ptlrpc_request_pool *pool, int num_rq)
                struct lustre_msg *msg;
 
                spin_unlock(&pool->prp_lock);
-               req = ptlrpc_request_cache_alloc(__GFP_IO);
+               req = ptlrpc_request_cache_alloc(GFP_NOFS);
                if (!req)
                        return;
                OBD_ALLOC_LARGE(msg, size);
@@ -696,7 +696,7 @@ struct ptlrpc_request *__ptlrpc_request_alloc(struct obd_import *imp,
                request = ptlrpc_prep_req_from_pool(pool);
 
        if (!request)
-               request = ptlrpc_request_cache_alloc(__GFP_IO);
+               request = ptlrpc_request_cache_alloc(GFP_NOFS);
 
        if (request) {
                LASSERTF((unsigned long)imp > 0x1000, "%p", imp);
@@ -3051,7 +3051,7 @@ void *ptlrpcd_alloc_work(struct obd_import *imp,
                return ERR_PTR(-EINVAL);
 
        /* copy some code from deprecated fakereq. */
-       req = ptlrpc_request_cache_alloc(__GFP_IO);
+       req = ptlrpc_request_cache_alloc(GFP_NOFS);
        if (req == NULL) {
                CERROR("ptlrpc: run out of memory!\n");
                return ERR_PTR(-ENOMEM);
index bcba1c8e8693b5badc5ecdfdf7d42c0917a4b076..12151aa2a1e5101ba6fe862a36bec0435fcdf2b6 100644 (file)
@@ -746,7 +746,7 @@ static int nrs_policy_register(struct ptlrpc_nrs *nrs,
        LASSERT(desc->pd_compat != NULL);
 
        OBD_CPT_ALLOC_GFP(policy, svcpt->scp_service->srv_cptable,
-                         svcpt->scp_cpt, sizeof(*policy), __GFP_IO);
+                         svcpt->scp_cpt, sizeof(*policy), GFP_NOFS);
        if (policy == NULL)
                return -ENOMEM;
 
index 3772ab10026a2fd832a5cb027d78d24a18970600..28ac824a73fb8356de35bc76c57c7e1a269adb4a 100644 (file)
@@ -904,7 +904,7 @@ int sptlrpc_import_check_ctx(struct obd_import *imp)
                return -EACCES;
        }
 
-       req = ptlrpc_request_cache_alloc(__GFP_IO);
+       req = ptlrpc_request_cache_alloc(GFP_NOFS);
        if (!req)
                return -ENOMEM;
 
@@ -1088,7 +1088,7 @@ int sptlrpc_cli_unwrap_early_reply(struct ptlrpc_request *req,
        int                  early_bufsz, early_size;
        int                  rc;
 
-       early_req = ptlrpc_request_cache_alloc(__GFP_IO);
+       early_req = ptlrpc_request_cache_alloc(GFP_NOFS);
        if (early_req == NULL)
                return -ENOMEM;
 
index 9656681327478657530642ef6ecd37c83228ad23..1d46b5e2b0bc3366080c6c1bcb3e9f94bc81419a 100644 (file)
@@ -421,7 +421,7 @@ static int enc_pools_add_pages(int npages)
                        goto out_pools;
 
                for (j = 0; j < PAGES_PER_POOL && alloced < npages; j++) {
-                       pools[i][j] = alloc_page(__GFP_IO |
+                       pools[i][j] = alloc_page(GFP_NOFS |
                                                     __GFP_HIGHMEM);
                        if (pools[i][j] == NULL)
                                goto out_pools;
index 4dd2bcba43f7d6ccadd3155e118ce0007a400977..5d0eb6cb587c55e93d8733b0c557d420ec3a7e63 100644 (file)
@@ -1305,7 +1305,7 @@ static int ptlrpc_at_send_early_reply(struct ptlrpc_request *req)
        }
        newdl = cfs_time_current_sec() + at_get(&svcpt->scp_at_estimate);
 
-       reqcopy = ptlrpc_request_cache_alloc(__GFP_IO);
+       reqcopy = ptlrpc_request_cache_alloc(GFP_NOFS);
        if (reqcopy == NULL)
                return -ENOMEM;
        OBD_ALLOC_LARGE(reqmsg, req->rq_reqlen);