[Cluster-devel] [PATCH 8/8] gfs2: Warn when not deleting inodes under memory pressure

Andreas Gruenbacher agruenba at redhat.com
Wed May 31 15:03:12 UTC 2017


Signed-off-by: Andreas Gruenbacher <agruenba at redhat.com>
---
 fs/gfs2/super.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index ace4814..3637662 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -1548,8 +1548,11 @@ static void gfs2_evict_inode(struct inode *inode)
 	 * will be deallocated when another inode is allocated in the same
 	 * resource group.
 	 */
-	if (current->flags & PF_MEMALLOC)
+	if (current->flags & PF_MEMALLOC) {
+		fs_warn(sdp, "not deleting inode %llu under memory pressure\n",
+			(unsigned long long)ip->i_no_addr);
 		goto out;
+	}
 
 	/* Must not read inode block until block type has been verified */
 	error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, GL_SKIP, &gh);
-- 
2.7.4




More information about the Cluster-devel mailing list