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

Andreas Gruenbacher <[email protected]>
Newsgroups com.redhat.cluster-devel
Message-ID <[email protected]>
Signed-off-by: Andreas Gruenbacher <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.