Whamcloud - gitweb
LU-16609 target: top_trans_create cannot alloc memory 76/50176/5
authorAndrew Perepechko <andrew.perepechko@hpe.com>
Tue, 10 Jan 2023 21:53:38 +0000 (16:53 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 18 Apr 2023 03:21:15 +0000 (03:21 +0000)
top_trans_create() requests __GFP_IO memory allocation,
which does not allow direct reclaim. However, if the
memory shortage is temporary, direct reclaim is reasonable.
GFP_NOFS is __GFP_IO with additional reclaim bits.

Change-Id: I2c84d9d74188660063c948573780745a2b59a688
Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
HPE-bug-id: LUS-11293
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50176
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
lustre/target/update_trans.c

index 16acc80..77f6c4a 100644 (file)
@@ -592,7 +592,7 @@ top_trans_create(const struct lu_env *env, struct dt_device *master_dev)
        struct top_thandle      *top_th;
        struct thandle          *child_th;
 
-       OBD_ALLOC_GFP(top_th, sizeof(*top_th), __GFP_IO);
+       OBD_ALLOC_GFP(top_th, sizeof(*top_th), GFP_NOFS);
        if (top_th == NULL)
                return ERR_PTR(-ENOMEM);