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

Steven Whitehouse swhiteho at redhat.com
Thu Jun 1 15:39:25 UTC 2017


Hi,


On 31/05/17 16:03, Andreas Gruenbacher wrote:
> 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);

NACK for this one. We shouldn't be printing out messages in this case, 
we just need to handle the situation properly,

Steve.




More information about the Cluster-devel mailing list