Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4592474pja; Thu, 21 Nov 2019 22:28:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzqsRVKRerTMTSdAFZYkKxqx0YWjHndO/AdJH8c4RwgzmkR46hKJPQIIXUncWF/yatuCWAo X-Received: by 2002:a17:906:11cf:: with SMTP id o15mr20318730eja.208.1574404106126; Thu, 21 Nov 2019 22:28:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574404106; cv=none; d=google.com; s=arc-20160816; b=kmfCOVgBtP/jx5EUBeOif8bwi3DrESCoDfua9Gt7tf+SgXQMSZFHi600wnAN5s2vpr iyKUD8TC17MEaigphb/akaMlo3GWTPpw3Xy3vP6ysYhTO3dZvZHbkBbdAxik5dx4MmDN yiNHJWpKHHLuNTbiuVclAyznXVXU0tDQ+96lGWHiJgfQ4skVFEfZIcPWRPMvOzLXyWlh Nowdmlbq/g9JtKqzBXpo0rU8kDLVbN6K4R23nLfk3tEvJEwwDz+77E24U8iMFpaRogzS SmK4vpEJdS8pDsgWJr9mbjxkkF1Hwp4/Qg9upyxRRToUbWoRb3Q7nTytMB83PIkAkB3F 5Mew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=MwrPzwCwFSY+90cmUpdPAIidD4cBqwCGKzavAb8fBUQ=; b=Ii2Jaa3JUMhVitDuVFZHMbJRpe4r/R28lWqlPt7tglr7Yj863rpAHvgq4PXSpEFn6D oKjvA8AyAjHSMKSrUF1uhFPnQPfFR6s56wXRBzOD5U89u7+Lnnvc5BA6xc4cuUMpmrxV lU03j19pAqK3jpwAPkpoDrchl1J1Q+0+YqT1xiKtv2yHZvAe9H0BdQbq6xvWeZOz3YOB zNPyqJDsdZCNI4pAlPp2/ABxwjzBKKs/Pfa069JkllJLpL1jhw/6ZJK+tozSA/KyqMdK OBF2bRFdz1atEB0cT1xhU1ROmQ3SCLNa1ZkEzRD1J1vNFoEAqTTTb6ksJW0WuuIrimK9 ajxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kuAK+qnh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c13si4289144edv.320.2019.11.21.22.28.02; Thu, 21 Nov 2019 22:28:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kuAK+qnh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728431AbfKVGZj (ORCPT + 99 others); Fri, 22 Nov 2019 01:25:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:56006 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727970AbfKVFvD (ORCPT ); Fri, 22 Nov 2019 00:51:03 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89FD720731; Fri, 22 Nov 2019 05:51:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574401863; bh=VuJLFF+98QvkWxdbK4hp/Y/tQqKfJY/Eub1jtxof0Jc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kuAK+qnhno6MXzCrVN4iNGwiPTlqygF3DykfFGWz6QPnI7BSyCa6pihoIQ1UZ87qc rSmjeZSWAC7hAib2hbfm7d1trcPCZdShnjxREpevcF9LpgFJhDOxBvzFI3XBIWOAX0 pvbV+SLeztJfm7+LjbYt4IBhq7oUSNdDo7qD6Nhs= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Bob Peterson , Andreas Gruenbacher , Sasha Levin , cluster-devel@redhat.com Subject: [PATCH AUTOSEL 4.19 099/219] gfs2: take jdata unstuff into account in do_grow Date: Fri, 22 Nov 2019 00:47:11 -0500 Message-Id: <20191122054911.1750-92-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122054911.1750-1-sashal@kernel.org> References: <20191122054911.1750-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bob Peterson [ Upstream commit bc0205612bbd4dd4026d4ba6287f5643c37366ec ] Before this patch, function do_grow would not reserve enough journal blocks in the transaction to unstuff jdata files while growing them. This patch adds the logic to add one more block if the file to grow is jdata. Signed-off-by: Bob Peterson Reviewed-by: Andreas Gruenbacher Signed-off-by: Sasha Levin --- fs/gfs2/bmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 52feccedd7a44..096b479721395 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -2122,6 +2122,8 @@ static int do_grow(struct inode *inode, u64 size) } error = gfs2_trans_begin(sdp, RES_DINODE + RES_STATFS + RES_RG_BIT + + (unstuff && + gfs2_is_jdata(ip) ? RES_JDATA : 0) + (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF ? 0 : RES_QUOTA), 0); if (error) -- 2.20.1