Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp894961yba; Thu, 18 Apr 2019 11:21:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTBYlmswibZ9hh0mc+VdThFrkJsczZhOIayLvrQIG9vtnSfZ6PvdNvMWQLS03FJH9l09vC X-Received: by 2002:a62:2687:: with SMTP id m129mr96545502pfm.204.1555611702059; Thu, 18 Apr 2019 11:21:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555611702; cv=none; d=google.com; s=arc-20160816; b=cuw0KnWNLThOoue31MxC3h/99xzKT9CYTt94XQOGuK9TB6gYY/JCa4dCcqLoqNYJ7z OTSHxoL7X/yqHNtsYxNWojkiyJWWexfW7yo9k6DU0xR/DGA1xqUk9dACMTTI3mnZVb1L 5pzU6ww6I8ZtvKwgsOpK+t9Kg5Tky9fWwhtEjHq4AMJ8/klJTHaqNLFOqsHDHmQnA0a0 yhc4qJbtugvyeuBrEVbh85ldvw8UPtScSNRo0eNwbn0OxVBdoelrUUaJEjFQ8da9k1Fa u2twCSCc0WAuC8pPz6qW4ZGOu3uz+YB04Fyg4+tHScMpXjTbZi1YPx/4GEWWKACRtwfW usfQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cltLNdxL7FFpQ4XOyOLs7elYDl9KcLzW4y+V98BjV10=; b=GTvjzMcSerqz2wK3X5TBjNV7EXxuMBFfpDcUijzg3gjHv2SXKTAWDKlq8p4FC1Fkz8 kxP+qrTkvCjiBBE/BuRUO40ZiWuOf+6eA9x44s1syxmk0Wv0LVEFqA2olK6IX8DPSViY aJvJYYTFbk7uM/a1WMN4N1L9JK9bb63ookYG2yhXaUEg2m1kzm9EffF+fDAwsCbjAKd0 KkkVwYRIVwNx12PwkJKGvMKMaPhhuiYSUu1Y0UbksEW5yngvwVDJF6dqzsbk+WTipRSN 2tYo4AHt7MEihhgs7jZWenuA+hxYSsodxpE+M8YfWxIs+MEYvBN7EOftrUBT4fZhnZB1 mQCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2VMOceRi; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si2702423plj.345.2019.04.18.11.21.27; Thu, 18 Apr 2019 11:21:42 -0700 (PDT) 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=2VMOceRi; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391527AbfDRSSi (ORCPT + 99 others); Thu, 18 Apr 2019 14:18:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:42310 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391689AbfDRSKb (ORCPT ); Thu, 18 Apr 2019 14:10:31 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0493D206B6; Thu, 18 Apr 2019 18:10:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555611031; bh=2lyiCBU9FjYFYsa2mPpwZ6W58qOtlZI8IJkQGr0g5Gg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2VMOceRiKi7+tZd+zBZ7ocjYwhQdM8JCsSbMB8u6jFOD7uP/Nm0M6iiTzKwD3dlVY vwkmCCDH5U4BtErhnok/F6Nc/Ct11bs6aB8gXTBkNd7jrvRdExItPrO/vyiFSBWORO E2hX2xfGUONNMjh9UywOSatXb87p4+z+qvj0GecI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lukas Czerner , Theodore Tso , Sasha Levin Subject: [PATCH 5.0 09/93] ext4: report real fs size after failed resize Date: Thu, 18 Apr 2019 19:56:47 +0200 Message-Id: <20190418160437.920334439@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190418160436.781762249@linuxfoundation.org> References: <20190418160436.781762249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 6c7328400e0488f7d49e19e02290ba343b6811b2 ] Currently when the file system resize using ext4_resize_fs() fails it will report into log that "resized filesystem to ". However this may not be true in the case of failure. Use the current block count as returned by ext4_blocks_count() to report the block count. Additionally, report a warning that "error occurred during file system resize" Signed-off-by: Lukas Czerner Signed-off-by: Theodore Ts'o Signed-off-by: Sasha Levin --- fs/ext4/resize.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index 90061c3d048b..e7ae26e36c9c 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -2080,6 +2080,10 @@ int ext4_resize_fs(struct super_block *sb, ext4_fsblk_t n_blocks_count) free_flex_gd(flex_gd); if (resize_inode != NULL) iput(resize_inode); - ext4_msg(sb, KERN_INFO, "resized filesystem to %llu", n_blocks_count); + if (err) + ext4_warning(sb, "error (%d) occurred during " + "file system resize", err); + ext4_msg(sb, KERN_INFO, "resized filesystem to %llu", + ext4_blocks_count(es)); return err; } -- 2.19.1